Elektor_Mag_-_January-February_2021

([email protected]) #1
lektor January & February 2021 31

So there you have it: all the measurements of your 433.92 MHz
sensors are sent to your MQTT broker, and you can subscribe to
their topics in your Python scripts or your other home automa-
tion software.


Summary and further exploration
Wireless devices in the 433.92 MHz frequency band are very popular
in the DIY community and they are cheap and easy to find in a lot of
places. Especially interesting are temperature and humidity sensors
that you can use to monitor your fridge, freezer, or greenhouse.


All you need to read these sensors is a cheap DVB dongle and an
antenna. The rtl_433 program supports more than 150 protocols
of 433.92 MHz devices and lets you relay the received signals as
messages to your MQTT broker, so your other home automation
software can act upon them.


There are still a lot of interesting topics I barely touched, such as
the optimal antenna choice and placement for better coverage. It’s
also an exciting exercise to try to add support for an unsupported
device to rtl_433. The project has detailed documentation about
how you capture the raw signals and how you should try to reverse
engineer the protocol.


You can also try other receivers, for instance, the RFXtrx family of
devices, which even includes a transceiver that lets you control
Somfy RTS roller shutters. There’s even a Python library, pyRFX-
trx (https://github.com/Danielhiversen/pyRFXtrx), to communicate
with your 433.92 MHz devices using a RFXtrx transceiver. Home
Assistant (see Chapter 10) is using this library for its support of
433.92 MHz devices. However, the RFXtrx transceiver costs a lot
more than a RTL-SDR.


At the other end of the price spectrum, if you want to try what you
can do with the cheapest possible equipment, the STX882 trans-
mitter and SRX887 receiver are good places to start.
200534-01


[1] Elektor RTL-SDR kit with antennas, mounts and extension cable:
http://www.elektor.com/rtl-sdr-software-defined-radio-with-dipole-antenna-kit
[2] Using a dipole antenna kit on the RTL-SDR: http://www.rtl-sdr.com/using-our-new-dipole-antenna-kit/
[3] Right before this book was finished, the developer announced that he wouldn’t actively develop this Docker image (which has more
than 100,000 pulls) anymore, so there will be no new features. It remains to be seen if another image becomes popular.
But even if you need to find another one, you should only need some minor changes to use it: the main configuration file of rtl_433
stays the same.

LINKS & LITERATURE

CONTROL YOUR HOME
WITH RASPBERRY PI
This book shows you how you
can automate your home with a
Raspberry Pi. You’ll learn how to
use various wireless protocols for
home automation, such as Bluetooth,
433.92 MHz radio waves, Z-Wave,
and Zigbee. Soon you’ll automate
your home with Python, Node-RED, and Home Assistant, and
you’ll even be able to speak to your home automation system.
All this is done securely, with a modular system, completely
open-source, without relying on third-party services. You’re in
control of your home, and no one else.

At the end of the book, you can install and configure your
Raspberry Pi as a highly flexible home automation gateway for
protocols of your choice, and link various services with MQTT
to make it your own system.

> Turn your Raspberry Pi into a reliable gateway for various
home automation protocols.
> Make your home automation setup reproducible with Docker
Compose.
> Secure all your network communication with TLS.
> Create a video surveillance system for your home.
> Automate your home with Python, Node-RED,
Home Assistant and AppDaemon.
> Securely access your home automation dashboard from
remote locations.
> Use fully offline voice commands in your own language.

The software and errata for the book are available on on GitHub.
https://github.com/koenvervloesem/
raspberry-pi-home-automation

> Hard copy:
http://www.elektor.com/control-your-home-with-raspberry-pi

> e-Book:
http://www.elektor.com/control-your-home-with-raspberry-pi-e-book

Questions or Comments?
If you have any questions regarding this article, feel free to
contact the author by email at [email protected].

Contributors
Author: Koen Vervloesem
Illustrations: Koen Vervloesem

Editor: Jan Buiting
Layout: Giel Dols
Free download pdf