When using a WeatherFlow Tempest with WeeWx to upload data to Weather Underground with Rapid Fire enabled, fields like Pressure, Dew Point, and Temperature often disappear or blink in and out on the station dashboard.
Rapid Fire is arguably the best feature of Weather Underground's personal weather stations. You can monitor station output with updates as rapid as every few seconds. It is fully supported in WeeWx, but there was an issue with my WeatherFlow Tempest actually providing that data in real-time.
The good news is that the archived data was unaffected. This issue only seems to impact live data delivered through the Rapid Fire protocol. Let's dig in and figure out why.
The Root Cause
The Tempest station sends data in two different packet types to save power and bandwidth:
- Rapid Update: Sent every 3 seconds (contains limited data, usually just Wind Speed and Direction).
- Full Update: Sent every 60 seconds (contains all data, including Pressure, Temperature, Humidity, Rain, etc.).
Weather Underground’s "Rapid Fire" mode expects every packet to be complete. This is the root cause of the problem.
When WeeWx forwards a smaller rapid update packet, Weather Underground sees missing data and assumes it is NULL, causing the dashboard to blank out those fields until the next full observation arrives.
In most instances, the only thing displayed on the station profile is wind speed. Everything else is blank because the rapid update didn't include it.
The Solution
As you can probably conclude, the solution is to provide all data to Weather Underground with each update.
The fix is to create a custom Python service for WeeWx that caches the last known values for Temperature, Pressure, and Humidity. When a wind-only packet arrives, this service injects the cached values into the packet before sending it to Weather Underground.
Step 1: Determine Your User Directory
WeeWx stores user customizations in a specific user folder, but the location varies by installation method. Run this command to find the correct folder:
sudo find / -name extensions.py 2>/dev/null- Pip/Venv Installs: Usually
/etc/weewx/bin/user/or/home/weewx/bin/user/ - DEB/APT Installs: Usually
/usr/share/weewx/user/
In the steps below, I will use /etc/weewx/bin/user/ as the example path because that's how my station is set up.
Step 2: Create the Script
Create a new file in your user directory. (You can name it whatever you like.)
sudo nano /etc/weewx/bin/user/loop_latch.pyPaste the following code into the file. This script listens for new packets, caches the stable data, and backfills missing data in rapid-fire packets.
import weewx
from weewx.engine import StdService
class LoopLatch(StdService):
"""
Service to 'latch' loop packet data.
It remembers the last seen value for each observation and
fills in missing values in subsequent packets.
"""
def __init__(self, engine, config_dict):
super(LoopLatch, self).__init__(engine, config_dict)
# The specific fields we want to preserve if missing from rapid updates
self.latch_keys = ['outTemp', 'outHumidity', 'barometer', 'pressure', 'dewpoint']
self.cache = {}
self.bind(weewx.NEW_LOOP_PACKET, self.new_loop_packet)
def new_loop_packet(self, event):
packet = event.packet
# 1. Update cache with any NEW values present in this packet
for key in self.latch_keys:
if key in packet and packet[key] is not None:
self.cache[key] = packet[key]
# 2. Inject cached values into the packet if they are missing
for key in self.latch_keys:
if key in self.cache:
# If key is missing or None in the current packet, use the cached value
if key not in packet or packet[key] is None:
packet[key] = self.cache[key]Save and exit from the nano editor. (CTRL+X, then Y on Windows. CMD+X, then Y on a Mac.)
Step 3: Enable the Service in weewx.conf
Now that we have our file, we need to enable it within WeeWx.
Before making changes, it is always a good idea to back up your configuration file:
sudo cp /etc/weewx/weewx.conf /etc/weewx/weewx.conf.bakNow, open your configuration file:
sudo nano /etc/weewx/weewx.conf- Find the
[Engine]section. - Locate
[[Services]]. - Find the line
data_services. - Add
user.loop_latch.LoopLatchto this list. Ensure there are no stray commas at the end of the line if this is the only item in the list. - Save and exit from nano.
Example Configuration:
[Engine]
[[Services]]
# ... other services ...
data_services = user.loop_latch.LoopLatchStep 4: Verification
Restart WeeWx to apply the changes:
sudo systemctl restart weewxCheck the status to ensure the module loaded correctly:
sudo systemctl status weewxIf it shows active (running), check your Weather Underground dashboard. You should now see rapid-fire wind updates (every ~3 seconds) while Pressure and Dew Point remain visible and stable.
Conclusion
This is admittedly an edge case! It will only affect those of us who have Tempest Weather Stations hooked into WeeWx uploading data to Weather Underground.
It is not Weather Underground's fault that they expect the packets to always contain all observations, and the same is true for WeeWx. The Tempest limits this data by default to save bandwidth, and we do not necessarily want or need to pull all data with every observation.
The solution is to simply pull the latest data from our cache. That results in the best of both worlds for everyone. Weather Underground gets a full payload of data as expected. The Tempest continues to optimize data for bandwidth. Most importantly, end users looking at a weather station will always see all data.
Shameless plug. Here's a link to my personal weather station, with Rapid Fire data flowing: https://www.wunderground.com/dashboard/pws/KTNTHOMP28