Fun with Tempest-Hourly Observations to the Fediverse

I had some free time yesterday and I haven’t done much development code for a while after standing up my weather web portal with WeeWx years ago and integration with Hubitat it was time to do something fun after all the storms we have had in the past 3 weeks here in the NW Suburbs of Chicago.

Since I already have UDP capture from the Tempest going into a MQTT topic to support the WeeWx weather portal I figured capture the observations at the top of the hour from MQTT format the message to post to the social media site and trigger that ever hour. I didn’t want to have a constant listener for something that would only post hourly so I had a ah ha moment and did a chron job that fires off at the top of the hour and waits for the 1 minute observation that has all the data and then the next wind observation, combine them together and bam a payload I can format and post to social media.

The data chain looks like this:

Tempest UDP observation → WeeWx Tempest → WeeWx Publish MQTT → Chron Job Python MQTT Listener for the two payloads and formatter → Python Publisher to the fediverse via gotosocial API

And here is the end result, it posts every hour and also daily the funny comment changes

1 Like