With this article I am starting a mini-series about how to set up a smart home without spending money on smart electrical wiring, expensive control systems, or cloud-connected devices.
First, a few words about what I mean by a smart and a dumb house. The Czech Wikipedia article on an intelligent house describes a central system, modular infrastructure, automated operation, simple and intuitive control, security, heating optimisation, lighting control, communication, and entertainment.
Uff. That was exactly the kind of house I did not want to build. I started building a dumb house with smart functions instead. A few points are worth challenging:
- The heart of an intelligent house is a central system. A centralised system is often a single point of failure. It is also usually expensive, tied to the selected central platform, and hard to combine with other solutions.
- Control of the whole system is simple and intuitive. That sounds like a product sheet. Many people find even staircase switches hard to understand. Designing a simple user interface is difficult, as ratings of some smart-home mobile apps show.
- All lighting is connected to the central system and linked to user activities. Lighting control is where many smart-home tinkerers start. I deliberately left it out. A switch on the wall is still the most understandable control element, and walking to it is often faster than finding a remote or mobile app.
- An intelligent house enables comfortable communication among household members and takes care of entertainment. Let us stay sober: the house is not what enables people to communicate.
By defining myself against the smart-house ideal, I quickly gained a picture of what my “dumb house” should look like. Above all, the whole solution is as decentralised as possible. Automation elements are independent where possible. This improves robustness: even if I disconnect the whole Ethernet network, I can still switch on lights, raise blinds, and the heating still works. The disadvantage is that planning requires more thought and flexibility is lower.
I completely left out central lighting control. All lights are controlled by ordinary switches, although there are switches in multiple places in rooms. I also use motion sensors in rooms where the light always needs to turn on when someone enters.
On the other hand, the house contains many sensors: temperature sensors, mainly 1-wire DS18B20, humidity sensors, a wind sensor, and an outdoor light sensor. Together they provide a good overview of the current weather and indoor environment. Their connection also conveniently uses Ethernet cabling.
For heating we use floor heating, so because of the system’s inertia it is not practical to change the temperature substantially during the day. A condensing boiler heats to a constant set point and a well-tuned room thermostat does its job more than well. I learned this thanks to the installed thermometers.
During planning I decided on the Jablotron JA-100 electronic security system. Although such a system can be bought cheaper, the JA-100 had a reasonably usable mobile app, a broad range of sensors, relay output control, and especially the JA-121T module for connecting it to home automation. The security system is relatively standard. Besides motion sensors, Jablotron monitors perimeter door openings and connects fire sensors. Access rights are set so that home automation cannot access security functions. It can read the state of the control panel and sensors and control relay outputs, but it cannot change arming of individual sections.
The last subsystem I was clear about from the beginning was the external window blinds. They are connected to central commands for raising and lowering blinds across the house. Central control is available through wall buttons and also through Jablotron PG outputs, meaning relays on a DIN rail.
That describes the smartly built dumb house. Add two Raspberry Pis and several NodeMCU boards running MicroPython. Most of the code running on them is in Python. The advantage of programming your own house is that you do it for yourself: you can write ugly code if you want, try a new technology if you need it, and write as much or as little documentation as you can remember. In all cases, it is fun. Treat code shown in the following parts as inspiration; another solution always exists.
Finally, the problems my automation solves and topics I would like to return to:
- Measuring temperature with 1-wire thermometers and sending values to Google Spreadsheet via Google Forms.
- Connecting the Jablotron JA-100 panel to software using JA-121T and a USB-RS485 converter.
- Node-RED, MQTT, and sending phone notifications through Google Hangouts.
- Wind sensor and sun automation for blinds built on NodeMCU and a hacked Somfy sensor.
- Electrical wiring for external blinds using Alnic CCU-223 units.
- Programming NodeMCU microcontrollers in MicroPython, flashing them, and a general programme skeleton with Wi-Fi and MQTT connection.