
Off-Grid Raspberry Pi Weather Station (RTL-SDR + Ecowitt WS90)
Deploy a remote weather station using a Raspberry Pi, RTL-SDR radio receiver, and Ecowitt WS90 all-in-one sensor β with solar power and cellular backhaul.
Quick Answer
An Ecowitt WS90 paired with a Raspberry Pi and an RTL-SDR USB dongle gives you a fully wireless, off-grid-capable weather station. The WS90 transmits on 868 MHz (EU) or 915 MHz (US), and rtl_433 on the Pi decodes those packets without needing the Ecowitt gateway hardware. Add a solar panel, LiFePO4 battery, and a 4G USB modem, and you have a station that runs unattended in remote locations for months. This Tutorials guide covers the full deployment.
What You Will Build
This project extends the Raspberry Pi build guide into territory where mains power and Wi-Fi do not reach. The WS90 is an all-in-one sensor array (temperature, humidity, pressure, wind speed, wind direction, rain, UV, light) that transmits readings wirelessly every 16 seconds. Instead of using Ecowitt's proprietary GW2000 gateway, we intercept those radio transmissions with an RTL-SDR dongle and the open-source rtl_433 decoder.
The result: complete hardware independence, flexible data routing (MQTT, JSON, CSV), and a deployment that works anywhere with cellular coverage and enough sunlight to keep the battery topped up.
Prerequisites
- Raspberry Pi 4 (2 GB minimum) with Raspberry Pi OS Lite
- RTL-SDR Blog V4 dongle (or compatible RTL2832U-based receiver)
- Ecowitt WS90 sensor array
- 4G USB modem (Huawei E3372 or similar) with a data SIM
- Solar panel (20 W minimum β see solar sizing guide once available)
- LiFePO4 battery (12 V 6 Ah minimum)
- MPPT solar charge controller
- IP65 weatherproof enclosure for electronics
- Familiarity with Linux command line and SSH
Parts List
| Component | Purpose | Approximate Cost |
|---|---|---|
| Ecowitt WS90 | All-in-one sensor array | Β£120β150 |
| Raspberry Pi 4 (2 GB) | Processing and connectivity | Β£45 |
| RTL-SDR Blog V4 | Radio receiver (868/915 MHz) | Β£30 |
| 868/915 MHz antenna | Improved reception range | Β£10β15 |
| 4G USB modem + SIM | Cellular data backhaul | Β£30 + data plan |
| 20 W solar panel | Power generation | Β£25β35 |
| 12 V 6 Ah LiFePO4 battery | Energy storage | Β£35β50 |
| MPPT charge controller | Battery management | Β£15β25 |
| IP65 enclosure | Weatherproofing | Β£15β20 |
| Cables, glands, fuses | Wiring and safety | Β£10β15 |
Total: approximately Β£335β385 plus a cellular data plan (typically 1β2 GB/month is sufficient for weather data).
Step 1: Install and Test rtl_433
SSH into the Pi and install rtl_433:
sudo apt install -y rtl-433
If the package is not available in your distribution's repository, build from source:
sudo apt install -y build-essential cmake libusb-1.0-0-dev librtlsdr-dev
git clone https://github.com/merbanan/rtl_433.git
cd rtl_433 && mkdir build && cd build
cmake .. && make -j$(nproc)
sudo make install
Plug in the RTL-SDR dongle and verify it is detected:
rtl_test -t
If rtl_test reports "No supported devices found," check that the kernel's DVB-T driver has not claimed the device. Blacklist it:
echo "blacklist dvb_usb_rtl28xxu" | sudo tee /etc/modprobe.d/blacklist-rtl.conf
sudo modprobe -r dvb_usb_rtl28xxu
Step 2: Receive WS90 Transmissions
Power up the WS90 (install batteries or confirm the solar supercapacitor is charged) and start listening:
rtl_433 -f 868.3M -R 215 -F json
The -R 215 flag selects the Ecowitt/Fine Offset WH90 protocol. You should see JSON lines every 16 seconds with fields for temperature, humidity, wind speed, wind direction, rain accumulation, UV index, and light intensity.
If nothing appears, try -f 915M for US-frequency units, or remove the -R 215 flag to listen for all protocols β useful for identifying which protocol number your specific WS90 revision uses.
Step 3: Set Up Data Routing
rtl_433 can output directly to MQTT, HTTP, or files. For this deployment, we will send data to a local MQTT broker that buffers it for upload.
Install Mosquitto:
sudo apt install -y mosquitto mosquitto-clients
Create a rtl_433 configuration file at /etc/rtl_433/rtl_433.conf:
frequency 868.3M
protocol 215
output mqtt://localhost:1883,retain=1,events=rtl_433/events
report_meta time:utc
Run rtl_433 as a systemd service so it starts on boot and restarts on failure. Create /etc/systemd/system/rtl433.service:
[Unit]
Description=rtl_433 weather receiver
After=network.target mosquitto.service
[Service]
ExecStart=/usr/local/bin/rtl_433 -c /etc/rtl_433/rtl_433.conf
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl enable rtl433
sudo systemctl start rtl433
For integration with Home Assistant or Grafana, the MQTT and Home Assistant guide covers the next steps.
Step 4: Configure Cellular Backhaul
Plug in the 4G USB modem. Most Huawei modems present as an ethernet device (eth1 or usb0). The Pi should obtain an IP address automatically via DHCP.
Verify connectivity:
ping -c 3 -I usb0 8.8.8.8
For reliable unattended operation, create a watchdog script that checks connectivity and power-cycles the modem USB port if it drops:
#!/bin/bash
if ! ping -c 1 -W 5 8.8.8.8 > /dev/null 2>&1; then
echo "Network down β resetting USB modem"
echo '1-1' | sudo tee /sys/bus/usb/drivers/usb/unbind
sleep 5
echo '1-1' | sudo tee /sys/bus/usb/drivers/usb/bind
fi
Schedule this via cron every five minutes.
Step 5: Data Upload and Buffering
With intermittent cellular connectivity, you need a buffer. A simple approach: write each observation to a local SQLite database, then periodically sync to your remote server.
A Python script subscribing to MQTT, storing to SQLite, and uploading via HTTP works well. The upload can POST JSON to a server endpoint or use SCP/SFTP to push CSV files. For FTP-based uploads, see the FTP Publishing Guide.
The key is idempotent uploads β design the remote endpoint to handle duplicate observations gracefully. Timestamp each record and use upsert logic on the server side.
Step 6: Antenna Selection
The stock rubber-duck antenna on most RTL-SDR dongles is designed for broadband reception and is mediocre at any specific frequency. Replace it with a tuned 868 MHz (or 915 MHz) antenna for dramatically improved range.
Good options:
- Quarter-wave ground-plane antenna β easy to build from a SO-239 connector and four radials. Cheap and effective.
- Collinear antenna β better gain for longer range, but more complex to build or buy.
Mount the antenna as high as practical with a clear line of sight to the WS90. In my testing, a quarter-wave ground-plane antenna at 4 metres height reliably receives the WS90 at over 200 metres, compared to about 50 metres with the stock antenna.
Common Mistakes
- SDR overheating in sealed enclosures. The RTL-SDR V4 generates noticeable heat. In a sealed IP65 box in direct sunlight, it can thermal-throttle and produce garbage data. Add ventilation holes with IP-rated mesh, or shade the enclosure.
- Insufficient solar panel sizing. A Pi 4 with an SDR dongle and 4G modem draws 8β12 W under load. A 20 W panel is the minimum; 30 W provides a safety margin for cloudy days.
- Wrong antenna polarization. The WS90 transmits with vertical polarization. Mount your receive antenna vertically for best results.
- Not buffering data locally. Cellular connections drop. If you push data directly without local storage, you lose observations during outages.
- Ignoring frequency regulations. The WS90 uses ISM bands, but your SDR receive-only operation is legal in most jurisdictions. Transmitting on these frequencies requires appropriate licensing.
Related Reading
- Raspberry Pi Weather Station Build Guide β foundational Pi station setup
- Publishing Fundamentals β data publishing workflows
- FTP Publishing Guide β upload configuration
- MQTT and Home Assistant β home automation integration
- Securing Your Station Data β network security for IoT deployments
- Community Support β troubleshooting patterns
FAQ
Can I use a different sensor instead of the WS90?
Yes. rtl_433 supports hundreds of 433/868/915 MHz weather sensors. The WS90 is recommended here because it is an all-in-one array with good accuracy, but cheaper Fine Offset sensors work with the same rtl_433 setup.
How much cellular data does this use? With observations every 16 seconds uploaded as compressed JSON, expect 500 MB to 1.5 GB per month depending on your upload frequency and whether you batch or stream.
Can I use Wi-Fi instead of cellular? If Wi-Fi reaches the station location, absolutely. Skip the 4G modem and the power budget drops significantly, making solar sizing easier.
What happens when the battery runs flat in winter? The Pi shuts down ungracefully, which risks SD card corruption. Use a low-voltage disconnect (LVD) on the charge controller to cut power cleanly before the battery drops below safe levels, and configure WeeWX or your collection script to handle startup gracefully.