Grafana dashboard

Can you integrate a CO2 meter which really wouldn't want you to integrate it with Zabbix, with Zabbix? Of course you can! By day, I'm a Lead Site Reliability Engineer in a global cyber security company. By night, I monitor my home with Zabbix & Grafana and do some weird experiments with them.

I have an el cheapo environmental monitor by Netatmo, showing the temperature, humidity, CO2 level and noise level.

Netatmo Home Coach phone app
Yes there's an app for that but...

This device is an IoT monitor with a phone app, but even though Netatmo has a nice developer API for its products, this particular model does not support that functionality. Also, my dear Cozify does not support the device.  So, is my all hope lost for getting the data to Zabbix? Of course not!

Yes, it's Siri, once again

 

As the device is HomeKit compatible, I was able to utilise iOS Shortcuts for this magic to happen. Even though I do not have AppleTV or HomePod to make the home automations to work through HomeKit, my iPhone can query the values from the Netatmo device just fine.

First I created a shortcut called Check CO2.

Check CO2 shortcut

... and then I had the most awful time when I had to manually add all these entries to be run exactly on the hour to Shortcuts Automations. Dear Apple, I want a cronjob compatible option for defining these, so I could have just done 0 * * * * Check_CO2 or so.

Check CO2 scheduled checks on Shortcuts Automations.

Let's go to Zabbix

 

By now this probably starts to get boring to you, my readers, as I seem to utilise this same Siri & text file methodology too often. But hey, this works! My MacBook reads the text file, parses the numeric value from there and I have my data.

Zabbix item
Here's the item...

 

Item pre-processing
... some preprocessing to snip only the numeric part ...

 

Latest data
... and see, we have our data!

 

Adding dashboards

 

I added the value to be part of the quick glance overview dashboard of mine, of course with the dynamic background widget color.

 

Widget

I also created a full-page dashboard for it:

CO2 dashboard

... and, to demonstrate Grafana's different panels, here's a Grafana dashboard showing the value with different kinds of panels.

Grafana dashboard

Alerting

 

I also added some alerting, so we'll get to know if the air quality is somehow bad even if we would not be at home. We just got our ventilation unit serviced so in theory the air in our house is very fresh. Now we'll see about that through Zabbix.

Zabbix triggers

I have been working at Forcepoint since 2014 and writing this blog is always a breeze of a fresh air as I get to monitor the real world.




Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
Submitted by whatsuphome on