Home Automation without a Cloud

December 22nd, 2023

There are plenty smart home devices offering virtually any function you may dream of, however the things get complicated if you are not necessarily keen on creating an account for each single gadget and sharing your life with unknown clouds.

My first requirement was to find electric plugs able to measure voltage and consumption (doesn't matter if expressed as a current, power or energy). A few years ago I was quite happy with TP-Link HS110. They are easy to decouple from the cloud and the communication protocol was easy to implement thanks to softScheck's reverse engineering. There is no access protection implemented, so they need to be operated in a separated network. Surprisingly, they deliver quite precise measurements. Unfortunately, not available anymore.

Basically, in order to avoid effort with reverse-engineering and still reach the goal, two standards could be considered: Tasmota, an open-source firmware for ESP-based devices and Zigbee. Both having their disadvantages:

For the time being, I'm testing both technologies with these devices:

RaspBee Zigbee Gateway

First approach was to control Zigbee devices via a gateway developed for Raspberry Pi, a product of dresden elektronik. The RaspBee dongle has deRFmega256 chip onboard. It communicates via serial line with the Raspberry Pi.

Software installation:

Application is available under Programming > deCONZ in the Raspbian menu.

For a programmatic access:

Short summary:

Zigbee2MQTT

A much better option, as I think, is the well-known zigbee2mqtt. However, it must be clear, it is just a bridge between the Zigbee protocol and the MQTT queues. Still, it provides a simple web interface for configuring and updating devices. There is no bridge function inside.

For MQTT install mosquitto:

sudo apt install mosquitto mosquitto-clients 
sudo nano /etc/mosquitto/conf.d/your-configuration.conf
sudo systemctl enable mosquitto
sudo systemctl start mosquitto

your-configuration.conf (listen to 0.0.0.0; anonymous is a setting of the listener - the order matters):

listener 1883
allow_anonymous true

A Short Cheat-Sheet

Sonoff ZBDongle-P

It's another gateway for the Zigbee network. It's based on the TI CC2652P chip.

Firmware upgrade:


Next: Processing emails using IMAP and Thunderbird files

Previous: Understanding the internal design of a TK-905-4G

Main Menu