Hey, Cameron,

First off, Matt did take my diff for adding a rain counter warning message to 
the wmr300.py already.  =D  It's a start in that it logs a warning.  See my 
other note on what I did to trigger an e-mail via cron and mailx.  =D

As an aside, 1% of the maximum rain-counter is something like a meter of rain, 
which is more than we get here in a typical year in Michigan.  So that 90% 
warning will likely not come for several years.   I have my warning set to 1% 
currently, just to make sure my code is doing what I expect.  I tried it with 
0% and it did log the message at least.  =D

As for the WMR300 timing out / going non-responsive, I've had that happen just 
once so far and it seems to be happening at the USB driver level, because 
restarting weewxd was no help.   The only symptom was that the weewx logging 
stopped (e.g. no further messages after a time).
I had to actually reboot the RPI to correct the issue (like I said a restart of 
weewx was no help -- it couldn't properly read from USB).  :S
Fingers crossed that it doesn't happen again now that I've got things 
stabilized and am not bombarding the unit with history downloads.  =D

After I used the *correct* procedure to clear the history, I do now see some 
helpful messages in the logs:

Apr 14 13:14:15 nixie weewx[6906]: wmr300: history limit is 20%
Apr 14 13:14:30 nixie weewx[6906]: wmr300: get history complete: count=0 
last_index=762 latest_index=763
Apr 14 13:14:37 nixie weewx[6906]: wmr300: history buffer at 2.2%

Whereas, before I reset it, I saw:

Apr 13 20:48:56 nixie weewx[424]: wmr300: get history complete: count=0 
last_index=32735 latest_index=32736
Apr 13 20:51:59 nixie weewx[424]: wmr300: history buffer at 100.0%
Apr 13 22:33:11 nixie weewx[1215]: wmr300: history limit is 20%
Apr 14 00:15:17 nixie weewx[1215]: wmr300: get history complete: count=32685 
last_index=32735 latest_index=32736
Apr 14 00:15:36 nixie weewx[1215]: wmr300: history buffer at 100.0%
Apr 14 00:17:57 nixie weewx[1458]: wmr300: history limit is 20%
Apr 14 00:20:09 nixie weewx[1458]: wmr300: get history complete: count=0 
last_index=32735 latest_index=32736
Apr 14 00:20:25 nixie weewx[1458]: wmr300: history buffer at 100.0%
Apr 14 00:45:35 nixie weewx[362]: wmr300: history limit is 20%
Apr 14 00:52:08 nixie weewx[362]: engine: Caught WeeWxIOError: Init history 
failed after 5 tries
Apr 14 00:53:08 nixie weewx[362]: wmr300: history limit is 20%

Did you see that error above?  Looks like it tried to reset the history and 
couldn't.  :S

And upon the actual reset (which I did using the *correct* procedure from the 
WMR300 unit itself):

Apr 14 01:02:30 nixie weewx[362]: wmr300: get history complete: count=0 
last_index=30820 latest_index=32
Apr 14 01:02:50 nixie weewx[362]: wmr300: history buffer at 0.0%

The weewx attempt to clear the history must have done *something* after all, 
because you can see that before I reset it, the number had dropped from 32736 
to 30820.
We can see that 32736+32 is 32768, a "magic" power of 2, so even the empty 
memory must contain 32 reserved records.

Anyway, I've set a reminder to check the history every two weeks in case the 
automatic clearing via weewx isn't working.  :S

Regards,
Leon
--
Leon Shaner :: Dearborn, Michigan (iPad Pro)

> On Apr 15, 2019, at 8:29 AM, Cameron D <cgoo...@davidsoncj.id.au> wrote:
> 
> Hi Leon,
> 
> I too use 1 minute intervals.
> 
> I wrote the code changes to automatically clear the history when it reaches 
> x% full.  The current version has these changes in, so you should be OK for 
> now.
> But search through the list archives to find the threads about WMR300 hanging 
> - I have posted a patched driver that seem to fix those problems. For some 
> users the WMR300 stops reporting but it has never been clear why this happens 
> in the first place.
> 
> Warnings about the rain and the date mismatch would be great things to have, 
> but I can't recall how far they have progressed.  I am not at home to check.
> 
> Cheers,
> Cameron
> 
> 
> 
>> On Sunday, 14 April 2019 06:13:33 UTC+1, Leon Shaner wrote:
>> Hey, Cameron,
>> 
>> You are absolutely right!  I did some digging and determined that my WMR300 
>> is set to 1 minute internal data logging interval, which is good only for 22 
>> days and has been full since 2016!  I confirmed this by moving my SD card to 
>> a faster RPI and starting from a fresh weewx.sdb, and watched as it pulled 
>> in less than a month's worth of data from July of 2016, then said it was 
>> done processing the data from the unit.
>> 
>> I found the right doc on how to clear the WMR300's internal data log.
>> I'll set a reminder to do so every other Sunday.
>> 
>> It would be nice if the WeeWX WMR300 driver could automatically do a weekly 
>> purge of the oldest 1 week's worth of data.  That would keep it well below 
>> the default 22 day limit.
>> 
>> I saw mention in the comments in the driver that the protocol does support 
>> purging of records after reading them.
>> Of course what is unclear is if you do purge the oldest 1-week worth of data 
>> does that actually free up space to allow the next week going forward?
>> Probably deserves some experimentation.  :-/
>> 
>> Anyway, thanks for the note.  =D
>> 
>> Here's that doc.  Bear in mind the rain counter is reset separately by 
>> touching the rain display a few times until it say "ACCUM" and then you can 
>> hold the MEM button there to reset it.  If it's full it says HHH for the 
>> total accumulation of rain.
>> 
>> I think I will write a mod and submit it via github to have a warning when 
>> the rain limit is at 90%.  =D
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to