Thanks Rainer!

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

Cheers,
Paul.

On Saturday, 22 July 2023 at 11:08:14 UTC+10 Rainer Lang wrote:

> 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
>
> On 21.07.2023 17:07, [email protected] wrote:
>
> 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!
>
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/c2587160-ce5a-4227-afff-9959e2d55a9an%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/weewx-user/c2587160-ce5a-4227-afff-9959e2d55a9an%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8e4f525a-24d6-4d22-98a8-a666e068749fn%40googlegroups.com.

Reply via email to