Getting weather data from my Acurite sensors was shockingly easy

原始链接: https://www.jeffgeerling.com/blog/2025/getting-weather-data-my-acurite-sensors-was-shockingly-easy

I easily set up my Acurite weather station data on a Raspberry Pi 5 using an RTL-SDR dongle. Installing `rtl_433` immediately decoded data from my 5-in-1 sensor and lightning detector. For a web dashboard, I installed WeeWX, a weather station software package, following the Debian documentation. Then, I installed the `weewx-sdr` plugin to connect WeeWX to the RTL-SDR data. Configuring the sensor map in `/etc/weewx/weewx.conf` (with sensor IDs from `rtl_433` output) connected the data streams. Because WeeWX runs as the `weewx` user, I created a `udev` rule to grant it access to the USB SDR device (check `lsusb` for your SDR vendor and product IDs). After restarting, I browsed the locally hosted WeeWX dashboard at `/var/www/html/weewx/index.html`. Serving the page to the local network requires additional web server configuration.

This Hacker News thread discusses the ease of accessing weather data from Acurite sensors, sparked by an article on jeffgeerling.com. Commenters share their experiences with similar projects, highlighting past difficulties with Lacrosse weather sensors and praising Ambient Weather sensors for their ease of use with rtl433, particularly their AA battery operation and DIP switch addressing. One commenter reminisces about a past project involving a smartphone photographing an LCD weather station for remote data access. Jeff Geerling, the original author, acknowledges that setting up Acurite sensors isn't fully "push button" easy, but manageable with online resources. He expresses a desire for official integration of Acurite products with home automation platforms like WeeWX or Home Assistant or the use of common standards like Zigbee or Z-Wave, but also understands the challenges in doing so. Overall, the conversation highlights the progress in accessing weather data and the desire for further simplification and standardization.
相关文章

原文

I've had a Pi and SDR earmarked for 'getting weather data from my weather station' for a long time now. I don't know why I waited so long, because it was shockingly easy.

I have a Acurite 5-in-1 weather station (with separate lightning detector) mounted about 15' in the air in my back yard. It comes with a fancy little LCD display to show all the stats it transmits over the 433 MHz wireless frequency.

But I want to ingest that data into my Home Assistant installation, so I can have better access to historical data, set up alerts (like if wind speed is above 50 mph, or there's lightnining less than 10 miles away), etc.

I'll work on the HA integration later, likely using MQTT. But for now, just getting the data to decode on a Raspberry Pi 5 was quick:

  1. Plug my Nooelec NESDR into my Pi, and the cheap dipole antenna that came in the kit into the NESDR's antenna jack
  2. Install rtl_433 on the Pi: sudo apt install -y rtl-433
  3. Run it: rtl_433

Bingo! It automatically picked up both of my Acurite sensors, and started displaying the data every few seconds:

RTL 433 Acurite weather data on Jeff's Pi 5

It's a rare treat to just install something and have it work immediately. Especially if it uses RF!

I will still be working to integrate into Home Assistant, but at least for now, I'm running WeeWX on my Pi so I have a full web dashboard for the Acurite sensors. Installation was easy, following the WeeWX documentation for Debian:

# Add the WeeWX GPG key.
sudo apt install -y wget gnupg
wget -qO - https://weewx.com/keys.html | \
    sudo gpg --dearmor --output /etc/apt/trusted.gpg.d/weewx.gpg

# Set up the WeeWX apt repository.
echo "deb [arch=all] https://weewx.com/apt/python3 buster main" | \
    sudo tee /etc/apt/sources.list.d/weewx.list

# Install WeeWX.
sudo apt update
sudo apt install -y weewx

The installer has a few prompts for setup. Complete those steps manually. I just entered the defaults for location; if you want to place it on a map, get the coordinates and altitude using a tool like Elevation.place.

You can reconfigure weewx later with sudo systemctl stop weewx, then weectl station reconfigure (then systemctl start it again). Configuration is stored in /etc/weewx/weewx.conf.

To get WeeWX to use rtl_433 to get sensor data, install the weewx-sdr plugin:

sudo weectl extension install https://github.com/matthewwall/weewx-sdr/archive/master.zip

Confirm that you want to install it, then once it's done, configure the driver and restart WeeWX:

sudo weectl station reconfigure --driver=user.sdr --no-prompt
sudo systemctl restart weewx

At this point, WeeWX will have the plugin running but no data will get captured until you manually configure which sensors you want to use, in a [[sensor_map]] in the /etc/weewx/weewx.conf file. Follow the directions in the Installation section of the weewx-sdr README to do that.

Here is the configuration I used after monitoring my station to get the ID values (which... apparently can change when you change batteries, so beware!):

[SDR]
    driver = user.sdr
    [[sensor_map]]
        windDir = wind_dir.0C2D.Acurite5n1PacketV2
        windSpeed = wind_speed.0C2D.Acurite5n1PacketV2
        rain_total = rain_total.0C2D.Acurite5n1PacketV2
        outTemp = temperature.0C2D.Acurite5n1PacketV2
        outHumidity = humidity.0C2D.Acurite5n1PacketV2
        lightning_distance = distance.0008.AcuriteLightningPacket
        strikes_total = strikes_total.0008.AcuriteLightningPacket

If you have an Acurite lightning detector like I do, you may also need to configure an Accumulator and Corrections to the data so it displays correctly in WeeWx.

Even after all that, weewx will run under a weewx user account, which may not have access to the USB hardware you're using for rtl_433, so you need to add a udev rule to give permission.

Create a udev rule file with sudo nano /etc/udev/rules.d/sdr.rules, and put the following inside:

SUBSYSTEM=="usb",ATTRS{idVendor}=="0bda",ATTRS{idProduct}=="2832",MODE="0664",GROUP="weewx"
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bda",ATTRS{idProduct}=="2838",MODE="0664",GROUP="weewx"

(The vendor and product IDs may differ depending on your SDR stick — the above values are for most cheap RTL-SDR and Nooelec sticks. Check yours with lsusb.)

Then restart the Pi entirely. You can live reload udev rules but restarting is honestly easier than remembering how to do that :)

Finally, after all that (and waiting 5+ minutes for the first report to be generated, we get a weather dashboard! On the same Pi, load up the /var/www/html/weewx/index.html file in your web browser, and you can browse the report locally:

WeeWX Dashboard for Shrewsbury, MO

If you want to serve it up to the local network, you can use Apache or another webserver, but that exercise is left to the reader.

联系我们 contact @ memedata.com