Is Rain Duration available in the API?

Currently using the weewx WF UDP driver and was wondering if it was possible to get the rain duration integer.

Does not look like the weewx pulls out that info (yet).
All the UDP mappings are in the Tempest API docs, so it is ‘easy’ to pull out.
I don’t know how active that repo is any more but you can try an issue for an enhancement (I looks like the last time the dev was active was a year ago)

I personally use https://github.com/briis/hass-weatherflow2mqtt but I also have MQTT and Home Assistant running. There are other WeatherFlow UDP programs out there if you are not glued to weewx.

Looking at the broadcast UDP packets I don’t see rain duration only rain accumulated:

Dec 20 13:58:17 pi1 /weewxd: weatherflowudp: MainThread: *** Sensor names per packet type
Dec 20 13:58:17 pi1 /weewxd: weatherflowudp: MainThread: packet obs_air: ('time_epoch', 'station_pressure', 'air_temperature', 'relative_humidity', 'lightning_strike_count', 'lightning_strike_avg_distance', 'battery', 'report_interval')
Dec 20 13:58:17 pi1 /weewxd: weatherflowudp: MainThread: packet obs_sky: ('time_epoch', 'illuminance', 'uv', 'rain_accumulated', 'wind_lull', 'wind_avg', 'wind_gust', 'wind_direction', 'battery', 'report_interval', 'solar_radiation', 'local_day_rain_accumulation', 'precipitation_type', 'wind_sample_interval')
Dec 20 13:58:17 pi1 /weewxd: weatherflowudp: MainThread: packet rapid_wind: ('time_epoch', 'wind_speed', 'wind_direction')
Dec 20 13:58:17 pi1 /weewxd: weatherflowudp: MainThread: packet evt_precip: time_epoch
Dec 20 13:58:17 pi1 /weewxd: weatherflowudp: MainThread: packet evt_strike: ('time_epoch', 'distance', 'energy')
Dec 20 13:58:17 pi1 /weewxd: weatherflowudp: MainThread: packet obs_st: ('time_epoch', 'wind_lull', 'wind_avg', 'wind_gust', 'wind_direction', 'wind_sample_interval', 'station_pressure', 'air_temperature', 'relative_humidity', 'illuminance', 'uv', 'solar_radiation', 'rain_accumulated', 'precipitation_type', 'lightning_strike_avg_distance', 'lightning_strike_count', 'battery', 'report_interval')

There is another packet type called “device_status” but that is mostly battery and radio information. I have only been running WeeWx for 5 days now and still trying to see what it can do when it comes to derived data.

I am also looking at this code for publishing to MQTT so I can better integrate locally with my Hubitat home automation hub. I want to be dependent on cloud api’s for some events that are triggered via observations from the Tempest:

1 Like

At the top of every forum web page here, there is a pull-down for API documentation. Feel free to find the value(s) that you want in the UDP packet formats. I don’t see rain duration in any of the UDP packets from a quick skim of the docs, so it might not be available.

The weewx-users Google Group may be able to suggest some WeeWX voodoo to derive/calculate rain duration using available station data…

I am not aware of any extension to report rain duration nor any native way to get that info.

I ‘do’ have a weewx extension (github link) that reports how long it’s been since rain was last reported. You could probably invert the logic therein a bit and cook up a duration calculation…something like ‘if you have rain now, how long has it been since you did not have rain’. Should be doable.

Re: MQTT - if you run weewx just add the MQTT extension and have weewx publish to MQTT for you. I do that for my Home Assistant setup. Works great.

1 Like

I appreciate the replies everyone. I guess I’ll wait until it’s exposed in the API; calculating the value from other proxy values is a little too complex for me :slight_smile: