One thing you can do with the Raspberry Pi is to add a RealTimeClock (RTC) 
board. I use the RasClock 4.0 RTC for my Raspberry Pi to retain the system 
clock. This solves any time variances on my WeeWx data verses the system 
clock

On Wednesday, June 30, 2021 at 10:55:55 AM UTC-4 WindnFog wrote:

> That did the trick:
>
>
> Right after reboot:
>
>
> Weewx uptime: 0 days, 0 hours, 1 minute
>
> Server uptime: 0 days, 0 hours, 0 minutes
>
>
> After the script ran (I wrote it exactly as you suggested):
>
>
> Weewx uptime: 0 days, 0 hours, 4 minutes
>
> Server uptime: 0 days, 0 hours, 10 minutes
>
>
> - Paul VE1DX
>
>
> On 2021-06-29 6:35 p.m., vince wrote:
>
> On Tuesday, June 29, 2021 at 12:48:09 PM UTC-7 WindnFog wrote:
>
>> It's nitpicking, but if I reboot my Pi, the server uptime is always 
>> shorter than the weewx uptime.  I get things like:
>>
>> Weewx uptime:10 days, 1 hour, 38 minutes
>> Server uptime: 10 days, 1 hour, 36 minutes
>>
>
> It does seem like nitpicking perhaps.
> Is it really 'that' important to spend all this time worrying it ?
>
> I did a trial on my pi4 with the simulator and see the same thing.  The 
> weewx uptime is a minute more than the server uptime.  I'm guessing it has 
> something to do with the order the threads get their brains straight but I 
> didn't do much digging around.   If you want to look at the code, check out 
> bin/weewx/station.py
>
> If it bothers you that much, you could add a cron job that resets weewx a 
> few minutes after reboot.
> ref: https://www.tomshardware.com/how-to/run-script-at-boot-raspberry-pi
>
> Perhaps a simple bash script ala "sleep 300 && systemctl restart weewx" or 
> the like (untested).
>
> -- 
> You received this message because you are subscribed to a topic in the 
> Google Groups "weewx-user" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/weewx-user/kMMYGq5gC6E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/b8bc0592-65ac-4e9c-a7dc-2dedce87882cn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/b8bc0592-65ac-4e9c-a7dc-2dedce87882cn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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/3342f952-1860-460e-a7b8-bbebb11117fbn%40googlegroups.com.

Reply via email to