rtl_433 on FreeBSD - quick report

I have been using rtl_433 to for years to get data from 433 MHz sensors (mainly temperature and / or moisture) into Home Assistant. It does so by sending the sensor data to a mqtt server (running on the same machine as Home Assistant). Both have always been running on small SBCs. The Home Assistant installation on a Banana Pi running armbian, the rtl_433 installation on a Raspberry Pi 3B+ running Raspbian / Debian.

Recently I noticed that the comms/rtl-433 port exists. So I decided to reinstall the Pi 3B+ with FreeBSD, and see if I could make the rtl_433 package work.
I wrote a FreeBSD 14.4-release image to a microSD card and booted that on the Pi. Then I upgraded to FreeBSD 14.4-release-p5 using freebsd-update. FreeBSD works fine on this machine, even if there are some negative messages in dmesg output
Code:
May 25 17:22:01 rtl3 kernel: clk_fixed2: clock-fixed has no clock-frequency

May 25 17:22:01 rtl3 kernel: regfix0: Cannot configure GPIO pin: 5
May 25 17:22:01 rtl3 kernel: REGNODE_INIT failed: 6
May 25 17:22:01 rtl3 kernel: regfix0: Cannot register regulator.
I am using the wired ethernet, which works fine.
Next up, I installed the rtl-433 package
Code:
root@rtl3:~ # pkg info rtl-433\*
rtl-433-25.12
I also installed net/mosquitto, having a mqtt client available makes it easier to see which sensors show up and which ones do not (due to a empty battery for example):
Code:
root@rtl3:~ # pkg info mosq\*
mosquitto-2.1.2_2

To test the rtl-433 port, I ran it manually, like this
Code:
rtl_433 -R 3 -R 18 -R 19 -R 33 -R 52 -M utc -F json -C si
Since I have been running this for many years now, I knew which protocols I needed (the -R nn arguments), and this just dumps the sensor data received to standard output.

I set up /usr/local/etc/rtl_433/rtl_433.conf and tried to use the /usr/local/etc/rc.d/rtl_433 service script that came with the package. For some reason, rtl_433 would not pass on any sensor data when I did that.

So for now, I just start rtl_433 manually, like so
Code:
rtl_433 -R 3 -R 18 -R 19 -R 33 -R 52 -F "mqtt://server.local:1883,user=username,pass=password,retain=0" -M utc
with the proper values for "server", username and password.
rtl_433 has a python helper script for Home Assistant, posts metadata about sensors to the mqtt server at intervals, this helps Home Assistant to pick up the sensors more quickly. The rtl-433 package doesn't have this script, so I just cloned the rtl_433 repository, installed the necessary dependcies, and starts the script like this
Code:
python3.11 ~/work/rtl_433/examples/rtl_433_mqtt_hass.py -u user -P password -H server.local -q

To look at the sensor data from the mqtt server, I use mosquitto like this
Code:
mosquitto_sub -V mqttv311 -h server.local -u user -P password -t rtl_433/rtl3/events
That's all.
 
Back
Top