Question about MaxSolarRad

127 views
Skip to first unread message

Earl Baugh

unread,
Aug 9, 2022, 11:29:26 AM8/9/22
to weewx-user
I recently upgraded to the latest version of weewx and the data for maxSolarRad (I've confirmed in the DB) has stopped being reported.    This isn't something being reported by my weather sensors.

It was working before (and feeding a graph on my site) but now it doesn't show anything.
I've read thru the conversations and googled and RTFM but I don't see anything that would have changed this behavior (it's not something I had actually done anything special to configure before and it was working and now it's just vanished)

I noticed because I finally was getting around to fixing my two UV sensors (upgrading one and adding enhancements to the enclosure to try to prevent moisture problems)  and I saw that the graph was gone.

I'm probably missing something stupid.... any pointers?

Thanks in advance,

Earl Baugh


Karen K

unread,
Aug 9, 2022, 1:05:59 PM8/9/22
to weewx-user
Is there something like

[StdWXCalculate]
    [[Calculations]]
        ...
        maxSolarRad = prefer_hardware

in your weewx.conf?

If not, add the line with maxSolarRad there. If yes, try software instead of prefer_hardware.

gjr80

unread,
Aug 9, 2022, 11:19:41 PM8/9/22
to weewx-user
You might want to check that the pyephem module is still available to WeeWX, this could be the problem if in upgrading WeeWX you moved from python 2 to python 3. If you are running WeeWX v4.7.0 or later check the WeeWX startup log to see if pyephem was found, you should see one of the following two entries in the log:

'pyephem' detected, extended almanac data is available

or

'pyephem' not detected, extended almanac data is not available

(While looking in the startup log take note of the python version being used by WeeWX, you will need it later if re-installing pyephem. It will be near the start of the startup log.)

If you saw the latter WeeWX did not find pyephem and you should first try re-installing pyephem as outlined below. If you are running WeeWX v4.6.2 or earlier you will not see either of the above messages, you will need to check for pyephem manually. Look in the log for the python version WeeWX is running under, you will see this logged by WeeWX during WeeWX startup. Note that depending on your system it may be different to the version used when executing the python command from the command line. If WeeWX is using python 3 what do you see when executing the following from the command line on your WeeWX machine:

$ python3 -c "import ephem; print(ephem._version__)"

If WeeWX is using python 2 try:

$ python2 -c "import ephem; print ephem._version__"

If you are presented with a version number similar to the following then pyephem is loaded:

$ python3 -c "import ephem;print(ephem.__version__)"
4.1.3

If you get a ModuleNotFoundError then pyephem is not installed and you will need to install it for the python version used by WeeWX.

To re-install pyephem under python 3:

$ sudo apt install python3-ephem

For python 2:
$ sudo apt-get install python-dev
$ sudo apt-get install python-pip

$ sudo pip install pyephem

Stop WeeWX if it is running and try running WeeWX directly, do you see MaxSolarRad in the output? If so exit and restart WeeWX as a daemon as per normal. If not let us know.

Gary

Earl Baugh

unread,
Sep 28, 2022, 5:28:14 PM9/28/22
to weewx-user
Sorry for the slow reply.... thanks to your helpful info, I found out that I was missing the  pyephem module wasn't installed.
So as part my machine update that hadn't gotten updated.   I did also check the  maxSolarRad = prefer_hardware setting first
and made sure it was set that way as well.

Now it's properly displaying the graphs I had seen before.

Thanks again!

Earl

michael.k...@gmx.at

unread,
Sep 29, 2022, 12:48:34 PM9/29/22
to weewx-user
Thanks Gary, I just stumbled across this and realized I forgot pyephem after doing a fresh install.

One thing: you have a typo above (2 out of 3), the attribute is "__version__", not "_version__"

Reply all
Reply to author
Forward
0 new messages