WeeWX 4.1.0: Server uptime, extra data and plots

131 views
Skip to first unread message

Marius Schamschula

unread,
May 27, 2020, 10:06:27 AM5/27/20
to weewx-user
After some debugging, my FreeBSD server is finally running WeeWX 4.1.0 using Python 3.8 (instead of Python 2.7). Two things

1) The server uptime is no longer correct. I, getting

Weewx uptime: 0 days, 21 hours, 5 minutes
Server uptime: 18409 days, 14 hours, 0 minutes
weewx v4.1.0

That's longer than I've had the server....

It used to be correct (WeeWX 4.0.0 and below, using Python 2.7).

2) The Solar Radiation, ET and UV data and plots started showing, even though my VantagePro II doesn't have those sensors installed.

No big deal: I've just removed these items from the template.

Tom Keffer

unread,
May 27, 2020, 10:24:45 AM5/27/20
to weewx-user
Could you try running the following under Python 3.8 and Python 2.7? Thanks!

import ctypes
from ctypes.util import find_library

libc = ctypes.CDLL(find_library('c'))
size = ctypes.c_size_t()
buf = ctypes.c_int()
size.value = ctypes.sizeof(buf)
libc.sysctlbyname("kern.boottime", ctypes.byref(buf), ctypes.byref(size), None, 0)
os_uptime_secs = time.time() - float(buf.value)
print(os_uptime_secs)
print(buf)

-tk



--
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/9388f157-8302-499b-99da-fb99db9c1f14%40googlegroups.com.

Marius Schamschula

unread,
May 27, 2020, 11:21:55 AM5/27/20
to weewx-user

# python3.8 test.py 

1590592851.7261915

c_int(0)

# python2.7 test.py 

1567100.76301

c_int(1589025758)

Tom Keffer

unread,
May 27, 2020, 3:49:11 PM5/27/20
to weewx-user
Marius, try this version of station.py. 

-tk

--
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.
station.py

Marius Schamschula

unread,
May 27, 2020, 7:06:44 PM5/27/20
to weewx-user
Tom,

That didn't help:

I manually installed the station.py file, ran 

python3 -m compileall ./station.py


to get the .pyc file and restarted the weewx service.


On Wednesday, May 27, 2020 at 9:06:27 AM UTC-5, Marius Schamschula wrote:

Tom Keffer

unread,
May 27, 2020, 7:47:07 PM5/27/20
to weewx-user
Oops. Typo in the file. Try this one.

-tk


--
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.
station.py

Marius Schamschula

unread,
May 27, 2020, 7:59:47 PM5/27/20
to weewx-user
Success!

Thanks!


On Wednesday, May 27, 2020 at 9:06:27 AM UTC-5, Marius Schamschula wrote:
Reply all
Reply to author
Forward
0 new messages