For over 10 years I used the Perl based Misterhouse package for controlling everything, it was heavily modified over the years to improve it visually and functionally but over the last couple of years I have built my own system using Node-RED and MQTT as the back end and have written a new web based control interface taking a few visual design cues from Misterhouse along the way.
For manual control as opposed to automated events voice control is being increasingly used but the web interface still forms one of the main day to day interfaces to the system, running in full screen browsers on several O2 Jogglers, Raspberry Pi Displays and Android tablets as well as being accessible from inside or outside the house on any PC, phone or tablet.
On arriving home the audio amplifier turns on and welcome me audibly with speech output as well as visually on an LED matrix sign, turning lights on if it is dark. On leaving the house all lights and appliances are turned off and various notifications change to alert me on my phone and watch instead or audibly and visually within the house.
A ‘going to bed mode’ turns all the ground floor lights and appliances off and turns on the stairs and main bedroom bedside light, a few minutes later the stairs lights turn off and when I manually turn the bedside lights off the system knows I am in bed and I will only be disturbed by urgent notifications.
Based on the status of the system (home, away or bed mode) various sequences of events will occur such as turning lights on and off. When the house is occupied PIRs in several areas will turn lights on when detecting movement if it is dark and the heater by my desk will maintain the temperature at a comfortable level if I am present.
In the morning it turns my bedside light on in an attempt to wake me up gradually and then a couple of minutes later I get a voice message telling me what time it is, what the external temperature is and the current weather, the Radio 4 is turned on. If it is very cold it wakes me up 10 minutes earlier to give me extra time get ready and to de-ice the car if required. The coffee machine in the kitchen is also turned on so I have fresh coffee ready when I get downstairs and if I still haven’t surfaced a few minutes after that a Star Trek red alert sounds to tell me it really is time to get out of bed now.
I can also schedule events by creating an event in a dedicated “Home Control” Google calendar which makes a nice easy way to schedule things from any device and caters for one off events or repeating events. This is done by creating an event with an MQTT topic and message, eg. creating an event of “lights/kitchen,on” will turn the kitchen lights on at the event time.
The system also provides notifications if the fridge door has been left open, if power usage is outside the normal range, if rain is expected or if the nearby River Mersey is higher than normal or if there are any flood alerts in place. It will also tell me when the next International Space Station pass is due and when it is overhead.
I get notifications of calls on the landline, if someone is at the front door, if the letterbox has been opened, if there is movement detected at the rear of the house when there shouldn’t be and if the fridge door has been left open. Exactly how the notification appears depends on the home/away/bed status of the house and where I am, it could be verbally through speech notifications and visually through displays if I am at home or via my smartwatch or phone if I’m not.
Here are some screenshots from my web interface system:
The server and network
This is much simpler than it used to be, the network is a mix of GigE, 100 Mbit/s wired & 802.11b/g/n/ac Wi-Fi and the home automation server itself is nothing fancy, currently a 3.2GHz dual core Pentium E5800 with 4GB RAM running Debian GNU/Linux. A couple of RAID NAS boxes handle media storage and on site backups with off site backups of important things done to a remote box over the net.
The router is a TP-Link Archer C7 running DD-WRT connected to an Openreach fibre modem. I don’t use the built in Wi-Fi on router, instead I use a Ubiquiti UniFi AP AC to provide a private network and a guest network for any untrusted devices that come into the house such as those infected Windows laptops people keep bringing for me to fix!
The backbone of the system is MQTT, I run two brokers, both Mosquitto, one is internal only and is set up without security which makes things easier for small embedded devices. The second is on a VPS and is exposed to this internet, this one has security and SSL enabled, this second broker is used for any Internet connected devices such as Owntracks running on my phone. The two brokers use MQTT bridging to link topics together.