AussieSusan / HP1000

Weewx driver for the HP1000 (WS1001, XC0422) Weather Station using WiFi connection
7 stars 4 forks source link

Absence of almanac/archive data #2

Closed ronguest closed 3 years ago

ronguest commented 5 years ago

Hello and thank you for creating this driver! I have it up and running with my Ambient Weather WS-1001 and for the most part it is successful. However the rain historical info (rain this month, rain this year, etc) is all 0.0. Hence in weewx as well as the Cumulus dashboard the values shown are 0.0. My weather station reports this historical information but I don't know if the HP1000 is able to access it. I see in the log that it makes an attempt which lasts some seconds. I took a look at the code but I don't really understand it and am at a loss how to investigate or fix this. If you have any advice I would sure appreciate it. If the info can't be pulled directly from the station I am wondering if I could somehow inject it by pulling it from Ambient Weather's site (via API call returning JSON info). I know how to do the API calls but I don't know how to inject it into what ends up in the realtime.txt file. Anyway, if you have advice I sure would appreciate it?

Mar 20 12:57:10 Pi0W weewx[9727]: HP1000: Connected to address ('10.0.1.101', 50769) Mar 20 12:57:11 Pi0W weewx[9727]: HP1000: Established contact at 20/03/19 12:57:11 Mar 20 12:57:11 Pi0W weewx[9727]: HP1000: Retrieving startup records Mar 20 12:57:26 Pi0W weewx[9727]: engine: Starting main packet loop.

ronguest commented 5 years ago

I was looking over the code again and I saw these comments but I didn't find code the was making use of the received data (I guess it is being received?). So maybe the driver doesn't support that data?

rec_data[15] is the 'weekly rain' total

rec_data[16] is the 'monthly rain' total

rec_data[17] is the 'yearly rain' total

AussieSusan commented 5 years ago

(Sorry for not answering sooner - I had no idea this 'comment' section existed: only use the very basic parts of Github.) Its not the driver that doesn't support those fields but, as far as I can tell, weewx packets don't have those fields. The values are generated by weewx itself based on the 'cumulative' rain values form the startup or loop packets.

AussieSusan commented 5 years ago

Didn't mean to close the issue - again not sure of the options to select.

ronguest commented 5 years ago

I made an attempt to manually get the data into weewx to correct the historical info. It mostly worked but created some erroneous data. So I decided to delete the weewx sql database and let it reload everything. When I did that it got all the data from the WS and calculated the rain totals. I don't have any idea why it didn't work initially - probably I did something wrong but not sure what.

I think this could be closed.