Disclaimer, I don’t know anything about the Belchertown skin, but since 
your site is public, I thought I would poke around see if I could help.

From, https://www.w3schools.com/jsref/jsref_tolocalestring_number.asp, it 
looks like valid values for minimumFractionDigits is 0 to 20.
I guessed that the exception was in the onMessageArrived callback.
If you trace the code from when a MQTT message arrive, at line 1675 is
‘html_output = 
parseFloat(parseFloat(data[mqttdata])).toLocaleString("en-US", 
{minimumFractionDigits: unit_rounding_array[thisElementClass], 
maximumFractionDigits: unit_rounding_array[thisElementClass], useGrouping: 
localeStringUseGrouping}) + unit_label_array[thisElementClass]'

When the exception is raised, thisElementClass = lightning_strike_count and 
unit_rounding_array[‘lightning_strike_count’] = %d. Reading the code, 
unit_rounding_array is sourced from weewx_data.json.

Any chance that you also started publishing_lightning_strike_count when you 
started publishing soilMoistN?

Hopefully someone who uses/knows Belchertown can tell you how 
weewx_data.json is created. If not, I’d stop publishing 
lightning_strike_count (and any other observations with non-numeric values 
in weewx_data.json) and see if that helps.
rich

On Tuesday, 10 October 2023 at 09:12:49 UTC-4 Stefan Gliessmann wrote:

> Thanks again, Greg, for you "moral" support ;)
>
> with the appropiate setting in weewx.conf for the MQTT extension, the soil 
> moisture values have no digits after the decimal point.
>
> By now, I believe it is a mqtt topic issue.
> It is a bit odd as I use the same infrastructure for my other weewx 
> station (rv.stegli.de) and, there MQTT just Works fine with the topic RV.
> For weather.stegli.de the topic is weather ... and that worked well prior 
> adding the WH51s ...
>
> Oh well - it keeps me busy 😅
>
> Thanks again!
> Stefan 
>
> On Tue, Oct 10, 2023 at 2:58 PM Greg Troxel <[email protected]> wrote:
>
>> Stefan Gliessmann <[email protected]> writes:
>>
>> > My soil moisture sensors are Ecowitt WH51.
>> > Online I found their specs:
>> > Moisture Range: 0 - 100 %
>> > Resolution: 1 %
>> > (so, it is % and not centibar?!)
>>
>> Yes, that is % moisture.  The WH51 is a very normal sensor.  I have one
>> and read it via rtl_433.   See src/devices/fineoffset.c at
>> https://github.com/merbanan/rtl_433/ for details.n
>>
>> It reads in integer %, but there is also an ADC raw value that one can
>> use to calculate.
>>
>> > I do not understand how my moisture graph displays values after the 
>> decimal
>> > point.
>>
>> I don't either, but to figure that out you will need to trace data flow
>> through the entire system, examining each step.  That may require you to
>> read docs on various other things and dig in enough to understand.
>>
>> > I use the https://github.com/matthewwall/weewx-mqtt weewx mqtt 
>> extension
>> > version 0.24 for broadcasting the Ecowitt GW 1100 data thru a local
>> > mosquitto server into Belchertown skin.
>>
>> I would recommend looking at what is in your weewx database, and also
>> subscribe manually to the mqtt feed and look at that.   It is likely
>> that somehwere, something is off, but I don't expect anyone here to guess.
>>
>> > Is there another weewx mqtt extension which is recommended to be used 
>> as a
>> > publisher?
>>
>> That's the standard approach.  I have been using it for years with no
>> issues.
>>
>

-- 
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/9512be5f-2f4b-4d1b-a82a-b5c5d5f3c868n%40googlegroups.com.

Reply via email to