maxSolarRad not calculated since switching to Python 3

80 views
Skip to first unread message

Manfred Maier

unread,
May 2, 2020, 2:57:50 PM5/2/20
to weewx-user
Hi,
I've just detected that maxSolarRadiation isn't calculated since I've switched to the Python 3 version of Weewx.
Before switching to Python 3, I already had the Python 2 version of 4.0.0 installed for a couple of hours. maxSolarRad got calculated during that time.

Any idea what the issue could be? 

maxSolarRad is included in the weewx.conf.
I've tried the prefer_hardware and software option.

[StdWXCalculate]


    [[Calculations]]

        # How to calculate derived quantities.  Possible values are:

        #  hardware        - use the value provided by hardware

        #  software        - use the value calculated by weewx

        #  prefer_hardware - use value provide by hardware if available,

        #                      otherwise use value calculated by weewx


        pressure = prefer_hardware

        barometer = prefer_hardware

        altimeter = prefer_hardware

        windchill = prefer_hardware

        heatindex = prefer_hardware

        dewpoint = prefer_hardware

        inDewpoint = prefer_hardware

        rainRate = prefer_hardware

        maxSolarRad = prefer_hardware

        windrun = prefer_hardware

        appTemp = prefer_hardware

        cloudbase = prefer_hardware

        humidex = prefer_hardware

        ET = prefer_hardware


Tom Keffer

unread,
May 2, 2020, 3:18:39 PM5/2/20
to weewx-user
1. When you say "maxSolarRadiation isn't calculated" do you mean it does not appear in LOOP or archive records at all? Or, that it has value None?

2. Look in the system log for something like

May  2 07:21:39 nuc weewx[110614] INFO weewx.wxservices: The following values will be calculated: pressure=prefer_hardware, altimeter=prefer_hardware, appTemp=prefer_hardware, barometer=prefer_hardware, beaufort=prefer_hardware, cloudbase=prefer_hardware, dewpoint=prefer_hardware, ET=prefer_hardware, heatindex=prefer_hardware, humidex=prefer_hardware, inDewpoint=prefer_hardware, maxSolarRad=prefer_hardware, rainRate=prefer_hardware, windchill=prefer_hardware, windrun=prefer_hardware

What does it say?

-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/c1744cac-b0ab-4d71-bda3-bbfe438ddf42%40googlegroups.com.

Manfred Maier

unread,
May 2, 2020, 3:30:19 PM5/2/20
to weewx-user
1) In the archive table in the database it's <NULL> since I've switched to the Python 3 version. 
I've just noticed, that appTemp and windrun were also affected for a couple of hours (also <Null>). But both meanwhile get calculated and have valid values in the database

2) This is what I find in the log:

May  2 21:01:43 raspberrypi wee_reports[3538] INFO weewx.wxservices: The following values will be calculated: pressure=prefer_hardware, barometer=prefer_hardware, altimeter=prefer_hardware, windchill=prefer_hardware, heatindex=prefer_hardware, dewpoint=prefer_hardware, inDewpoint=prefer_hardware, rainRate=prefer_hardware, maxSolarRad=prefer_hardware, windrun=prefer_hardware, appTemp=prefer_hardware, cloudbase=prefer_hardware, humidex=prefer_hardware, ET=prefer_hardware

May  2 21:01:43 raspberrypi wee_reports[3538] INFO weewx.wxservices: The following algorithms will be used for calculations: altimeter=aaASOS, maxSolarRad=RS

To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Tom Keffer

unread,
May 2, 2020, 3:46:09 PM5/2/20
to weewx-user
I suspect that you're missing something to do the calculation. Let's check by using the attached instrumented version of wxservices.py.

If you used a package installer, it goes in /usr/share/weewx/weewx/wxservices.py

If you used the setup.py install method, it goes in /home/weewx/bin/weewx/wxservices.py.

Restart weewx. Let it run for an archive interval, post the log.

-tk

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/e7ffbd8a-3d0c-46cd-b3c3-86d5005d76d8%40googlegroups.com.
wxservices.py

Manfred Maier

unread,
May 2, 2020, 4:12:06 PM5/2/20
to weewx-user
Here you go.
syslog since the restart of weewx

syslog.txt

Tom Keffer

unread,
May 2, 2020, 4:20:42 PM5/2/20
to weewx-user
That looks normal. 

When you run weewxd directly from the command line, what do you see for maxSolarRad values? Check both LOOP packets (marked with LOOP:) and archive records (marked with REC:)

-tk

On Sat, May 2, 2020 at 1:12 PM Manfred Maier <moni.und...@web.de> wrote:
Here you go.
syslog since the restart of weewx

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

Tom Keffer

unread,
May 2, 2020, 4:24:10 PM5/2/20
to weewx-user
Manfred, user 'Dale' suggested to me offline that the problem could be that you have not installed the package 'ephem' for Python 3.

sudo apt install python3-ephem

-tk

Manfred Maier

unread,
May 2, 2020, 4:37:30 PM5/2/20
to weewx-user
User 'Dale' nailed it!

After installing ephem for Python3 I have maxSolarRad back in my database :). 
Thanks so much! The support here is absolutely fantastic!

Three related questions:
1) Is there somewhere a list of packages that should be updated to Python 3?
2) Is there a way to calculate maxSolarRad for the missing times in the database?
3) Is there somewhere a 'piggybank' for the weewx developers? Haven't found anything on the website.

Manfred 

vince

unread,
May 2, 2020, 4:51:03 PM5/2/20
to weewx-user
On Saturday, May 2, 2020 at 1:37:30 PM UTC-7, Manfred Maier wrote:
1) Is there somewhere a list of packages that should be updated to Python 3?

Manfred Maier

unread,
May 3, 2020, 4:39:57 AM5/3/20
to weewx-user
Thanks, vince!

... and meanwhile I found the answer to question 2 myself. Reading documentation sometimes helps :)
Reply all
Reply to author
Forward
0 new messages