Getting Vevor 7in1 weather stations working with rtl_433, MQTT, and Home Assistant
Now that we've defeated QNAP's slightly broken udev, we can run a Docker container with rtl_433 in it to wire up our Vevor 7in1 weather station to Home Assistant via MQTT. First off, we need a Docker container running rtl_433, which assumes you've already setup the udev rule mentioned in the previous post, even if you're not using a QNAP! I like to write little shell scripts to run Docker containers. In this case this one: #!/bin/bash docker rm -f vevor_weather || true device=$(readlink -f /dev/rtl433) docker run --restart always -d \ --name vevor_weather \ --device ${device} \ hertzg/rtl433:master-debian -f 868M -Y classic -R 263 \ -F json -Fmqtt://mqttserver,retain=0,events=rtl_433[/model][/id] What this script does is remove any previous version of the container that might be running. It then uses our reliable symlink from the previous post to lookup the real device file. That real device file is then passed through to the Docker container. I am not entirely sure of the subtleties here, but rtl_433 refused to use the device if I passed it through as the symlink, and Docker doesn't appear to be able to remap device files like it does for ports or mounts. Regardless, this worked at least.…