Home Automation

Putting this here for now. This needs a lot of updates and future work.


It's fairly simple. The backend is MQTT. The switches publish to the topic /sw/<switch_number>, and the lights listen/publish to /<name>/lights/<number>. The names are four-character strings (because software reasons). The lights are subscribed to various switch topics so that they can operate without OpenHAB.

I also will have an OpenHAB instance running on top of everything that can add different zones and stuff.

Implementation Details

OpenHAB and a mosquitto broker are both running on an Olinuxino-A10-Lime. On either end of the house are two Arduino leonardo ethernet's, one with a scanning input shield and one connected to the LED drivers. The scanning switch shield flips through banks of switch inputs to decide when a switch is pushed. The other arduino is hooked to a bunch of LED driver boards (for the lights) through I2C to control via PCA9635's. All of these are hooked together via ethernet.

I want to add another layer between the switches/lights and the MQTT portion of the system, to increase reliability and reduce possible downtime. As it stands, the lights are completely reliant on the MQTT broker, so if that goes down, no light control. I want to add an ARM-based board with ethernet to handle the MQTT stuff, which would just communicate via UART with the other boards. This is because of issues with system resources, and I want to be able to keep things within an embedded system, which means it's all completely under my control (and there are less moving parts). As well, I want to move off of the Arduino platform (specifically in this project and as a whole).