So exactly what MQTT service are you using? Your initial post includes the 
link https://github.com/weewx/weewx/wiki/mqtt (which in turn links to 
Matthew's RESTful MQTT uploader) and the instructions on that page are 
specific to Matthew's uploader. The log extract just provided shows 
user.mqtt.MqttService being loaded:

2024-08-25T19:43:39.786798+02:00 RPi-Weewx weewxd[3614]: DEBUG 
weewx.engine: Loading service user.mqtt.MqttService
2024-08-25T19:43:39.862785+02:00 RPi-Weewx weewxd[3614]: DEBUG user.mqtt: 
Initializing MQTT service
2024-08-25T19:43:39.863826+02:00 RPi-Weewx weewxd[3614]: DEBUG user.mqtt: 
Creating MQTT client with id "weewx_21680fb1"
2024-08-25T19:43:39.881839+02:00 RPi-Weewx weewxd[3614]: DEBUG user.mqtt: 
Starting MQTT client
2024-08-25T19:43:39.882861+02:00 RPi-Weewx weewxd[3614]: DEBUG 
weewx.engine: Finished loading service user.mqtt.MqttService

 but Matthew's uploader has no class named MqttService (it has class MQTT). 
So it is clear you are not using Matthew's MQTT uploader.

You might want to look up the instructions for use for whatever MQTT 
service you are using, or post details of the MQTT service you are using 
and we will see what we can work out.

Gary

On Monday 26 August 2024 at 04:05:46 UTC+10 [email protected] wrote:

> Hi Gary,
>
> I took an exploit from syslog with debug-level 2, see attachment.
> As I mentioned, the observation data for wind, gust and outtemp are still 
> transmitted unformated, I also realiezed that rain values ( 
> "weather/rain_mm": 0.0 (mm)" ) have always zero values although the website 
> tells me the correct rain of today  = 2.6 mm, also the rain_hour value 
> isn't okay with mqtt.
>
> br.
>
> Alex
>
> gjr80 schrieb am Dienstag, 20. August 2024 um 22:29:48 UTC+2:
>
>> I suggest you edit weewx.conf, set debug = 2, save weewx.conf and 
>> restart WeeWX. Let WeeWX run for at least two archive periods then take a 
>> log extract showing the full WeeWX startup through until the two archive 
>> periods have elapsed. Post the unaltered log extract here. Also worthwhile 
>> posting the output of weectl debug 
>> <http://weewx.com/docs/5.1/utilities/weectl-debug/> (or wee_debug 
>> <http://weewx.com/docs/4.10/utilities.htm#wee_debug_utility> if using 
>> WeeWX v4 or earlier). Check the output for sensitive data (eg passwords, 
>> user names, keys etc) before posting, weectl debug should obfuscate 
>> these but it is not perfect. 
>>
>> Gary
>>
>> On Tuesday 20 August 2024 at 22:19:55 UTC+10 [email protected] wrote:
>>
>>> Hi Gary,
>>> thanks for your advice. After the modification of weewx.conf mqtt data 
>>> is still delivered (so tha's positive), but no change in the number of 
>>> decimal places.
>>> My config:
>>> #########################
>>>  [[MQTT]]
>>>
>>>        enable = true
>>>         unit_system = METRICWX
>>>         # Hostname/IP of MQTT broker
>>>         host = 192.168.2.22
>>>         topic = weather
>>> #        append_units_label = false
>>>
>>>         [[[inputs]]]
>>>             [[[[outTemp]]]]
>>>                 format = %.2f                # use two decimal places of 
>>> precision
>>>                 name = outside_temperature    # use label other than 
>>> inTemp
>>>             [[[[windSpeed]]]]
>>>                 units = meter_per_second
>>>                 format = %.1f
>>>                 name = windSpeed_m_s
>>>             [[[[windGust]]]]
>>>                 units = meter_per_second
>>>                 format = %.1f
>>>                 name = gust_m_s
>>> ###########################
>>>
>>> and the result in the broker:
>>> ###########################
>>> weather/inTemp_degree_C 27.29999999999999
>>> weather/inHumidity_percent 67
>>> weather/outTemp_degree_C 24.700000000000003
>>> weather/outHumidity_percent 64
>>> weather/pressure_mbar 1012.8
>>> weather/windSpeed_meter_per_second 0.40000099419637863
>>> weather/windGust_meter_per_second 0.6000014912945679
>>> weather/windDir_degree_compass 112.5
>>> weather/windGustDir_degree_compass 112.5
>>> weather/rainRate_mm_per_hour 0.0
>>> weather/rain_mm (null)
>>> weather/rxCheckPercent_percent 100
>>> weather/windBatteryStatus 0
>>> weather/rainBatteryStatus 0
>>> weather/outTempBatteryStatus 0
>>> weather/inTempBatteryStatus 0
>>> weather/altimeter_mbar 1056.8811153752754
>>> weather/appTemp_degree_C 26.97221024879724
>>> weather/barometer_mbar 1055.5080297221955
>>> weather/cloudbase_meter 1267.4829583543142
>>> weather/dewpoint_degree_C 17.422122081623723
>>> weather/ET_mm (null)
>>> weather/heatindex_degree_C 24.89666666666667
>>> weather/humidex_degree_C 30.293088441750406
>>> weather/inDewpoint_degree_C 20.621737268345424
>>> weather/maxSolarRad_watt_per_meter_squared 813.5477625196611
>>> weather/windchill_degree_C 24.700000000000003
>>> weather/windrun_km (null)
>>> weather/usUnits 17
>>> ###########################
>>>
>>> Something goes wrong, but I've no idea
>>>
>>> br
>>>
>>> Alex
>>>
>>> gjr80 schrieb am Dienstag, 20. August 2024 um 11:02:39 UTC+2:
>>>
>>>> Your config stanza format is incorrect; you cannot just insert 
>>>> sub-stanzas in the middle of an existing stanza, the sub-stanzas need to 
>>>> be 
>>>> added to the end. In the case of a WeeWX config file indents don't matter 
>>>> but order does. Try something like:
>>>>
>>>>  [[MQTT]]        # Enable/disable this service
>>>>         enable = true
>>>>         unit_system = METRICWX
>>>>         # Hostname/IP of MQTT broker
>>>>         host = 192.168.2.22
>>>>         topic = weather
>>>>         [[[inputs]]]
>>>>             [[[[outTemp]]]]
>>>>                 format = %.2f                # use two decimal places 
>>>> of precision
>>>>                 name = outside_temperature    # use label other than 
>>>> inTemp
>>>>             [[[[windSpeed]]]]
>>>>                 units = meter_per_second
>>>>                 format = %.2f
>>>>                 name = wind_m_s
>>>>
>>>> The order you had meant the MQTT uploader was never seeing the host 
>>>> and topic config entries.
>>>>
>>>> If that doesn't work post a log extract showing the error.
>>>>
>>>> Gary
>>>> On Tuesday 20 August 2024 at 06:40:46 UTC+10 [email protected] wrote:
>>>>
>>>>> With this config, the weather values are puplished, but (i guess) due 
>>>>> to convert from US (within db) to Metricwx with up to 16 decimal places. 
>>>>> ###############
>>>>>  [[MQTT]]        # Enable/disable this service
>>>>>         enable = true
>>>>>         unit_system = METRICWX
>>>>>         # Hostname/IP of MQTT broker
>>>>>         host = 192.168.2.22
>>>>>         # Prefix for topics
>>>>>         topic = weather
>>>>> #################
>>>>> I took one exemple from https://github.com/weewx/weewx/wiki/mqtt to 
>>>>> reduce the
>>>>> decimal places of the published values, but with this config, mqtt 
>>>>> stops working.
>>>>> #################
>>>>>  [[MQTT]]        # Enable/disable this service
>>>>>         enable = true
>>>>>         unit_system = METRICWX
>>>>>         [[[inputs]]]
>>>>>             [[[[outTemp]]]]
>>>>>                 format = %.2f                # use two decimal places 
>>>>> of precision
>>>>>                 name = outside_temperature    # use label other than 
>>>>> inTemp
>>>>>             [[[[windSpeed]]]]
>>>>>                 units = meter_per_second
>>>>>                 format = %.2f
>>>>>                 name = wind_m_s
>>>>>
>>>>>         # Hostname/IP of MQTT broker
>>>>>         host = 192.168.2.22
>>>>>         topic = weather 
>>>>> #################
>>>>>
>>>>> What could be wrong in the configuration?
>>>>> My aim ist to limit all published values to a max. of 2 digits behind 
>>>>> the dot
>>>>> e. g. instead 
>>>>> weather/windSpeed_meter_per_second 0.40000099419637863
>>>>> is should be:
>>>>> weather/windSpeed_meter_per_second 0.4
>>>>>
>>>>> br
>>>>> Alex
>>>>>
>>>>

-- 
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/3320c205-a24e-4681-96b4-0e91232d9f8bn%40googlegroups.com.

Reply via email to