The less Python coding I do, the more efficient and reliable solution I can produce ๐ I converted my Raspberry Pi to a dedicated Home Assistant server and this helped me solving a real problem without writing a single line of Python code.
The problem: my family house has rooms facing both to East and South served by the same heating pump. The East-facing room is better insulated than the South-facing one and also has a larger radiator, thus on cold and cloudy days the South-facing room cools down much faster than the other, while on sunny days it gets warmer much faster. Therefore a single room thermostat cannot make justice: one of the rooms often remains underheated, cold. I was looking for a solution that turns on the heating pump if any of the rooms gets too cold, but prevents the rooms to become overheated on some other cases.Obviously there are off-the-shelf smart home systems that provide solution to this problem, but our house was built decades before the smart home boom. Furthermore being cost conscious I wanted to repurpose the gadgets purchased for my previous challenges and tried to minimize the need for any subscription fee for cloud services.
The DIY smart heating system described below is actually a follow-up of my previous challenges and perhaps also the first step of a long journey towards transforming our 20th century built house to a 21st century smart home.
- The freely available Home Assistant platform was installed to the Raspberry Pi as a dedicated server because this provides the highest level of availability and also because this configuration of Home Assistant allows access to some useful add-ons.
- One of these add-ons made it possible to integrate the Tuya Smart Life compatible smart plug without actually accessing the Tuya cloud, ie. keeping everything local.
- The room temperature is reported to the Home Assistant server by Sonoff SNZB-02 Zigbee sensors.
- The heating programs are actually Home Assistant automation scripts that can be created in a visual interface without writing a single line of program code. So far I created only two scripts for my smart heating, one for each of my heating programs.
- Additional automations were created to send/receive MQTT messages to the HiveMQ Cloud which is an MQTT broker service with a generious freemium price plan. The free cluster allows 10GB data transfer per month that is more than enough for such DIY projects.
- There are plenty of mobile MQTT client apps both for Android and iOS. I found SNR Lab's IoT MQTT Panel the most handy, not only because its free version provides all the features I need in an excellent UI, but also because it can easily handle HiveMQ's SSL certificate.