Skip to main content

Nettigo Air Monitor smart home integration, free and open source

Nettigo Air Monitor integration for Gladys Assistant

Nettigo Air Monitor (NAM) air quality sensors on the local network: PM, CO₂, climate.

This integration brings the Nettigo Air Monitor (NAM) air quality sensors into Gladys. It reads them on your local network, from the /data.json page of their firmware: no account, no cloud, no API key.

Developed without the hardware: feedback welcome. The integration was written from the NAM firmware behaviour, as read by the nettigo-air-monitor Python library of Home Assistant, and tested against a faithful fake sensor and the real answers recorded by that library. It has not been tried on a real NAM yet: tell us on the Gladys forum what works and what does not.

This integration is not affiliated with Nettigo.

What you get​

  • One device per sensor box, found automatically on your network (mDNS), or added by its IP address. It is identified by its MAC address: a new IP address (DHCP) changes nothing.
  • The measurements of the sensors your box has, and only those: PM1, PM2.5, PM10 (SDS011, Plantower PMS, Sensirion SPS30), temperature, humidity, pressure (BME280, BMP280, BMP180, SHT3x, HECA, DHT22, DS18B20), CO₂ (MH-Z14A), illuminance (BH1750) and the Wi-Fi signal. Each feature names its sensor ("PM2.5 (SDS011)", "Temperature (SHT3x)"): a box often has two temperature sensors, inside and outside the case.
  • The European air quality index CAQI (0 to 100), computed from the dust readings.
  • An "Air quality (NAM)" dashboard widget: the live readings and the CAQI level in colour.
  • Two scene triggers (the air quality changed level, a sensor stopped answering) and a scene action that gives the air quality as a sentence ready for a notification.

Read only: nothing is ever written to the sensor.

Requirements​

  • Gladys Assistant 5.1.0 or later.
  • A Nettigo Air Monitor with the NAMF firmware, on the same network as Gladys. A fixed IP address (DHCP reservation in your router) is recommended if automatic discovery does not work on your network.
  • If the web interface of the sensor is protected by a password, its user name and password.

An airRohr box (Sensor.Community firmware) also answers the same way and can be added by its IP address, but the Sensor.Community integration is made for it (and for the public sensors of the Sensor.Community map).

Configuration​

Settings​

  • Sensor IP addresses: optional, separated by commas. Only for the sensors automatic discovery does not find. You can paste the address from your browser (http://192.168.1.60/).
  • User name and Password: only if the web interface of the sensors is protected ("Basic authentication" in the NAM settings). The same pair is used for every sensor.
  • Refresh interval: 1, 2 (default), 5 or 10 minutes. A NAM measures every 145 seconds by default ("Measuring interval" of its web interface): reading faster only repeats the same values.
  • Language of the names: the language of the feature names given to new devices, and of the texts sent to the scenes (French by default).

Finding the sensors​

  1. Install the integration, fill the settings if needed, and save.
  2. Open the Discover tab: every sensor found is listed. Click Add on the ones you want.
  3. The Search for sensors button of the Configuration tab searches again and tells what it found: the sensors answering, those that ask for a password, the addresses ignored.

The NAM announces its web interface on the network (mDNS, name NAM-…), and Gladys looks for it on behalf of the integration. If your network blocks those announcements, enter the IP addresses.

A sensor that has not measured anything yet (just after it starts) is not listed: it is after its first measurement, about 2 minutes later.

Password-protected sensors​

The NAM shows its MAC address on its configuration page, which the password protects. Without the right user name and password, the sensor is not added, and Gladys shows a message under the integration name. Enter them in the settings: the sensors are searched again at once.

Devices​

FeatureCategory in GladysUnit
Air quality index (CAQI)Air quality (AQI), 0 to 100—
PM1 (SPS30, PMS)PM2.5 sensor (named PM1)µg/m³
PM2.5PM2.5 sensorµg/m³
PM10PM10 sensorµg/m³
CO₂ (MH-Z14A)CO₂ sensorppm
TemperatureTemperature sensor°C
HumidityHumidity sensor%
PressurePressure sensorhPa
Illuminance (BH1750)Light sensorlux
Wi-Fi signalSignal strengthdBm

Gladys has no PM1 nor PM4 category: PM1 uses the PM2.5 category with its own name, and the PM4 of the SPS30 is left out.

A sensor soldered on later appears at the next reading: Gladys then offers Update in the Discover tab. The device parameters show the IP address, the MAC address and the firmware version.

The CAQI index​

The CAQI (Common Air Quality Index) is the European index of the CITEAIR project, the one Home Assistant computes for the NAM too. Each dust sensor gives an index from its PM2.5 and PM10, the device shows the worst one:

CAQILevel
0 – 24Very good
25 – 49Good
50 – 74Medium
75 – 99Poor
100Very poor

The official index uses hourly averages; the NAM averages over its measuring interval. Take it as a reading aid, not as the official air quality of your town.

Dashboard widget​

Add the Air quality (NAM) widget to a dashboard and choose a sensor. It shows:

  • the PM2.5 and PM10 of the best dust sensor of the box (SPS30, then PMS, then SDS011), and the temperature and humidity of its best climate sensor, live;
  • the CAQI level, in green, orange or red;
  • the CO₂, when the box has a MH-Z14A: green up to 800 ppm, orange up to 1000 ppm, red above;
  • a note when the sensor does not answer.

The Show temperature and humidity setting hides the climate tiles.

Scene triggers​

  • Air quality changed (NAM): the CAQI of a sensor reached another level, confirmed by two readings in a row (a reading on the edge of a band does not fire it at every cycle). Filters: the sensor, the new levels. Variables: sensor name, level (as a word), CAQI, previous level.
  • NAM sensor not answering: a sensor did not answer three readings in a row. Variables: sensor name, IP address.

For a threshold on a single value (PM2.5 above 50 µg/m³), use the device feature in a regular scene condition.

Scene action​

Get the air quality (NAM) reads the last values of a sensor and gives the following actions: the CAQI, the level (key and word), the PM2.5 and PM10, and a ready-made sentence such as "Air quality good (CAQI 32) · PM2.5 8 µg/m³ · PM10 15 µg/m³". It fails when the sensor does not answer or has no dust sensor.

Scene examples​

  • Air the house: trigger "Air quality changed (NAM)" on the outdoor sensor, levels "Very good" and "Good" → send a message "The air outside is clean again".
  • Morning report: at 7:30, "Get the air quality (NAM)" → send the summary by message.
  • Sensor down: trigger "NAM sensor not answering" → send a message with the sensor name.

Troubleshooting​

  • No sensor found: check that the sensor answers in a browser (http://<its address>/) from a computer of the same network as Gladys, then enter its IP address in the settings.
  • "Asks for a user name and a password": enter those of the web interface of the sensor.
  • Values do not change: the NAM measures every 145 seconds by default; check its "Measuring interval". A sensor reading nothing (unplugged, broken) is no longer in /data.json: its feature keeps its last value.
  • A feature is missing: it appears once the sensor has measured it; click Update in the Discover tab.
  • The integration logs (Integrations → Nettigo Air Monitor → Logs) say which sensor does not answer, and why.

Limits​

  • Read only: the integration does not change the settings of the sensor, nor restarts or updates it.
  • PM4 (SPS30), GPS position and the number of samples are not published.
  • Low-cost dust sensors over-read in humid air: the values and the CAQI are indications.
  • The same user name and password for every sensor.

Configuration settings​

These are the settings Nettigo Air Monitor asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Finding your sensorssectionNoNettigo Air Monitor boxes (NAMF firmware) on the same network as Gladys are found automatically (mDNS): open the Discover tab. If one is missing, enter its IP address below.
Sensor IP addressesstringNoOptional, separated by commas. Only needed for the sensors automatic discovery does not find.
User namestringNoOnly if the web interface of the sensors is protected by a password (Basic authentication). The same for every sensor.
PasswordsecretNoThe password of the web interface, if one is set.
Refresh intervalselectNoHow often each sensor is read. A NAM measures every 145 seconds by default: reading faster only repeats the same values.
Language of the namesselectNoLanguage of the feature names given to new devices and of the texts sent to the scenes.

How to install Nettigo Air Monitor in Gladys​

  1. In Gladys, open Integrations: Nettigo Air Monitor appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-nettigo:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-nettigo.

Nettigo Air Monitor requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Nettigo Air Monitor is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂