How to do that?  I *honestly* searched the message board off and on for the 
last month, scoured the documentation, etc.  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

My workaround is, as soon as I can ssh in after boot, I run:

sudo /etc/init.d/weewx stop

Wait 4-5 minutes and run 

sudo /etc/init.d/weewx start

There has to be a better way . . . can one set a cron on that runs on boot, 
sleeps 5 minutes, and then starts weewx?  Is it waiting for ntp to set the 
time?  I dunno . . . 

- Paul VE1DX

On Saturday, February 27, 2021 at 12:09:39 PM UTC-4 tke...@gmail.com wrote:

> Unfortunately, wee_reports has to load extensions.py, because there might 
> be some user extensions in there, which it might need for the reports (for 
> example, an xtypes extension). So, whatever is in there, is going to get 
> executed.
>
> I no longer think an arbitrary 45 second sleep is such a good idea. The 
> engine already has something that causes it to wait until the time is 
> greater than the timestamp on weewx.conf, so that should give some measure 
> of protection against clock slew. But, the best way to approach the problem 
> is through systemd time synchronizations.
>
> If you really want to sleep, then it's probably best done with a WeeWX 
> extension that's bound to the STARTUP event.
>
>
>
> On Sat, Feb 27, 2021 at 7:56 AM WindnFog <foc...@gmail.com> wrote:
>
>> Here's an oddity.  To delay weewx from starting for 45 seconds after a 
>> reboot, I used Tom's 2019 suggestion of putting a delay of 45 in 
>> /usr/share/weewx/user/extensions.py . . . and this works well, except it 
>> also kicks in when you run wee_reports:
>>
>>
>>
>>
>>
>>
>>
>> *sudo wee_reports^CTraceback (most recent call last):  File 
>> "/usr/share/weewx/wee_reports", line 16, in <module>    import 
>> user.extensions  File "/usr/share/weewx/user/extensions.py", line 20, in 
>> <module>    time.sleep(45)KeyboardInterrupt*   <--- I ctrl-C'ed out of 
>> this after 25-30 seconds.
>>
>> Is there any way to change the code so that wee_reports doesn't execute 
>> the time.sleep(45) command?
>>
>> - Paul VE1DX
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/1c121d0d-e909-425e-b532-7d79fc2d9954n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/1c121d0d-e909-425e-b532-7d79fc2d9954n%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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0ebbf740-3de8-40af-8ead-ca739dc6bb07n%40googlegroups.com.

Reply via email to