that was it, thank you Rich [email protected] schrieb am Sonntag, 9. Januar 2022 um 03:17:01 UTC+1:
> Jan 8 18:08:49 vmweewx weewx[1483789] DEBUG user.MQTTSubscribe: (Driver) > MessageCallbackProvider data-> incoming topic: weather-hp1000/inTemp, QOS: > 0, retain: 0, *payload: b'19.499999999999996'* > > Looks like the MQTT payload is of type 'individual'. Try setting > [[message_callback]] > type = individual > instead of 'type = json' > rich > > On Saturday, 8 January 2022 at 12:38:59 UTC-5 Michael wrote: > >> Hello, >> >> happy new year to all! >> >> >> I am getting the following error message: >> >> >> >> Jan 8 18:08:49 vmweewx weewx[1483789] DEBUG user.MQTTSubscribe: >> (Driver) MQTTSubscribe MQTT: Received PUBLISH (d0, q0, r0, m0), >> 'weather-hp1000/inTemp', ... (18 bytes) >> >> Jan 8 18:08:49 vmweewx weewx[1483789] DEBUG user.MQTTSubscribe: >> (Driver) MessageCallbackProvider data-> incoming topic: >> weather-hp1000/inTemp, QOS: 0, retain: 0, payload: b'19.499999999999996' >> >> Jan 8 18:08:49 vmweewx weewx[1483789] ERROR user.MQTTSubscribe: >> (Driver) MessageCallbackProvider on_message_json failed with <class >> 'AttributeError'> and reason 'float' object has no attribute 'items'. >> >> Jan 8 18:08:49 vmweewx weewx[1483789] ERROR user.MQTTSubscribe: >> (Driver) **** MessageCallbackProvider Ignoring topic=weather-hp1000/inTemp >> and payload=b'19.499999999999996' >> >> Jan 8 18:08:49 vmweewx weewx[1483789] ERROR user.MQTTSubscribe: >> (Driver) **** MessageCallbackProvider Traceback (most recent call last):#012 >> >> File "/home/weewx/bin/user/MQTTSubscribe.py", line 1387, in >> _on_message_json#012 data_flattened = self._flatten_dict(data, >> message_dict['flatten_delimiter'])#012 File >> "/home/weewx/bin/user/MQTTSubscribe.py", line 1314, in _flatten_dict#012 >> return dict(_items())#012 File "/home/weewx/bin/user/MQTTSubscribe.py", >> line 1307, in _items#012 for key, value in >> dictionary.items():#012AttributeError: 'float' object has no attribute >> 'items' >> >> Jan 8 18:08:49 vmweewx weewx[1483789] DEBUG user.MQTTSubscribe: >> (Driver) MQTTSubscribe MQTT: Received PUBLISH (d0, q0, r0, m0), >> 'weather-hp1000/UV', ... (3 bytes) >> >> Jan 8 18:08:49 vmweewx weewx[1483789] DEBUG user.MQTTSubscribe: >> (Driver) MessageCallbackProvider data-> incoming topic: weather-hp1000/UV, >> QOS: 0, retain: 0, payload: b'0.0' >> >> Jan 8 18:08:49 vmweewx weewx[1483789] ERROR user.MQTTSubscribe: >> (Driver) MessageCallbackProvider on_message_json failed with <class >> 'AttributeError'> and reason 'float' object has no attribute 'items'. >> >> Jan 8 18:08:49 vmweewx weewx[1483789] ERROR user.MQTTSubscribe: >> (Driver) **** MessageCallbackProvider Ignoring topic=weather-hp1000/UV and >> payload=b'0.0' >> >> Jan 8 18:08:49 vmweewx weewx[1483789] ERROR user.MQTTSubscribe: >> (Driver) **** MessageCallbackProvider Traceback (most recent call last):#012 >> >> File "/home/weewx/bin/user/MQTTSubscribe.py", line 1387, in >> _on_message_json#012 data_flattened = self._flatten_dict(data, >> message_dict['flatten_delimiter'])#012 File >> "/home/weewx/bin/user/MQTTSubscribe.py", line 1314, in _flatten_dict#012 >> return dict(_items())#012 File "/home/weewx/bin/user/MQTTSubscribe.py", >> line 1307, in _items#012 for key, value in >> dictionary.items():#012AttributeError: 'float' object has no attribute >> 'items' >> >> >> the part of weewx.conf looks like: >> >> >> >> [MQTTSubscribeDriver] >> >> driver = user.MQTTSubscribe >> >> >> >> port = 1883 >> >> >> >> log = true >> >> keepalive = 60 >> >> [[message_callback]] >> >> type = json >> >> >> >> # The topics to subscribe to. >> >> [[topics]] >> >> unit_system = METRIC >> >> >> >> [[[weather-hp1000/inTemp]]] >> >> # The WeeWX name. >> >> # Default is the name from MQTT. >> >> name = extraTemp12 >> >> conversion_type = None >> >> units = degree_C >> >> >> >> [[[weather-hp1000/UV]]] >> >> >> and this is how the part looks in the other weewx installation: >> >> >> >> [[MQTT]] >> >> server_url = mqtt://xxxxxxxxxxxxxxxx >> >> topic = weather-hp1000 >> >> unit_system = METRIC >> >> binding = archive, loop >> >> aggregation = individual >> >> append_units_label = false >> >> Can anyone tell me where the error is in my configuration. >> Thanks... >> >> Michael >> >> >> >> -- 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/8f385502-dec0-42c4-8fa7-e3d17104c6b5n%40googlegroups.com.
