I have just created a python script that can detect that the clock has
changed, which can be used stop WeeWX and clean the Vantage memory, just
need to work out the logic to re-start it. Plan to put this in cron running
every 5 minutes so it just runs and will automatically fix the clock change
issue.
Change minutes=4 to something like hours=12 to see this actually do
something and this is the stop part, need an if statement for the start
part and then have to work out how to start and stop WeeWX from within
python
For spring when GMT > BST it is safe to start, but in autumn they are the
same value so have to wait an hour, just have to work out how
*import* pytz
*import* datetime
tz = pytz.timezone("Europe/London")
gmt = pytz.utc
startTime = datetime.datetime.now(gmt).time()
*for* utc_transition_time *in* tz._utc_transition_times:
*if* datetime.date.today() == utc_transition_time.date():
*if* utc_transition_time.time() <= startTime < (utc_transition_time +
datetime.timedelta(minutes=4)).time():
print(utc_transition_time + datetime.timedelta(minutes=4))
print(utc_transition_time)
print(utc_transition_time.date())
print(utc_transition_time.time())
print(startTime)
On Sunday, March 28, 2021 at 11:35:54 AM UTC+1 vigilance wx wrote:
> same issue
> I have been using weewx around 7 years with a vantage and for the most
> part it runs flawlessly. i have version 3.9.1 running without any issues
> just this memory problem once every 6 months in march and October
>
> On Sunday, March 28, 2021 at 10:57:03 AM UTC+1 [email protected] wrote:
>
>> snap, just posted the same message and wee_device --clear-memory was the
>> only way I could get it running again as well.
>>
>> I want a cron job fix
>>
>> On Sunday, March 28, 2021 at 10:51:52 AM UTC+1 Alastair L wrote:
>>
>>> Hi. Looking back at previous posts memory corruption of the Davis WS
>>> has been discussed a fair bit. My Pi 4 running Weewx 4.4.0 and connected
>>> to a Vantage Pro was working without any problems until 1am this morning
>>> when it stopped updating. I could only get it to update again by clearing
>>> the Vantage memory (using wee_device --clear-memory). My Pi is fitted with
>>> a RTC and there was no power outage last night. The only obvious thing that
>>> may be relevant is that daylight saving time 2021 in United Kingdom began
>>> at 01:00 on Sunday, 28 March, the time weewx stopped updating. I was
>>> wondering if anyone else with a Davis WS had a similar issue if so is there
>>> a fix? Thanks.
>>>
>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/5e7db6d8-4963-4523-b9c4-b2c6f809b6b1n%40googlegroups.com.