WeeWX 5.0.2 voltages with 6 digits after the decimal point

116 views
Skip to first unread message

Mike G.

unread,
Feb 27, 2024, 12:20:55 PM2/27/24
to weewx-user
Hello.

I have a clean Debian 12 and WeeWX 5.0.2 installation and am currently configuring the ecowitt devices (GW1100, WH65, WH51, WH31, WN34, WH55 and WH57).

I am using the Ecowitt Gateway v0.6.1 from gjr80 as the driver.

The voltages of soilTemp and soilMoist should be displayed under " Sensors".
The missing columns "soilMoistBattx" and "soilTempBattx" have been added to the SQL database.

Now the voltages on the left are displayed with 6 digits after the decimal point.
The driver and the graphics on the right correctly show 2 digits after the decimal point.

Whats wrong? How can I fix this?

Greetings, Mike

Screenshot 2024-02-22 at 12-36-32 Test City.png

gjr80

unread,
Feb 27, 2024, 3:29:12 PM2/27/24
to weewx-user
The problem is WeeWX does not know whether your sensor battery fields are temperatures, pressures or voltages etc so WeeWX presents the data as it comes out of the database and with no units labels. To have WeeWX take care of formatting and unit labels each field needs to be assigned to a WeeWX unit group, the Ecowitt gateway driver does this automatically for all WeeWX fields in the default file map, but if you decide to change the field mapping you are responsible for making the unit group assignments yourself. There are a number of ways you can do this, but the easiest is to add a few lines of code to bin/user/extensions.py (the location of bin/user/extensions.py is dependent on how you installed WeeWX, refer to Location of WeeWX components in the User's Guide). Try adding the following to extensions.py:

import weewx.units
weewx.units.obs_group_dict['soilMoistBattx'] = 'group_volt'

add a weewx.units.obs_group_dict entry for each field you have added. Once you have made the changes save extensions.py and restart WeeWX. WeeWX will then apply the default group_voltage formatting and unit labelling for your sensor battery fields.

Gary

Mike G.

unread,
Feb 28, 2024, 4:13:37 AM2/28/24
to weewx-user
Yes, that was it.

Thank you grj80, I was also able to assign the signal quality of other unknown devices.

Have a nice day and stay healthy.
Reply all
Reply to author
Forward
0 new messages