RTL_433 to MQTT

Wait…

I helped some weeks ago with improving the direct MQTT publish from RTL_433 - to be precise with the MQTT format string. See the link to the issue at the bottom of this post.

With this quite recent feature of rtl_433 you can specify some formatting for the mqtt publish, e.g.:

output mqtt://localhost:1883,retain=0,devices=sensors/x[/channel:0][/id]

This produces some topics in the broker like this:

sensors/x/0/147/id 147
sensors/x/0/147/temperature_C 33.200001
sensors/x/0/147/rain_mm 107.699997
sensors/x/0/147/battery_ok 1
sensors/x/0/147/mic CRC

… which can be consumed conviniently by a MQTT thing as shown in the former post in openHAB without the hassle with the conversion script :wink:

Seems, I should rework my own setup leveraging rtl_433’s new MQTT feature and get rid of the python script myself :wink:

See: Add MQTT topic format strings by zuckschwerdt · Pull Request #1079 · merbanan/rtl_433 · GitHub