Table of Contents

Home Automation

Background

This is my first foray into Home Automation (if you exclude fitting PIR sensors to stairwells, toilets etc), so I've attempted to explain the terms and protocols I've encountered and sometimes found confusing. It's an opinionated sort of blog too, there are two broad approaches to HA, one of these is the Right Way and the other is the Wrong Way, if you don't like my approach, there are plenty of other articles detailing how to do it the Wrong Way.

The Wrong Way

The Right Way

Your devices should do what you tell them to do, no one else should have any part in this. They should carry on working even if there is an internet outage, and they should carry on working for as long as you want them to, not be limited by support from the vendor.

How to achieve this (I've listed some software which helps me do this in the next section):-

  1. Central to almost all HA setups is an MQTT broker service, more of this below. It can run on a Raspberry Pi single board computer along with other software, or it can run in a Docker container.
  2. Sensors, your system needs data to work on, this could include temperature sensors for each room and either an external sensor or API feed for the external weather, it could include motion sensors (PIR) to detect movement to control lighting, or presence detectors to inform the control system when someone who should be in the house, actually is.
  3. Control software - your system needs logic to understand the sensor readings and convert the raw data to actionable data, eg. if it is colder than X degrees in a room and there is someone in it, tell the radiator controls to turn the heat up. But even if the room is unoccupied, maintain at least Y deg during certain hours but also at all times, ensure that the temperature is greater then Z deg for frost protection. If the temperature falls below the set limits, fire off an alert email etc.
  4. Actuators, these could be remote controlled radiator valves, or lights or sockets which have a device plugged in to them.

References

  1. MQTT (MQTT broker service ) - the most widely used broker (or server) seems to be Mosquitto (https://mosquitto.org/)
  2. Sensors, see Tuya / Tasmota section below
  3. Control Software - Node Red (https://nodered.org/) (Node Red info)
  4. Actuators - see Tuya below

Tuya / Tasmota

On my initial reading up on HA, I found some confusion between Tasmota / Tuya and took a little while to work it out. Quite simple really, Tuya is a Chinese company who produce a vast array of HA related devices and many of these are rebadged by resellers, eg. Lidl. These devices run Tuya's firmware which wants to talk out to their servers. As these devices all seem to ha have serial port solder pads (Jtag or similar) it has been possible to reflash these with custom firmware which talks mqtt locally. The leading project who have written such open source code is Tasmota.

Although most of the time you will have to reflash items yourself, some companies such as “athom” (on Ali Express) ship devices which is already running Tasmota firmware, so no flashing is required.

https://siytek.com/how-to-flash-tasmota-the-easy-way/

Jottings - Tasmota crib sheet

SR-201 - Ethernet controlled relay module interface:- SR201 network controlled module

This article sums up all my concerns about buying in to someone elses whatever and not controlling it.

https://gizmodo.com/in-2030-you-wont-own-any-gadgets-1847176540

This page has been accessed:-
Today: 1
Yesterday: 1
Until now: 724