matthewwall / weewx-interceptor

weewx driver that intercepts web traffic from internet 'bridge' devices such as Acurite Access, ObserverIP, OS LW30x, LaCross GW1000U, FineOffset GW1000
GNU General Public License v3.0
105 stars 44 forks source link

rain data missed. Propose to consider yearly-monthly-weekly-daily #106

Open ThomDietrich opened 2 years ago

ThomDietrich commented 2 years ago

Hey there,

I'm experiencing an issue with missed rain data.

Example for measurements reported to the observer driver:

GET /weatherstation/updateweatherstation.php?ID=xxx&PASSWORD=xxx&indoortempf=75.2&tempf=71.4&dewptf=61.2&windchillf=71.4&indoorhumidity=62&humidity=70&windspeedmph=0.9&windgustmph=2.2&winddir=34&absbaromin=29.543&baromin=29.723&rainin=0.000&dailyrainin=0.193&weeklyrainin=0.331&monthlyrainin=1.311&solarradiation=234.15&UV=2&dateutc=2022-07-30%2011:19:48&softwaretype=EasyWeatherV1.5.9&action=updateraw&realtime=1&rtfreq=5

GET /weatherstation/updateweatherstation.php?ID=xxx&PASSWORD=xxx
&indoortempf=75.2
&tempf=71.4
&dewptf=61.2
&windchillf=71.4
&indoorhumidity=62
&humidity=70
&windspeedmph=0.9
&windgustmph=2.2
&winddir=34
&absbaromin=29.543
&baromin=29.723
&rainin=0.000
&dailyrainin=0.193
&weeklyrainin=0.331
&monthlyrainin=1.311
&solarradiation=234.15
&UV=2
&dateutc=2022-07-30%2011:19:48
&softwaretype=EasyWeatherV1.5.9
&action=updateraw
&realtime=1
&rtfreq=5

Our weather station seems to provide all expected rain increments, except for yearly, which is the only one considered:

https://github.com/matthewwall/weewx-interceptor/blob/4c4a7fbdb109a4ee49c27d1e249c3e4259294525/bin/user/interceptor.py#L1370

This leads to missed rain when the weather station is not able to transmit its data to weewx before day's end. (This is also linked to some Wifi issues with my station, which is an unrelated issue I am currently looking into.)

The code should consider yearly, then monthly, then weekly, then daily. Do you agree? I could provide a PR if you are willing to merge it.