A Docker container that bridges RTL_433 radio frequency data to Home Assistant via MQTT with automatic device discovery.
This bridge listens to RTL_433 MQTT messages and automatically creates Home Assistant device configurations for supported sensors. It eliminates the need for manual sensor configuration by using Home Assistant's MQTT discovery feature.
- π Automatic Home Assistant device discovery
- π³ Docker containerized for easy deployment
- π Security-focused with non-root user and read-only filesystem
- π Configurable logging and monitoring
- π Support for external MQTT brokers
- π§ Flexible configuration via environment variables
- π‘ Support for TLS/SSL connections
- Create a
.envfile with your MQTT broker details:
MQTT_HOST=your-mqtt-broker.local
MQTT_USERNAME=your-username
MQTT_PASSWORD=your-password- Start the container:
docker compose up -ddocker run -d \
--name rtl433-hass-bridge \
--restart unless-stopped \
-e MQTT_HOST=your-mqtt-broker.local \
-e MQTT_USERNAME=your-username \
-e MQTT_PASSWORD=your-password \
bullitt168/rtl433-hass-bridge:latest| Variable | Description | Example |
|---|---|---|
MQTT_HOST |
MQTT broker hostname/IP | 192.168.1.100 |
| Variable | Default | Description |
|---|---|---|
MQTT_PORT |
1883 |
MQTT broker port |
MQTT_USERNAME |
MQTT username | |
MQTT_PASSWORD |
MQTT password | |
MQTT_CA_CERT |
Path to CA certificate for TLS | |
MQTT_CERT |
Path to client certificate for TLS | |
MQTT_KEY |
Path to client private key for TLS |
| Variable | Default | Description |
|---|---|---|
RTL_TOPIC |
rtl_433/+/events |
MQTT topic to subscribe to for RTL_433 data |
DEVICE_TOPIC_SUFFIX |
devices[/type][/model][/subtype][/channel][/id] |
Topic structure for device data |
| Variable | Default | Description |
|---|---|---|
DISCOVERY_PREFIX |
homeassistant |
Home Assistant MQTT discovery prefix |
DISCOVERY_INTERVAL |
600 |
Device discovery interval in seconds |
EXPIRE_AFTER |
Device expiration time in seconds | |
FORCE_UPDATE |
false |
Force entity updates even if value unchanged |
RETAIN |
true |
Retain MQTT discovery messages |
| Variable | Default | Description |
|---|---|---|
DEVICE_IDS |
Space-separated list of device IDs to include | |
DEBUG |
false |
Enable debug logging |
QUIET |
false |
Reduce log output |
TZ |
UTC |
Container timezone |
For secure MQTT connections, mount your certificates and configure the paths:
services:
rtl433-bridge:
image: bullitt168/rtl433-hass-bridge:latest
volumes:
- ./certs:/certs:ro
environment:
- MQTT_CA_CERT=/certs/ca.crt
- MQTT_CERT=/certs/client.crt
- MQTT_KEY=/certs/client.key- Docker
- Git
# Build locally
./build.sh
# Build and push to Docker Hub
./build.sh -p --dockerhub -n yourusername/rtl433-hass-bridge
# Build with custom tag
./build.sh -t v1.0.0| Flag | Description |
|---|---|
-n, --name |
Docker image name |
-t, --tag |
Docker image tag |
-p, --push |
Push to registry after build |
--dockerhub |
Use Docker Hub registry |
-r, --registry |
Custom registry URL |
The container includes a health check that monitors the Python process:
- Interval: 60 seconds
- Timeout: 10 seconds
- Retries: 3
- Start Period: 30 seconds
Container logs are available via Docker:
docker logs rtl433-hass-bridgePersistent logs can be accessed via the mounted volume:
docker exec rtl433-hass-bridge ls /app/logs-
Container exits immediately
- Check that
MQTT_HOSTis set - Verify MQTT broker is accessible
- Check container logs for error messages
- Check that
-
No devices appearing in Home Assistant
- Verify RTL_433 is publishing to the correct MQTT topic
- Check Home Assistant MQTT integration is configured
- Ensure discovery prefix matches Home Assistant configuration
-
Connection refused
- Verify MQTT broker hostname/IP is correct
- Check firewall settings
- Ensure MQTT broker is running and accessible
Enable debug logging for detailed troubleshooting:
docker run -e DEBUG=true bullitt168/rtl433-hass-bridge:latestThis project is licensed under the GPL-2.0 License - see the original RTL_433 project for details.
Based on the rtl_433_mqtt_hass.py script from the RTL_433 project.
- Fork the repository
- Create a feature branch
- Make your changes
- Test with your setup
- Submit a pull request