Seasons skin, multiple WH51 sensors - wrong units

73 views
Skip to first unread message

paulth...@gmail.com

unread,
Jul 21, 2023, 11:07:15 AM7/21/23
to weewx-user
I bought a HP2551 weather station to replace my old, trusty but crusty WH3081.

I went with the Seasons skin, because it was the only one that seemed to recognise the  WH51 moisture sensor.  I followed some Internet instructions to display the WH51 readings as a percentage instead of "cb"; job done.

I recently bought a second WH51 sensor, and added it to weewx.conf in the same way (soil_moisture_percent) as the first sensor; it stubbornly displays as "cb".

Any ideas?

Cheers!

Mark Fraser

unread,
Jul 21, 2023, 12:08:32 PM7/21/23
to weewx-user
I'm in the same situation. Looking at the weewx documentation it only supports cb units for moisture. Was looking to see if there is a conversion between units.

--
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/c2587160-ce5a-4227-afff-9959e2d55a9an%40googlegroups.com.

vince

unread,
Jul 21, 2023, 12:32:18 PM7/21/23
to weewx-user
A search for "moisture units" here found this link - https://groups.google.com/g/weewx-user/c/0FrJfajXxcs/m/_0Foj58-AQAJ

Rainer Lang

unread,
Jul 21, 2023, 9:08:14 PM7/21/23
to weewx...@googlegroups.com

Assuming you assign your WH51 sensors to the SoilMoist1 thru SoilMoist4 database fields, be via a fieldmap extension or a StdCalibrate/Corrections entry in weewx.conf,
you will also have to add some changes to extensions.py (in /usr/share/weewx/user or /home/weewx .... depending on your installation):
(I also assume you are using an extended Interceptor driver for weewx to read the HP2551 consol posts)

import weewx.units
weewx.units.obs_group_dict['soilMoist1'] = 'group_percent'
weewx.units.obs_group_dict['soilMoist2'] = 'group_percent'

for each of the four available soilMoist fields in the wsview_extended database schema, you will need to make such an entry
(but only if you have another WH51 sensor) if you want their readings shown in % rather than in cb
if you have more than four WH51 (and want to save their values in the database), you will either need to repurpose other not used fields in the wsview_extended database schema or create additional columns in your database e.g. by the help of the wee_database tool

(the entry/line "import weewx.units"  needs to be there only once; if it's already there, you don't need to add it a second time !)

weewx needs to restarted after having made the changes to extensions.py

paulth...@gmail.com

unread,
Jul 26, 2023, 12:34:32 AM7/26/23
to weewx-user
Thanks Rainer!

extensions.py was indeed the missing piece I needed to get the right units.

Cheers,
Paul.
Reply all
Reply to author
Forward
0 new messages