‘Everything is Connected’ – with MQTT.
The attached picture is a screendump from my iPhone. It shows the humidity and the temperature in my workshop. Humidity and temperature are read from a simple DHT21 sensor. This sensor is connected to a ESP-12 board (it also have some relays connected which in turn are connected to a couple of heating elements and a fan to actually provide heating in my workshop during winter time).
The firmware on the ESP-12 communicates via MQTT. I have a (mosquitto) MQTT broker running on a Odroid-C1 in my home. Also on the Odroid-C1 I have a ‘HomeKit to MQTT’ server application running. This application is using github.com/brutella/hc for interfacing to the HomeKit world and Paho MQTT to communicate with my MQTT infrastructure. The data transferred via MQTT is more or less the HomeKit format in JSON. Topics are
based on the IBM Fabric for Sensor Networks.
Firmware for ESP8266 is written in C, the ‘HomeKit to MQTT’ app is written in Go.
Now, there’s quite a lot of code needed to get all this going. It’s all working but fine-tuning is needed here and there.
I’m willing to put it all on github.com if there’s enough interest for it (I’ll have to do some restructuring before I can do that).
So, should it go public?
Note 1: I’m using NetBeans IDE for my work on the ESP8266’s and I have a working build system that is quite diffrent from the Espressif way of doing it.
Note 2: I also have a ESP8266 OTA firmware upgrader server. Using JSON-RPC from development system to the upgrader server for easy deployment of new firmwares. Needs a bit more work 🙂