hardware-radiofrecuencia-rf-433mhz-868mhz-domotica

Radio Frequency Devices at 433 and 868 MHz in Home Automation

  • 7 min

Sub-GHz radio frequency devices are simple wireless equipment that transmits small signals in bands like 433 and 868 MHz.

Modern protocols dominate the current landscape (WiFi, Bluetooth, Zigbee, and Matter). However, if we want to build a truly comprehensive home automation system, we cannot ignore the absolute veterans of wireless communication: RF devices operating in sub-GHz bands, very simple, cheap, and surprisingly useful solutions for transmitting signals over distances.

We’re talking about classic garage remotes, balcony weather stations, older roller shutter motors, wireless doorbells, and cheap alarm sensors. These devices have been around for decades and offer good range and very low power consumption in simple applications.

These devices have been with us for decades and, although they don’t have the “glamour” of modern protocols, they offer physical characteristics of penetration and power consumption that make them extremely useful in our deployment.

Let’s analyze technically how they operate in the 433 MHz and 868 MHz bands, what their architectural limitations are, and most importantly, how we can capture and reproduce their signals to integrate them locally into Home Assistant.

The 433 and 868 MHz Bands

These devices use short-range ISM or SRD bands available without individual licenses. This doesn’t mean we can transmit in any way: each region imposes limits on power, occupancy, and duty cycle.

In Europe and much of the world, we will mainly encounter two frequencies in the domestic environment:

  1. 433.92 MHz: This is the “wild west” of radio frequency. It is extremely saturated. Almost any cheap wireless device you buy on AliExpress (door sensors, remotes, doorbells) transmits here.
  2. 868 MHz: This is a much cleaner and more regulated band. In Europe, regulations impose strict restrictions on the duty cycle (the maximum time a device can be transmitting). With less continuous “noise” in the air, it is typically used for systems requiring greater reliability, such as professional intrusion alarms and wireless radiator valves.

At the level of wave physics, by using much lower frequencies than the 2.4 GHz of WiFi or Zigbee, the wavelength is longer. This results in a significantly superior ability to penetrate obstacles (walls, floors) and a range that can easily exceed 50 or 100 meters in open field.

How They Communicate: OOK and the State Problem

To understand why these devices are so cheap and their batteries last for years, we need to look at their electronics. The vast majority use extremely simple modulation techniques, such as ASK (Amplitude Shift Keying) or its variant OOK (On-Off Keying).

Basically, the transmitter “turns the carrier wave on and off” to send zeros and ones. It’s the radio equivalent of making smoke signals or using Morse code with a flashlight.

Fixed Code vs. Rolling Code

The data frame they send is usually an identifier code. Here we find two variants that will determine whether we can integrate them easily or not:

  • Fixed Code: The device always sends the same string of zeros and ones. For example, a door sensor sends 11001010 every time it opens. It is trivial to intercept, clone, and simulate.
  • Rolling Code: Used in garage remotes or alarms (e.g., the KeeLoq algorithm). Each time you press the button, the code changes based on a cryptographic seed synchronized with the receiver. Integrating this into Home Assistant is much more complex and often requires specific hardware from the manufacturer, as we cannot simply “copy and repeat” the signal.

The Major Drawback: Unidirectional Communication

Here lies one of the biggest weaknesses of many cheap RF devices compared to Zigbee or WiFi. Their communication, especially in simple 433 MHz equipment, is usually unidirectional.

The device “shouts” its code into the air and goes back to sleep to save battery. There is no acknowledgment (ACK). The transmitter doesn’t know if the receiver heard the message.

For home automation, this presents a state synchronization challenge: If we use Home Assistant to send the “turn on” command via RF to a smart plug, and the plug doesn’t receive it due to interference, Home Assistant will display the plug as turned on in the interface, even though it is physically still off. There is no way to query its actual state.

How to Integrate them into Home Assistant

Since a server (a Mini PC or Raspberry Pi) doesn’t have built-in 433/868 MHz antennas, we need a Gateway or Bridge that listens for radio waves, decodes the message, and passes it to Home Assistant (usually over the WiFi network using the MQTT protocol).

We have three main ways to achieve this in a maker environment:

Commercial Bridges

There are commercial devices like the Sonoff RF Bridge 433 or the infrared/RF transmitters from Broadlink (like the RM4 Pro). Out of the box, these devices force us to use the manufacturer’s app (and their cloud). However, the Sonoff RF Bridge is very popular in the community because we can flash it with Tasmota or ESPHome.

By installing Tasmota and a secondary firmware called Portisch on the Sonoff RF Bridge’s decoder chip, we get a 100% local device capable of intercepting fixed codes and sending them to our MQTT broker in real time.

ESP8266 or ESP32 with an RF Module

If we want to save money and have absolute control, we can build our own bridge. We only need an ESP32 board and a couple of radio frequency modules costing a few euros (like the RXB6 or SRX882 receiver and the FS1000A transmitter).

By compiling an open-source project like OpenMQTTGateway or using ESPHome, we can connect the data pins of the RF modules to the ESP32. The software will handle sampling the signal, decoding the protocol, and publishing the payload directly to Home Assistant.

Software Defined Radio (SDR)

This is by far the most powerful tool for a system integrator. It involves using a RTL-SDR USB dongle (originally cheap DVB-T tuners based on the RTL2832U chip) connected directly to the machine hosting Home Assistant.

Using a spectacular Add-on called rtl_433, we turn our server into a universal broadband radio receiver. rtl_433 is capable of demodulating and decoding hundreds of commercial sensor protocols simultaneously in real time.

It is a very flexible option for receiving data from weather stations, TPMS sensors, or compatible meters that transmit on the supported bands. Its use should be limited to our own signals or data we are entitled to receive.

The Antenna Matters More Than It Seems

In sub-GHz RF, the antenna is not just a decoration. A bad antenna turns a promising system into a lottery, and a decent antenna can multiply the range without touching a single line of configuration.

For 433 MHz, a quarter-wave antenna is around 17.3 cm. For 868 MHz, it drops to about 8.6 cm. You don’t need to start building laboratory antennas, but it is advisable to avoid modules with a randomly coiled cable and place them away from sources of electrical noise.

If you are going to listen to RF sensors with rtl_433, place the USB dongle with an extension cable and the antenna in a clear area. Exactly like with Zigbee, moving the radio away from the server usually improves reception significantly.

Due to the lack of acknowledgment and the weakness of fixed codes, we should not use these devices for locks, real alarms, or actuators whose status we need to know reliably.