Obs_sky data in udp

@corrineb @dsj

obs_sky index 3 is Rain Accumulated.

May I get a detailed explanation of this? What time frame does this cover.

index 11 is Local Day Rain Accumulation. Is this midnight to midnight?

Thank you,


1 Like

Hey Gary,

Index 3 of the obs_sky message broadcased over udp is rain accumulated in mm over the current reporting interval. The current reporting interval can be found in index 9 of the array (listed as minutes).

Index 11 of the obs_sky message is the total rain accumulation from midnight to midnight in the station’s time zone. However, we are not currently reporting local day rain accumulation over udp. It will always be null when using udp. We are calculating that on the api. You can get the local day rain accumulation value over web socket or using the observation REST request (/observations/device/{device_id})

1 Like

Thank you, Corrine.


1 Like

On a related note, it seems like the Rain Rate is not reported in the UDP stream. Would it be possible to add that?

That data is not available from the Sky. It is derived from the data sent to the servers then sent back through the API.


Ah, ok. I guess that’s what you were discussing above. Sorry, I misunderstood. I was hoping to gather it locally.

I was hoping the same.

At this point I’m looking for viable methods and hardware to locally store the UDP data. I am in dire need of this for the RTI XP and UDI ISY applications…

I detest cloud storage when local storage is so much better and reliable. Once I solve that issue data will be available for almost any time period.


Speaking of UDI ISY, bpwwer just published a nodeserver (not Polyglot) that has live data working. Check it out if you haven’t already. Very cool!!


EDIT: So could we use the rain accumulation from the current interval (1 minute) and (EDIT2) MULTIPLY it by 60 to get the hourly rate? Seems like a pretty good estimation and very likely the way it’s being done in the WeatherFlow cloud.

One could do that but to me that’s not the ideal way to calculate the hourly rate.

1 Like

I see your point but…

It’s like the “instantaneous” derivative (actually averaged over one minute interval, defined in terms of units per hour), which is probably what WF uses on the WF app for their range of intensity values (i.e. light, moderate, very heavy, etc.).

The true hourly rate would need to be the trailing average over the past hour, which does not appear to be what is reported in the WF app. That would be cool to have as well. The accumulation amount in the last hour would require some integration over time. I think this is what the WF cloud is calculating for us and reporting on the app.

Personally, I’d like to see the estimated intensity level at the present time which is what we could surmise from the “instantaneous” value I tried to describe above.

I will look at the WeatherFlow code and see exactly how it’s being calculated. I haven’t done much with rain since it has been so dry here. I’m still waiting on snow

I am storing the last 60 readings and using that data to calculate the accumulation and hourly rate.

This is how I am calculating the data I use to present in my drivers.

1 Like

I’m glad you are on this too.

Further details and a correction to the “instantaneous” rain rate I’m proposing above…

Say index 3 of the SKY observation was .254 mm (0.01"). That means it measured 0.01" of rain accumulated over the last minute. If we MULTIPLY BY 60 (as opposed to divide by 60 as I originally, erroneously suggested above), we could say that the present rain rate is 0.60" per hour. Of course, the rain rate could and will change minute by minute. This calculation gives us an idea of how hard it is raining at any given time.

Here’s a pretty graph I created in OpenHAB using the index 3 rain info during a downpour this morning. The graph should be labeled Precipitation Rate at the bottom (instead of just Rain). It correlates perfectly to the data in the WF app when zoomed in to look at the minute by minute rain rate in the WF app graph. My math to convert from mm over the 1 minute interval between sky_obs packets is:

Rain_Rate (inches/hour) = [60 * (index3_value)] / 25.4


1 Like

Yes, but you actually want to multiply by 60. If you get 1X of rain in one minute you would get 60X that much in an hour (assuming the same rate for the entire hour). Note, however, that each obs_sky record has a “Rain Accumulated” (mm) and a “Report Interval” (minutes). Because we’re leaving open the idea that an end device might report less frequently (say, every 5 minutes, or every 15), perhaps to save power. So the general formula for the instantaneous hourly rate from a given observation is “rain_accumulated * 60 / report_interval”. This is the value you see in the Smart Weather apps and it’s the value used to determine the “text description” you see in the apps.

The value that is not in the UDP message but is in the WS and REST data is the “local day rain accumulation”. This value is the sum of all observations since midnight local time. The reason that’s not in the UDP message is because the hub doesn’t know your location or timezone - so this calculation (like sea level pressure) is a “derived value” that’s not performed on the Hub.


Thanks David. Yeah, I got the divide vs. multiply wrong in my initial post. I thought I had corrected it. Agreed that it should be dependent upon the report interval but for now that’s 1 minute so I used that number.

I was thinking I might add the calculation locally in my programming to get accumulation. The last hour’s accumulation and the last 24 hours’ accumulation is what I was thinking. I’ll have to look at the REST data too. Haven’t done that yet.


1 Like