Skip to main content

Gadget Wisdom

Tag: sdr

0 Responses

Setting up RTL_433 to Monitor Sensors

RTL_433 is an open source project hosted on GitHub. While the name implies it only handles devices on the 433MHz band, it also supports devices on 868 MHz, 315 MHz, 345 MHz, and 915 MHz bands. Not only are there presets to decode popular devices, there are instructions to write decoding profiles for unsupported devices.

Once installed, you can customize your /etc/rtl_433.conf to output to MQTT by adding:

output mqtt://localhost:1883,user=user,pass=password,retain=0

Customizing the hostname, port, username, and password for your MQTT broker. RTL_433 outputs event json and state json. So…you can monitor events as they happen or the state of individual devices.

I was surprised at how many devices I was able to pick up that weren’t mine, and ultimately filtered out devices by removing protocols from the rtl_433.conf file. I’m picking up not only my Acurite weather sensor, but other people’s temperature sensors, TPMS(tire pressure monitoring sensors), and more. I can feed my sensors(not the ones I accidentally pick up), into WeeWX(my weather system), and Home Assistant(my home automation system).

 

 

Published on December 8, 2023
Full Post
1 Response

The Power of Weewx

There are a lot of different ways to store and use weather data. For my station, I wanted something that had a lot of built-in features and extensibility. I ended up with WeeWx, which is a well-supported python based project. They are currently in beta for Version 4.0.

WeeWx supports multiple sources for inputs, uploads to a variety of sites, and has extensions to add additional functionality. It generates reports that can be deployed by ftp or rsync to a remote website, or  as I do, you can host it on the computer running the software. WeeWx is lightweight enough you could host it on a Raspberry Pi. I do this for one of my weather stations. With the other, I’m hosting on the same computer that handles my Home Automation.

With something like a Pi, the biggest concern is frequent writes to the database. So if you are using a Pi, I suggest you use a database hosted elsewhere and transfer the reports to another computer, or you may wear out your microSD card. I will have to talk about my Pi issues another time, but the weak point on a Pi is the microSD card.

Installing WeeWx is simple as installing any other Linux package. Then, in order to receive data from 433MHz SDR(software defined radio) devices, the easiest way is to get an RTL-SDR USB dongle and add the extension, WeeWx-SDR. This requires a little compiling of various drivers to allow receipt of signals from a variety of different devices. It takes some trial and error to map the sensors to the right values in WeeWx though.This is just a matter of running an application and noting the output. However, once you do this, it stays stable…unless you change hardware. I am also using the Acurite Atlas, which is not in the stable version of RTL_433, the library that translates the 433MHz signals, but you can install the development branch.

I also supplement that data by running another extension, weewxMQTT, which I use to send in sensors that are not coming in via 433MHz. This is how I added a barometer, as I couldn’t find a 433MHz one. There is a robust set of examples from hobbyists of creatng MQTT enabled sensors using inexpensive wifi enabled boards like the NodeMCU or the D1 Mini.

After WeeWx is installed, and the drivers for the various sensors are added, the system will generate reports. The default skin, which is the template for the output, is probably sufficient for most people, but it can be customized, and alternate ones found online.

WeeWx also has built-in and extensible uploaders to send the data to various sources. I contribute to every source that will let me. Why discriminate?

Next, will cover some of the customizations I’ve put in.

 

Published on April 27, 2020
Full Post

Get New Posts By Email