My "rain" field adds up

95 views
Skip to first unread message

Sébastien F4GQK

unread,
Oct 7, 2020, 8:40:03 AM10/7/20
to weewx-user
Hello,

 I have a WALDBECK Halley WHT3 weather station I use a home automation system where I receive information from the station and via a php file, I have the possibility of exporting to Weewx a txt file with the different fields recognized by weewx (currently every minute)

 In this file, the xxxxx server resets a value to zero: dailyrainin every day at midnight I added the "rain" field in my generated file "Today's Rain" is no longer at zero but every 10 minutes weewx adds my dailyrain. Currently 300 mm today !!!!!!! 


 It is the PWS server which gives me my dailyrain.  

Thanks

Susan Mackay

unread,
Oct 8, 2020, 1:47:46 AM10/8/20
to weewx-user
WeeWx expects the amount of rain since the last packet. Therefore you need to remember the last 'rain' value you sent and then subtract that from the current reading (and remember the new value for the next packet).
I know you are not using my driver but if you have a look at the HP1000 driver python source you will see how I handle that for my weather station which does the same thing - reports the current daily total each time. There are probably many other drivers out there that do the same thing.
Susan

Sébastien F4GQK

unread,
Oct 8, 2020, 7:38:11 AM10/8/20
to weewx-user
Thank you for the answer.

I'm not good enough at php to do a command line that would do this subtraction operation.

Where in HP1000.py it is.

It would not be better to just tell it to stop adding the daily precipitation value. The weather station knows the value of the daily precipitation, it performs the calculation itself.

If anyone knows where in weewx, "rain" is added (I use fileparse) ??????

Susan Mackay

unread,
Oct 9, 2020, 1:39:22 AM10/9/20
to weewx-user
Where in HP1000.py it is.

Lines 714 to 734 in the latest version.
Susan 

Sébastien F4GQK

unread,
Oct 9, 2020, 5:37:55 AM10/9/20
to weewx-user
Thanks


the daily rainfall values ​​are subtracted from the file: /usr/share/weewx/weewx/wxformulas.py there are two variables: oldtotal and newtotal. oldtotal is old value and newtotal is new the result of this calculation is the variable "delta" but what is the file that uses this value "delta" ????

sebastien 

Reply all
Reply to author
Forward
0 new messages