This started as an easy story with three simple things:

  1. I love IoT gadgets.
  2. I love weather gadgets.
  3. I love charts and graphs.

While perusing online, it’s possible that I stumbled upon a social media advertisement for the WeatherFlow Tempest Weather System (and a 15% off coupon). It’s also quite possible that I made a quick purchase.

WeatherFlow Tempest started out as a Kickstarter project but is now shipping directly outside of just the backers. The WeatherFlow Tempest is essentially a solar powered weather station that collects wind, rain, lightning, temperature, humidity, pressure, and sunlight measurements. It has a wireless hub that collects these data points, pushes them up to the WeatherFlow cloud for processing and weather forecasting, and then provides a personalized weather app. Data can be collected with a few different APIs – one from WeatherFlow’s processed stream of events and metrics (REST API) or locally via my network with UDP listener API.

Yes. Now we’re talking. APIs. Raw data. Wireless. Weather data. All that means “how can I use my data to make some charts and graphs!”

Logs Into Metrics

With any new project – it’s always best to start out and see what other great work has already been shared with the community. I found a great InfluxDB listener from Vince Skahan called weatherflow-udp-listener. I made a first set of Grafana dashboards that used his system which worked out pretty well. But as much as I loved Vince’s efforts – the project isn’t currently supported (but should work just fine for the foreseeable future…)

What I really wanted to do is work with the raw JSON logs being streamed over UDP from the Tempest to the WeatherFlow hub. I needed a way to collect those JSON logs and push them into a logging system that provides long term storage AND a way to turn logs into metrics. What better solution than Grafana’s Loki log aggregation system.


The WeatherFlow hub sends out JSON logs broadcast over UDP port 50222 on my local network. Based on the WeatherFlow Tempest UDP Reference, these logs can be broken out by type (among a few other measurements):

obs_st (Observation – Tempest)








By using a slightly modified script (from P-Doyle’s Simple-WeatherFlow-Python-Listener) I was able to use the following command to send the broadcast JSON logs into Loki via Promtail.

/usr/bin/stdbuf -oL /usr/bin/python | /usr/bin/promtail --stdin --client.url http://loki:3100/loki/api/v1/push --client.external-labels=app=weatherflow,hostname=weatherflow

(Using stdbuf here to reduce the STDOUT/STDIN buffer wait…)

Once the logs are in Grafana Loki – I used Loki’s LogQL to crack open some of the JSON arrays into useful metrics:

max(max_over_time({app="weatherflow"} |= "obs_st" | json obs_Air_Temperature="obs[0][7]" | unwrap obs_Air_Temperature | __error__="" [$__interval])) * 9/5 + 32

Using the WeatherFlow UDP API as a guide, I made metrics from each of the index values:

Observation Value Layout

Index Field Units
0 Time Epoch Seconds
1 Wind Lull (minimum 3 second sample) m/s
2 Wind Avg (average over report interval) m/s
3 Wind Gust (maximum 3 second sample) m/s
4 Wind Direction Degrees
5 Wind Sample Interval seconds
6 Station Pressure MB
7 Air Temperature C
8 Relative Humidity %
9 Illuminance Lux
10 UV Index
11 Solar Radiation W/m^2
12 Precip Accumulated mm
13 Precipitation Type 0 = none, 1 = rain, 2 = hail
14 Lightning Strike Avg Distance km
15 Lightning Strike Count
16 Battery Volts
17 Report Interval Minutes

Grafana Dashboards

The rest of my efforts were simply turning those metrics into usable information – coming up with an Overview, Today So Far, and a Device Details set of Grafana dashboards.

Like my previous Loki Syslog All-In-One project – I created an All-In-One project for this WeatherFlow collector. Details on how to install your own collector including all of the files needed to download are over at my WeatherFlow Dashboards AIO Github repository. These dashboards are also available in Grafana‚Äôs Community Dashboards. With a little help from P-Doyle’s Simple-WeatherFlow-Python-Listener and Promtail – you too can deploy a quick and easy WeatherFlow log collector with Grafana Loki and Grafana dashboards.

If you’re a WeatherFlow fan, I’d love to hear any feedback on how this works for you. If you’d like to share your dashboards, I’d be happy to include them here to share with the community as well!

These dashboards are also part of my Internet facing set of current Grafana dashboards. Enjoy!!