Hi all.
Firstly, thanks very much for the information provided here!
I’m attempting to collect data from some 433mhz sensors and bring it into HA. I’ve followed the instructions provided in the rtl_433 addon documentation, as well as rtl_433 MQTT auto discovery & mosquito broker.
This seems to have worked somewhat, as when I use MQTT explorer, I see all sensors I know are within range of my device. HA even auto-discovered one of these devices, and I configured it & added it to my lovelace.
But everything stops right there. The data in lovelace as well as MQTT explorer remains the same, even after restarting all addons and “forcing” new data to be sent to MQTT - the lovelace device states “updated (20) seconds ago”, but the data from earlier in the day remains.
This leads me to my second issue - only the first sensor discovered by rtl_433 appears in the HA device discovery page - I have added it, and it appears in my devices list, but after this no other device has been discovered, despite the remaining devices being compatible/decode-able by rtl_433.
I’ve scoured the forums both here & on reddit but to no avail. I’m quite sure this is a very simple issue to fix but after spending a weekend trying to solve it I thought I’d post here.
Thanks in advance.
rtl_433 config file:
output mqtt://localhost:8123,user=user,pass=pass,events=rtl_433[/model][/id]
frequency 433.92M
register_all true
convert si
report_meta newmodel
stop_after_successful_events false
rtl_433 logs:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
/tmp/rtl_433_heredoc: line 20: warning: here-document at line 1 delimited by end-of-file (wanted `EOD')
Starting rtl_433 with rtl_433.conf...
[rtl_433] rtl_433 version 21.12 branch at 202112141644 inputs file rtl_tcp RTL-SDR
[rtl_433] Use -h for usage help and see https://triq.org/ for documentation.
[rtl_433] Publishing MQTT data to localhost port 8123
[rtl_433] Publishing events info to MQTT topic "rtl_433[/model][/id]".
[rtl_433]
[rtl_433] New defaults active, use "-Y classic -s 250k" for the old defaults!
[rtl_433]
[rtl_433]
[rtl_433] Use -G for testing only. Enable with -G 4 if you really mean it.
[rtl_433]
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
rtl_433 MQTT Auto Discovery logs: (“Nexus-TH-1-116” is the device which WAS auto-discovered, but no longer updates)
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
mqtt found in this Home Assistance instance.
Starting rtl_433_mqtt_hass.py...
MQTT connected: Connection Accepted.
homeassistant/sensor/Nexus-TH-1-116/Nexus-TH-1-116-UTC/config : {"device_class": "timestamp", "name": "Nexus-TH-1-116-UTC", "icon": "mdi:clock-in", "state_topic": "rtl_433/17069798-rtl433/devices/Nexus-TH/1/116/time", "unique_id": "Nexus-TH-1-116-UTC", "device": {"identifiers": "Nexus-TH-1-116", "name": "Nexus-TH-1-116", "model": "Nexus-TH", "manufacturer": "rtl_433"}, "force_update": "true"}
homeassistant/sensor/Nexus-TH-1-116/Nexus-TH-1-116-B/config : {"device_class": "battery", "name": "Nexus-TH-1-116-B", "unit_of_measurement": "%", "value_template": "{{ float(value|int) * 99 + 1 }}", "state_topic": "rtl_433/17069798-rtl433/devices/Nexus-TH/1/116/battery_ok", "unique_id": "Nexus-TH-1-116-B", "device": {"identifiers": "Nexus-TH-1-116", "name": "Nexus-TH-1-116", "model": "Nexus-TH", "manufacturer": "rtl_433"}, "force_update": "true"}
homeassistant/sensor/Nexus-TH-1-116/Nexus-TH-1-116-T/config : {"device_class": "temperature", "name": "Nexus-TH-1-116-T", "unit_of_measurement": "\u00b0C", "value_template": "{{ value|float }}", "state_topic": "rtl_433/17069798-rtl433/devices/Nexus-TH/1/116/temperature_C", "unique_id": "Nexus-TH-1-116-T", "device": {"identifiers": "Nexus-TH-1-116", "name": "Nexus-TH-1-116", "model": "Nexus-TH", "manufacturer": "rtl_433"}, "force_update": "true"}
homeassistant/sensor/Nexus-TH-1-116/Nexus-TH-1-116-H/config : {"device_class": "humidity", "name": "Nexus-TH-1-116-H", "unit_of_measurement": "%", "value_template": "{{ value|float }}", "state_topic": "rtl_433/17069798-rtl433/devices/Nexus-TH/1/116/humidity", "unique_id": "Nexus-TH-1-116-H", "device": {"identifiers": "Nexus-TH-1-116", "name": "Nexus-TH-1-116", "model": "Nexus-TH", "manufacturer": "rtl_433"}, "force_update": "true"}
Published Nexus-TH/1/116: time, battery_ok, temperature_C, humidity
Mosquito Broker Config:
certfile: fullchain.pem
customize:
active: false
folder: mosquitto
keyfile: privkey.pem
logins:
- username: user
password: pass
require_certificate: false
Mosquito Broker logs:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] mosquitto.sh: executing...
[16:00:00] INFO: Setting up user mqtt
[16:00:01] INFO: SSL is not enabled
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] nginx.sh: executing...
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[16:00:02] INFO: Starting NGINX for authentication handling...
[16:00:02] INFO: Starting mosquitto MQTT broker...
1644418802: mosquitto version 1.6.12 starting
1644418802: |-- *** auth-plug: startup
[16:00:03] INFO: Successfully send discovery information to Home Assistant.
[16:00:03] INFO: Successfully send service information to the Supervisor.
1644418802: Config loaded from /etc/mosquitto/mosquitto.conf.
1644418802: Loading plugin: /usr/share/mosquitto/auth-plug.so
1644418802: ├── Username/password checking enabled.
1644418802: ├── TLS-PSK checking enabled.
1644418802: └── Extended authentication not enabled.
1644418802: Opening ipv4 listen socket on port 1883.
1644418802: Opening ipv6 listen socket on port 1883.
1644418802: Opening websockets listen socket on port 1884.
1644418802: Warning: Mosquitto should not be run as root/administrator.
1644418802: mosquitto version 1.6.12 running
1644418802: New connection from 127.0.0.1 on port 1883.
1644418802: Socket error on client <unknown>, disconnecting.
1644418806: New connection from 172.30.33.3 on port 1883.
1644418806: New client connected from 172.30.33.3 as auto-DF6F2E46-52AF-5158-5A77-F89F0DCD9773 (p2, c1, k60, u'addons').
1644418806: New connection from 172.30.32.1 on port 1883.