Pushing sensor metrics to Influxdb with ESP8266

Fri 23 June 2017 // posts

It is summer time!
Our weather is great here in Portugal and as such, I am moving the plants I had in a growtent for more than a year, to an exterior greenhouse. I used to actively control most elements inside the growtent such as light, temperature, wind and humidity but now I am letting nature do that for me :) Despite the fact I'm no longer in control, I still want to monitor sensor metrics...


The biggest challenge is powering the sensors without wall outlets at my disposal. I'm not stepping into details about that in this post but there are some candidates available such as an arduino with a wireless module, raspberry pi, esp8266, etc. I have chosen the ESP8266 because it is cheap (very!), easily programmable, has integrated wifi and, more importantly, deep sleep abilities, great for power savings!


The ESP8266 has sensors connected to it (only a DHT22 at the moment) and is battery powered. When it wakes up, it reads sensor data, connects to a wireless network, pushes metrics to an influxdb server using its HTTP API and goes back to deep sleep for X seconds.

Want to build one?

Get the code and instructions on github