Belchertown Skin Highchart Rounding Battery Values

91 views
Skip to first unread message

Al P

unread,
Dec 23, 2020, 11:28:11 AM12/23/20
to weewx-user
I have had weewx installed for a week or so, and loving it.
I've started playing with Belchertown and like the look of it, but I've hit a minor problem.

I would like to chart a voltage value to 3 decimal places. Why you ask? Because I've recently installed a WeatherFlow Tempest in an overcast climate and I really want to see how much/little sunshine it takes for it to charge!

I have the sensor value mapped to supplyVoltage, and have created a chart in the Seasons skin that shows the precision I'm looking for, but when using the same field in the Belchertown charts it only ever shows to 2 decimal places.
The value definitely has 3 decimal places, I have printed the current value to my footer.

Anyone able help me find where it does this?

Cheers,
 Alan

vince

unread,
Dec 23, 2020, 2:51:13 PM12/23/20
to weewx-user
On Wednesday, December 23, 2020 at 8:28:11 AM UTC-8 Al P wrote:
I would like to chart a voltage value to 3 decimal places. Why you ask? Because I've recently installed a WeatherFlow Tempest in an overcast climate and I really want to see how much/little sunshine it takes for it to charge!


Are you 'sure' the unit reports to three decimal points ?
My recollection is WF gear only reports to two (but my memory might be hazy).

Remember, an archive record is an average of the data received over that archive period, so the average of a 2-digit actual measurement will seem to be a many-digit value.

But that said, if you look in skin.conf you will see a section called StringFormats where you can set it to any number of digits you want.

Al P

unread,
Dec 23, 2020, 3:08:38 PM12/23/20
to weewx-user
Yep, I can see 3 digits in the UDP packets, and as I mentioned I can see the 3 digits in the chart in the seasons skin. I've also added the current value to my footer and can see the 3 digits there. It's only in the chart that it seems to round to 2 digits. The stringformat is already %.3f for the rest of it to work.

Al P

unread,
Dec 24, 2020, 12:51:34 PM12/24/20
to weewx-user
I may have found what was causing this, but I'm not entirely certain.
I think line 2442
usage_round = int(self.skin_dict['Units']['StringFormats'].get(obs_vt[2], "2f")[-2]) 
maybe should be
usage_round = int(self.skin_dict['Units']['StringFormats'].get(obs_vt[1], "2f")[-2])

because obs_vt[2] appears to show the observation group
and obs_vt[1] the observation type

It's working for me and doesn't seem to have broken anything. 
Reply all
Reply to author
Forward
0 new messages