Paulus Schoutsen has come out with a project where home assistant will keep track of historical values and allows to integrate it into automation. Here, with the help of ESP8266, one can report the temperature and humidity to MQTT, where the home assistant can pick it up. ESP8266 is a $5 chip that includes Wi-Fi and is compatible with Arduino, which will enable to do all your DIY projects for a fraction of the price.
Figure 1: Reporting temperature with ESP8266
The components required for this project are purchased from Adafruit including Adafruit HUZZAH ESP8266 Breakout for assembly instruction, Adafruit HDC1008 Temperature & Humidity Sensor Breakout Board for assembly instructions and MQTT server. Apart from this, some usual hardware prototype equipment is needed including a breadboard, some wires, soldering iron and wire along with serial USB cable.
Some connections are established on the breadboard from ESP8266 to the HDC1008 and IDE is prepared by installing and preparing Arduino IDE for ESP8266 development. After installation, certain libraries are installed from Arduino IDE. Now, the sketch is prepared and is pasted to the Arduino IDE and uploaded. The output from the device can be seen by opening the serial monitor.
The sketch connects to Wi-Fi network and MQTT broker that reads the temperature and humidity from the sensor every second. Everything will reported to the MQTT server if the difference is > 1 since last reported value. Anyone connecting to the MQTT topic will automatically be informed about the last report.The final step is to integrate the sensor values into Home Assistant by setting up Home Assistant to the MQTT broker and subscribe to the sensor topics.
The video demonstration along with codes and details of the project is available on the following website:
Filed Under: Reviews
Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.