In the latest issue of HackSpace magazine I read an article about how to set up your smarthome using the TICK stack. The TICK Stack includes InfluxDB (a time series database), Kapacitor (a complex data processing engine), Chronograf (a graphical user interface to both Kapacitor and InfluxDB) and Telegraf (the link between the machine it’s installed on and InfluxDB).
Since I had a Raspberry Pi without a cause laying around and was thinking how to move my somewhat buggy Domoticz envorinment to a more stable one, without losing historrical data I decide to give TICK a try.
Setting up the Pi and the TICK stack was a breeze follwoing the directions in the article, so I soon had a working environment, monitoring the resources of the Pi itself. Then I configured Domoticz to forward the most important measurements (Energy, Gas, Temperature, Humidity) to InfluxDB.
Because I did want something to look at, I also installed Grafana, an open source project that allows you to create dashboards, just like Chronograf, but not only for InfluxDB.
Using Grafana looking at the InfluxDB for domoticz I created three dashbaords. The first one informs me about the energy usage, based on the data from my smart meter. Every 10 seconds it tells InfluxDB the current Energy usage and every hour the Gas usage. Expeccialy the energy usage could hopefully enable me to do some power disaggregation later on.
The second dashboard shows the temperature and humidity of all sensors inside and outside the house. This way I can see for example whether it makes sense to open the windows on a hot day and whether I should water the plants in the front yard.
The third dashboard shows me the weather conditions, such as outside temperature, humidity, air pressure, wind speed and wind direction. Because you can use the same data in multiple dashboards, there is a small overlap here with the previous dashboard. I also use the outside temperature on the Energy dashbaord to see the relationship with the gas consumed.
Since I have a lot off historical data about my (daily) energy uses I’ve export that data out of Domoticz and mangled it into a format InfluxDB can handle. This way I always have my history avaialable, even if I decide to switch smart home controller, or need to reinstall Domoticz for some reason.
Off course I can use multiple systems to send data to InfluxDB. Domoticz was the easiest since it already had a way to configure that, but I can also decide to hook up sesnors directly to my new platform if I want to. I want to look at the option to uses MQTT as a transport mechanisme to feed data into InfluxDB, so I have a single entry point to which I can connect multiple systems and sensors.