Tutorial - rtl_433 brings 433MHz sensors to openHAB

I just played around with this stick, put it on a Rpi, and a sensor from my weather station behind a ~50cm wall was not reachable.
Even the base station from the weather station got this signal without any problem.
I do not want to confuse you, I had no deeper look on this as this is a future project only.

I am using the same stick but it receives even lot of sensor reading from my neighbors. So from my impression it is working really good.

What stick are you using?

Iā€™m using this:

and this:

with these antennas:

ā€¦ soldered on MCX connectors:

But the included antennas work quite well for me too. But they are way bulkier ā€¦

Hmm. 50 cm wall may be a hurdle - but if the original receiver worked, then the rtl_sdr should pick up the signal as well ā€¦ try limiting the rtl_433 to listen just to the protocol of your weather sensors and disable all others.

Even with the simple helix antennas linked above, I do have very good signal from my outdoor sensors.

ā€¦ exactly my experience too with the rtl_sdr here :wink:

Edit: Add some pictures of the used antenna:


I think I did this already, but will check at weekend, if I find some time hopefully.

Found this post about antennaĀ“s Might be usefull if having problems.

1 Like

This one also:

Any good tutorial how to install rtl_433 ? I find it very unclear :frowning:

Have you seen this?

I think I have read almost everything about this rtl stuff, which may have been a mistake, cause I find it highly confusingā€¦ When reading about the installation, they mention a Make. Thats where IĀ“m lostā€¦ IĀ“m no good at Linux at all which probably is the cause of my confusionsā€¦ :frowning:
Btw IĀ“m running openhabian on a Rpi with openhab 2.5m2.

I see - no worries :wink:
There are two options:

Option 1: Install it from your Linux distributionā€™s repository

You can try to install from your Linux repository, e.g. for Debian:

apt-get install rtl-433

If this installs a reasonable recent version of rtl_433 - fine. If not, you need to let your Linux compile a fresh rtl_433.

This is not as complicated as it may sound at first :wink:

Option 2: Compile it yourself

Just follow the instructions from the BUILDING.md (exactly!) for you style of Linux - e.g. assuming Debian-like since you mentioned openHABian:

# first install some required libraries and software packages:
sudo apt-get install libtool libusb-1.0-0-dev librtlsdr-dev rtl-sdr build-essential autoconf cmake pkg-config

# if not yet installed, install git too (btw.: not mentioned in the BUILDING.md)
sudo apt-get install git

# go to your home directory:
cd ~

# make a copy (clone) of the current source code:
git clone https://github.com/merbanan/rtl_433.git

cd rtl_433/
mkdir build
cd build

# run cmake from inside the build directory (don't omit the ".."!)
cmake ..

# make it (compiles and linkes the rtl_433 binary)
make

# finally install the just compiled rtl_433:
make install

# test it (let it print out it command line parameters):
rtl_433 -h

Good luck.

Thank you very much!!.. I guess I simply missed the first optionā€¦ Thats as far as I know Linux :slight_smile:

IĀ“ll give it a try one during the upcoming days. I have had this Nooelect dongle laying here on my desk for a few weeks nowā€¦ ItĀ“s time to give it a go. Hopefully this will find my doorbell button, cause the SonofRF bridge doesnt.

I have yet to try my RTL (simply havnĀ“t had enough time). Though the guide seems pretty straight forward , I probably gona need some help anyway, specially around the MQTT stuff. I do have a broker running, but IĀ“m no where near understanding why :slight_smile:
IĀ“ll get rtl_433 running first though and see if I can make it to receive something from my dumb Friedland doorbell.

is this available as a docker installation?

You might consider checking your favorite search provider, e.g.:

https://www.google.com/search?q=rtl_433+docker

1 Like

Finnaly got some time to have a look at this. But I simply cant figure how to tell rtl_433 which USB device to useā€¦ It seems like an option not really explained.
I get this error, but have no idea what to do with it.:

[19:41:11] openhabian@openHABianPi:~/rtl_433/build$ rtl_433
rtl_433 version 19.08-204-g9fe4f11 branch master at 202002081459 inputs file rtl_tcp RTL-SDR
Use -h for usage help and see https://triq.org/ for documentation.
Trying conf file at "rtl_433.conf"...
Trying conf file at "/home/openhabian/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...
Registered 121 out of 148 device decoding protocols [ 1-4 8 11-12 15-17 19-21 23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119 121 124-128 130-148 ]
usb_open error -3
Please fix the device permissions, e.g. by installing the udev rules file rtl-sdr.rules
[11:48:58] openhabian@openHABianPi:~/rtl_433/build$

It looks like itĀ“s looking for a conf (config I assume). But I cant find any info on how this looks like.
The last sentense say I should install the udev rules file rtl-sdr.rules. But again I fail to see how this is suppose to be doneā€¦ I do have some udev rules for my other USB devices. But this is only the half truth in it, cause I still need to execute rtl_433 with some info about this deviceā€¦

In short - In the general doc (readme) there is simply missing some info for people not already knowing. :frowning:

Thanks to authors of this integration! Following the howto was easy and itā€™s working like a breeze!

I have one Acurite temp+hum sensor. Iā€™m satisfied with it and would like to obtain another. What is the recommended approach to get them both working so that I can differentiate between them in OpenHAB?

It has a built-in switch (A,B,C) probably for different frequencies that could be used to distinguish each unit. Will it be seen on receiver as a different channel? Anybody has more than one unit of the same type working in OpenHAB through MQTT binding?

Reading samples in async mode...
Tuned to 433.920MHz.
..
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
time      : 2022-10-15 21:57:04
model     : Acurite-Tower id        : 14955
channel   : A            Battery   : 1             Temperature: 22.7 C       Humidity  : 64 %          Integrity : CHECKSUM
root@sirocco:~# mosquitto_sub -v -t sensors/#
...
sensors/rtl_433/P40/CA/channel A
sensors/rtl_433/P40/CA/id 14955
sensors/rtl_433/P40/CA/temperature_C 23.1
...

Will they have different that /CA/ part?

Exactly. This was the idea behind the ā€œprettifying mqtt outputā€ part. Since youā€™ve followed the tutorial, you can easily distinguish between multiple ā€œchannelsā€ of similar senders using the same protocol. In your example you may get the a second temp sensor as:

sensors/rtl_433/P40/CB/temperature_C 23.1
1 Like

Excellent! Iā€™m looking forward to add more data sources :slight_smile:

I created a wrapper daemon around rtl_433 that enhances and filters the JSON output before feeding into my MQTT broker. Itā€™s an ugly bash script but it does its work! Some additional features compared to out-of-the-box rtl_433 MQTT output are:

  • Support MQTT auto-discovery announcements
  • Less repeated duplicate messages from sensors
  • ā€¦ and quite some other stuff.

If you want to give it a try, here you go and let me know what you think:

1 Like