MQTTSubscribe - Presenting a field-name without storing it in the database

243 views
Skip to first unread message

Tarmo

unread,
Feb 7, 2021, 5:05:51 PM2/7/21
to weewx-user
Can I do it? I have a text in MQTT like "Cloudy with clear spells" which I would like to display on my website. Although, there is no need to store it in the weewx database. I would like to just to update it at every archive interval.

bell...@gmail.com

unread,
Feb 7, 2021, 8:19:36 PM2/7/21
to weewx-user
It should be doable. I do something similar with a few temperature sensors/fields. The fact that you are dealing with string data does add some complexity.
First, for the field configuration you will need to set the conversion_type = None. Although it is not documented on the wiki, see https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Configuring#conversion_type This will stop MQTTSubscribe from trying to convert the incoming data.

Next, you will need to configure the accumulator for this field/type.  See, https://github.com/weewx/weewx/wiki/Accumulators. It looks like for this field/type you want to set accumulator = firstlast and extractor = last.

Now you should be able to access it via $current. field/type name.

If you get this working, I’d like to ‘steal’ the details/steps for a wiki page.
-rich

Tarmo

unread,
Feb 8, 2021, 4:46:40 AM2/8/21
to weewx-user
Thank you!

It seems that the attempt to convert string to float still happens. I will attach snippets from log and config here. The field name which is causing trouble is "phenomenon".

[MQTTSubscribeDriver]
    # This section is for the MQTTSubscribe driver.

    # The driver to use:
    driver = user.MQTTSubscribe

    # The MQTT server.
    # Default is localhost.
    host = localhost

    # The port to connect to.
    # Default is 1883.
    port = 1883

    # Maximum period in seconds allowed between communications with the broker.
    # Default is 60.
    keepalive = 60

    # username for broker authentication.
    # Default is None.
    username = rtl

    # password for broker authentication.
    # Default is None.
    password = xx

    # Configuration for the message callback.
    [[message_callback]]
        type = individual

    # The topics to subscribe to.
    [[topics]]
        unit_system = METRIC
        use_topic_as_fieldname = true
        use_server_datetime = true

        [[[rtl_433/lab/devices/Solight-TE44/1/4/temperature_C]]]
            name = outTemp
        [[[emhi/26038/uvindex]]]
            name = UV
        [[[emhi/26038/airpressure]]]
            name = pressure
        [[[emhi/26038/precipitations]]]
            name = rain
            contains_total = true
        [[[emhi/26038/relativehumidity]]]
            name = outHumidity
        [[[emhi/26038/winddirection]]]
            name = windDir
        [[[emhi/26038/windspeed]]]
            name = windSpeed
            units = meter_per_second
        [[[emhi/26038/windspeedmax]]]
            name = windGust
            units = meter_per_second
        [[[emhi/26038/phenomenon]]]
            conversion_type = None

[Accumulator]
    [[phenomenon]]
        accumulator = firstlast
        extractor = last





Feb  8 11:21:38 pi3 systemd[1]: Starting LSB: weewx weather system...
Feb  8 11:21:39 pi3 weewx[26841] INFO __main__: Initializing weewx version 4.4.0
Feb  8 11:21:39 pi3 weewx[26841] INFO __main__: Using Python 3.5.3 (default, Nov 18 2020, 21:09:16) #012[GCC 6.3.0 20170516]
Feb  8 11:21:39 pi3 weewx[26841] INFO __main__: Platform Linux-4.19.66-v7+-armv7l-with-debian-9.13
Feb  8 11:21:39 pi3 weewx[26841] INFO __main__: Locale is 'en_GB.UTF-8'
Feb  8 11:21:39 pi3 weewx[26841] INFO __main__: PID file is /var/run/weewx.pid
Feb  8 11:21:39 pi3 weewx[26845] INFO __main__: Using configuration file /home/weewx/weewx.conf
Feb  8 11:21:39 pi3 weewx[26845] INFO __main__: Debug is 0
Feb  8 11:21:39 pi3 weewx[26845] INFO weewx.engine: Loading station type MQTTSubscribeDriver (user.MQTTSubscribe)
Feb  8 11:21:39 pi3 weewx[26830]: Starting weewx weather system: weewx.
Feb  8 11:21:39 pi3 systemd[1]: Started LSB: weewx weather system.
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Version is 1.6.2
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Log level: 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Log debug setting: 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Log console: False
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Log file: None
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) overlap is 0.0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) message_callback_provider_name is user.MQTTSubscribe.MessageCallbackProvider
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) clientid is MQTTSubscribe-9835
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) client_session is True
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) host is localhost
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) port is 1883
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) keepalive is 60
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) username is rtl
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) password is set
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Archive topic is None
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Wait before retry is 2
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Connected with result code 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Connected flags {'session present': 0}
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 1 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 2 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 3 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 4 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 5 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 6 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 7 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 8 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 9 is size 1 has a QOS of 0
Feb  8 11:21:39 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 10 is size 1 has a QOS of 0
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.engine: StdConvert target unit is 0x1
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.engine: Archive will use data binding wx_binding
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.engine: Record generation will be attempted in 'hardware'
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.restx: StationRegistry: Station will be registered.
Feb  8 11:21:40 pi3 weewx[26845] INFO user.mqtt: service version is 0.22
Feb  8 11:21:40 pi3 weewx[26845] INFO user.mqtt: binding to loop
Feb  8 11:21:40 pi3 weewx[26845] INFO user.mqtt: topic is weather
Feb  8 11:21:40 pi3 weewx[26845] INFO user.mqtt: desired unit system is METRIC
Feb  8 11:21:40 pi3 weewx[26845] INFO user.mqtt: data will be uploaded to mqtt://ilm:xxx@localhost:1883/
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.restx: Wunderground-PWS: Data for station IHARJUMA19 will be posted
Feb  8 11:21:40 pi3 weewx[26845] INFO user.windy: version is 0.7
Feb  8 11:21:40 pi3 weewx[26845] INFO user.windy: Data will be uploaded to https://stations.windy.com/pws/update
Feb  8 11:21:40 pi3 weewx[26845] INFO __main__: Starting up weewx version 4.4.0
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.manager: Starting backfill of daily summaries
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.manager: Daily summaries up to date
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.engine: Starting main packet loop.
Feb  8 11:21:40 pi3 weewx[26845] INFO weewx.engine: Main loop exiting. Shutting engine down.
Feb  8 11:21:40 pi3 weewx[26845] INFO user.MQTTSubscribe: (Driver) Disconnected with result code 0
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__: Caught unrecoverable exception:
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****  could not convert string to float: 'Light snowfall'
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****  Traceback (most recent call last):
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****    File "/home/weewx/bin/weewxd", line 157, in main
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****      engine.run()
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 210, in run
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****      self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 245, in dispatchEvent
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****      callback(event)
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 594, in new_loop_packet
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****      self.accumulator.addRecord(event.packet, add_hilo=self.loop_hilo)
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/accum.py", line 436, in addRecord
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****      func(self, record, obs_type, add_hilo, weight)
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/accum.py", line 495, in add_value
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****      self[obs_type].addHiLo(val, record['dateTime'])
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/accum.py", line 168, in addHiLo
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****      val = to_float(val)
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****    File "/home/weewx/bin/weeutil/weeutil.py", line 1250, in to_float
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****      return float(x) if x is not None else None
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****  ValueError: could not convert string to float: 'Light snowfall'
Feb  8 11:21:40 pi3 weewx[26845] CRITICAL __main__:     ****  Exiting.

Karen K

unread,
Feb 8, 2021, 8:47:37 AM2/8/21
to weewx-user
I had the same problem. It seems to me that weewx does not know string values. I tried to send an alarm color value that way, to no success.

Tom Keffer

unread,
Feb 8, 2021, 10:46:36 AM2/8/21
to weewx-user
The error you are getting is coming from the ScalarStats accumulator, not the FirstLast accumulator. For some reason, the latter is not getting used, despite your configuration information (which looks correct).

Is there another type besides phenomenon which has a string in it?

-tk

--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c163329f-7d6a-4be6-a309-a666dea07been%40googlegroups.com.

bell...@gmail.com

unread,
Feb 8, 2021, 11:17:58 AM2/8/21
to weewx-user
The other possibility is that the field/type in the packet generated by MQTTSubscribe is not phenomenon. From the config, it looks like it should be. If you set debug = 1, we can see what MQTTSubscribe is putting in the packet.
For what's worth, I got a small testcase working and see string data in both the loop and archive.
-rich

Tarmo

unread,
Feb 8, 2021, 1:34:53 PM2/8/21
to weewx-user
debug = 1 log attached

Feb  8 20:28:51 pi3 systemd[1]: Starting LSB: weewx weather system...
Feb  8 20:28:52 pi3 weewx[3508] INFO __main__: Initializing weewx version 4.4.0
Feb  8 20:28:52 pi3 weewx[3508] INFO __main__: Using Python 3.5.3 (default, Nov 18 2020, 21:09:16) #012[GCC 6.3.0 20170516]
Feb  8 20:28:52 pi3 weewx[3508] INFO __main__: Platform Linux-4.19.66-v7+-armv7l-with-debian-9.13
Feb  8 20:28:52 pi3 weewx[3508] INFO __main__: Locale is 'en_GB.UTF-8'
Feb  8 20:28:52 pi3 weewx[3508] INFO __main__: PID file is /var/run/weewx.pid
Feb  8 20:28:52 pi3 weewx[3513] INFO __main__: Using configuration file /home/weewx/weewx.conf
Feb  8 20:28:52 pi3 weewx[3513] INFO __main__: Debug is 1
Feb  8 20:28:52 pi3 weewx[3513] DEBUG __main__: Initializing engine
Feb  8 20:28:52 pi3 weewx[3513] INFO weewx.engine: Loading station type MQTTSubscribeDriver (user.MQTTSubscribe)
Feb  8 20:28:52 pi3 weewx[3497]: Starting weewx weather system: weewx.
Feb  8 20:28:52 pi3 systemd[1]: Started LSB: weewx weather system.
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Using weewx version 4.4.0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Using Python 3.5.3 (default, Nov 18 2020, 21:09:16) #012[GCC 6.3.0 20170516]
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Platform Linux-4.19.66-v7+-armv7l-with-debian-9.13
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Locale is 'en_GB.UTF-8'
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Version is 1.6.2
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Log level: 0
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Log debug setting: 1
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Log console: False
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Log file: None
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) sanitized configuration removed ['password']
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MQTTSUBscriber sanitized_service_dict is {'port': '1883', 'message_callback': {'type': 'individual'}, 'host': 'localhost', 'keepalive': '60', 'topics': {'unit_system': 'METRIC', 'use_topic_as_fieldname': 'true', 'use_server_datetime': 'true', 'rtl_433/lab/devices/Solight-TE44/1/4/temperature_C': {'name': 'outTemp'}, 'emhi/26038/uvindex': {'name': 'UV'}, 'emhi/26038/airpressure': {'name': 'pressure'}, 'emhi/26038/precipitations': {'name': 'rain', 'contains_total': 'true'}, 'emhi/26038/relativehumidity': {'name': 'outHumidity'}, 'emhi/26038/winddirection': {'name': 'windDir'}, 'emhi/26038/windspeed': {'name': 'windSpeed', 'units': 'meter_per_second'}, 'emhi/26038/windspeedmax': {'name': 'windGust', 'units': 'meter_per_second'}, 'emhi/26038/phenomenon': {'conversion_type': 'None'}}, 'username': 'rtl', 'driver': 'user.MQTTSubscribe'}
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) overlap is 0.0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager self.subscribed_topics is {'emhi/26038/airpressure': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'emhi/26038/airpressure': {'contains_total': False, 'conversion_type': 'float', 'name': 'pressure', 'ignore': False, 'use_topic_as_field_name': 'true'}}, 'offset_format': None, 'type': 'normal'}, 'emhi/26038/relativehumidity': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'emhi/26038/relativehumidity': {'contains_total': False, 'conversion_type': 'float', 'name': 'outHumidity', 'ignore': False, 'use_topic_as_field_name': 'true'}}, 'offset_format': None, 'type': 'normal'}, 'emhi/26038/precipitations': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'emhi/26038/precipitations': {'contains_total': True, 'conversion_type': 'float', 'name': 'rain', 'ignore': False, 'use_topic_as_field_name': 'true'}}, 'offset_format': None, 'type': 'normal'}, 'emhi/26038/winddirection': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'emhi/26038/winddirection': {'contains_total': False, 'conversion_type': 'float', 'name': 'windDir', 'ignore': False, 'use_topic_as_field_name': 'true'}}, 'offset_format': None, 'type': 'normal'}, 'emhi/26038/windspeedmax': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'emhi/26038/windspeedmax': {'name': 'windGust', 'conversion_type': 'float', 'use_topic_as_field_name': 'true', 'ignore': False, 'contains_total': False, 'units': 'meter_per_second'}}, 'offset_format': None, 'type': 'normal'}, 'emhi/26038/windspeed': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'emhi/26038/windspeed': {'name': 'windSpeed', 'conversion_type': 'float', 'use_topic_as_field_name': 'true', 'ignore': False, 'contains_total': False, 'units': 'meter_per_second'}}, 'offset_format': None, 'type': 'normal'}, '1612808932.457042-windGust-windGustDir-windDir-windSpeed': {'offset_format': None, 'ignore_start_time': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'queue': deque([]), 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'unit_system': 16, 'max_queue': 2147483647, 'type': 'collector'}, 'rtl_433/lab/devices/Solight-TE44/1/4/temperature_C': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'rtl_433/lab/devices/Solight-TE44/1/4/temperature_C': {'contains_total': False, 'conversion_type': 'float', 'name': 'outTemp', 'ignore': False, 'use_topic_as_field_name': 'true'}}, 'offset_format': None, 'type': 'normal'}, 'emhi/26038/phenomenon': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'emhi/26038/phenomenon': {'contains_total': False, 'conversion_type': 'None', 'name': 'emhi/26038/phenomenon', 'ignore': False, 'use_topic_as_field_name': 'true'}}, 'offset_format': None, 'type': 'normal'}, 'emhi/26038/uvindex': {'queue': deque([]), 'ignore_start_time': False, 'ignore': False, 'adjust_end_time': 0.0, 'use_server_datetime': True, 'ignore_end_time': False, 'msg_id_field': None, 'max_queue': 2147483647, 'datetime_format': None, 'adjust_start_time': 0.0, 'qos': 0, 'ignore_msg_id_field': [], 'unit_system': 16, 'fields': {'emhi/26038/uvindex': {'contains_total': False, 'conversion_type': 'float', 'name': 'UV', 'ignore': False, 'use_topic_as_field_name': 'true'}}, 'offset_format': None, 'type': 'normal'}}
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager self.cached_fields is {}
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) message_callback_provider_name is user.MQTTSubscribe.MessageCallbackProvider
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) clientid is MQTTSubscribe-5018
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) client_session is True
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) host is localhost
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) port is 1883
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) keepalive is 60
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) username is rtl
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) password is set
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Archive topic is None
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider self.fields is {}
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Wait before retry is 2
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Starting loop
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Connected with result code 0
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Connected flags {'session present': 0}
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to emhi/26038/airpressure has a mid 1 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to emhi/26038/relativehumidity has a mid 2 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to emhi/26038/precipitations has a mid 3 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to emhi/26038/winddirection has a mid 4 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to emhi/26038/windspeedmax has a mid 5 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to emhi/26038/windspeed has a mid 6 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to 1612808932.457042-windGust-windGustDir-windDir-windSpeed has a mid 7 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to rtl_433/lab/devices/Solight-TE44/1/4/temperature_C has a mid 8 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to emhi/26038/phenomenon has a mid 9 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) Subscribing to emhi/26038/uvindex has a mid 10 and rc 0
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 1 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: emhi/26038/airpressure, QOS: 0, retain: 1, payload: b'1022.8'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming emhi/26038/airpressure: pressure: 1022.8
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 2 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: emhi/26038/relativehumidity, QOS: 0, retain: 1, payload: b'85'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming emhi/26038/relativehumidity: outHumidity: 85.0
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 3 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: emhi/26038/precipitations, QOS: 0, retain: 1, payload: b'0'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming emhi/26038/precipitations: rain: None
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 4 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: emhi/26038/winddirection, QOS: 0, retain: 1, payload: b'109'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming emhi/26038/winddirection: windDir: 109.0
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 5 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: emhi/26038/windspeedmax, QOS: 0, retain: 1, payload: b'3.2'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming emhi/26038/windspeedmax: windGust: 11.520000000000001
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 6 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: emhi/26038/windspeed, QOS: 0, retain: 1, payload: b'1.9'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming emhi/26038/windspeed: windSpeed: 6.84
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 7 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 8 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: rtl_433/lab/devices/Solight-TE44/1/4/temperature_C, QOS: 0, retain: 1, payload: b'-7.8'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming rtl_433/lab/devices/Solight-TE44/1/4/temperature_C: outTemp: -7.8
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 9 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: emhi/26038/phenomenon, QOS: 0, retain: 1, payload: b'Cloudy with clear spells'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming emhi/26038/phenomenon: emhi/26038/phenomenon: Cloudy with clear spells
Feb  8 20:28:52 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Subscribed to mid: 10 is size 1 has a QOS of 0
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) MessageCallbackProvider data-> incoming topic: emhi/26038/uvindex, QOS: 0, retain: 1, payload: b'0'
Feb  8 20:28:52 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> incoming emhi/26038/uvindex: UV: 0.0
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.engine.StdTimeSynch
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.engine.StdTimeSynch
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: No services in service group data_services
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.engine.StdConvert
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.engine: StdConvert target unit is 0x1
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.engine.StdConvert
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.engine.StdCalibrate
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.engine.StdCalibrate
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.engine.StdQC
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.engine.StdQC
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.wxservices.StdWXCalculate
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.manager: Daily summary version is 4.0
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.wxservices.StdWXCalculate
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdWXXTypes
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdWXXTypes
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdPressureCooker
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdPressureCooker
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdRainRater
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdRainRater
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.wxxtypes.StdDelta
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.wxxtypes.StdDelta
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.engine.StdArchive
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.engine: Archive will use data binding wx_binding
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.engine: Record generation will be attempted in 'hardware'
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) No archive topic configured.
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.engine: Using archive interval of 300 seconds (specified in weewx configuration)
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Use LOOP data in hi/low calculations: 1
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.engine.StdArchive
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.restx.StdStationRegistry
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.restx: StationRegistry: Station will be registered.
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.restx.StdStationRegistry
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service user.mqtt.MQTT
Feb  8 20:28:53 pi3 weewx[3513] INFO user.mqtt: service version is 0.22
Feb  8 20:28:53 pi3 weewx[3513] INFO user.mqtt: binding to loop
Feb  8 20:28:53 pi3 weewx[3513] INFO user.mqtt: topic is weather
Feb  8 20:28:53 pi3 weewx[3513] INFO user.mqtt: desired unit system is METRIC
Feb  8 20:28:53 pi3 weewx[3513] INFO user.mqtt: data will be uploaded to mqtt://ilm:xxx@localhost:1883/
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service user.mqtt.MQTT
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.restx.StdWunderground
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.restx: WU essentials: {}
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.restx: Wunderground-PWS: Data for station IHARJUMA19 will be posted
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.restx.StdWunderground
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service user.windy.Windy
Feb  8 20:28:53 pi3 weewx[3513] INFO user.windy: version is 0.7
Feb  8 20:28:53 pi3 weewx[3513] INFO user.windy: Data will be uploaded to https://stations.windy.com/pws/update
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service user.windy.Windy
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Feb  8 20:28:53 pi3 weewx[3513] INFO __main__: Starting up weewx version 4.4.0
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.engine: Station does not support reading the time
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.engine: Using binding 'wx_binding' to database 'weewx.sdb'
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.manager: Starting backfill of daily summaries
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.manager: Daily summaries up to date
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) No archive topic configured.
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.engine: Starting main packet loop.
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> outgoing emhi/26038/airpressure: dateTime: 1612808932.4960134, pressure: 1022.8, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) data-> final loop packet is emhi/26038/airpressure 2021-02-08 20:28:52 EET (1612808932): dateTime: 1612808932.4960134, pressure: 1022.8, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> outgoing emhi/26038/relativehumidity: dateTime: 1612808932.4987028, outHumidity: 85.0, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) data-> final loop packet is emhi/26038/relativehumidity 2021-02-08 20:28:52 EET (1612808932): dateTime: 1612808932.4987028, outHumidity: 85.0, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> outgoing emhi/26038/precipitations: dateTime: 1612808932.5012639, rain: None, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) data-> final loop packet is emhi/26038/precipitations 2021-02-08 20:28:52 EET (1612808932): dateTime: 1612808932.5012639, rain: None, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> outgoing collected 1612808932.457042-windGust-windGustDir-windDir-windSpeed: dateTime: 1612808932.5095515, usUnits: 16, windDir: 109.0, windGust: 11.520000000000001, windSpeed: 6.84
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) data-> final loop packet is 1612808932.457042-windGust-windGustDir-windDir-windSpeed 2021-02-08 20:28:52 EET (1612808932): dateTime: 1612808932.5095515, usUnits: 16, windDir: 109.0, windGust: 11.520000000000001, windSpeed: 6.84
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> outgoing rtl_433/lab/devices/Solight-TE44/1/4/temperature_C: dateTime: 1612808932.5126734, outTemp: -7.8, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) data-> final loop packet is rtl_433/lab/devices/Solight-TE44/1/4/temperature_C 2021-02-08 20:28:52 EET (1612808932): dateTime: 1612808932.5126734, outTemp: -7.8, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) TopicManager data-> outgoing emhi/26038/phenomenon: dateTime: 1612808932.5151372, emhi/26038/phenomenon: Cloudy with clear spells, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) data-> final loop packet is emhi/26038/phenomenon 2021-02-08 20:28:52 EET (1612808932): dateTime: 1612808932.5151372, emhi/26038/phenomenon: Cloudy with clear spells, usUnits: 16
Feb  8 20:28:53 pi3 weewx[3513] INFO weewx.engine: Main loop exiting. Shutting engine down.
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.manager: Daily summary version is 4.0
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.manager: Daily summary version is 4.0
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.manager: Daily summary version is 4.0
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.restx: Shut down Windy thread.
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.restx: Shut down Wunderground-PWS thread.
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.restx: Shut down MQTT thread.
Feb  8 20:28:53 pi3 weewx[3513] DEBUG weewx.restx: Shut down StationRegistry thread.
Feb  8 20:28:53 pi3 weewx[3513] INFO user.MQTTSubscribe: (Driver) Disconnected with result code 0
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__: Caught unrecoverable exception:
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****  could not convert string to float: 'Cloudy with clear spells'
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****  Traceback (most recent call last):
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****    File "/home/weewx/bin/weewxd", line 157, in main
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****      engine.run()
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 210, in run
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****      self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 245, in dispatchEvent
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****      callback(event)
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/engine.py", line 594, in new_loop_packet
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****      self.accumulator.addRecord(event.packet, add_hilo=self.loop_hilo)
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/accum.py", line 436, in addRecord
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****      func(self, record, obs_type, add_hilo, weight)
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/accum.py", line 495, in add_value
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****      self[obs_type].addHiLo(val, record['dateTime'])
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****    File "/home/weewx/bin/weewx/accum.py", line 168, in addHiLo
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****      val = to_float(val)
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****    File "/home/weewx/bin/weeutil/weeutil.py", line 1250, in to_float
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****      return float(x) if x is not None else None
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****  ValueError: could not convert string to float: 'Cloudy with clear spells'
Feb  8 20:28:53 pi3 weewx[3513] CRITICAL __main__:     ****  Exiting.


bell...@gmail.com

unread,
Feb 8, 2021, 1:47:52 PM2/8/21
to weewx-user
Thanks for the log. Definitely a MQTTSubscribe bug with the name. I’ll look into it.
Feb  8 20:28:53 pi3 weewx[3513] DEBUG user.MQTTSubscribe: (Driver) data-> final loop packet is emhi/26038/phenomenon 2021-02-08 20:28:52 EET (1612808932): dateTime: 1612808932.5151372, emhi/26038/phenomenon: Cloudy with clear spells, usUnits: 16

bell...@gmail.com

unread,
Feb 8, 2021, 2:30:58 PM2/8/21
to weewx-user
Try adding a name = 

        [[[emhi/26038/phenomenon]]]
            name = phenomenon
            conversion_type = None

Yeah, I know configuring payloads of type ‘individual’ needs to be reworked...
rich

Tarmo

unread,
Feb 8, 2021, 2:59:54 PM2/8/21
to weewx-user
Thank you very much!

The last one works like a charm. The string is accessible by $current.phenomenon.raw

Tarmo

unread,
Feb 8, 2021, 5:42:34 PM2/8/21
to weewx-user
"If you get this working, I’d like to ‘steal’ the details/steps for a wiki page.
-rich"

you own this. this is your work and people around the world are thankful for this.


On Monday, February 8, 2021 at 3:19:36 AM UTC+2 bell...@gmail.com wrote:

Karen K

unread,
Feb 10, 2021, 1:41:47 PM2/10/21
to weewx-user
For me it still does not work.

The configuration is:
[[[pegel/567470/alarmcolor]]]
    name = W567470c
    conversion_type = None
    expires_after = 4000

And the log is:
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: Caught unrecoverable exception:
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** could not convert string to float: '#c5e566'
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** Traceback (most recent call last):
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/weewxd", line 157, in main
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** engine.run()
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 210, in run
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 245, in dispatchEvent
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** callback(event)
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/user/MQTTSubscribe.py", line 1591, in new_loop_packet
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** target_data = self.subscriber.get_accumulated_data(queue,
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/user/MQTTSubscribe.py", line 1478, in get_accumulated_data
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** return self.manager.get_accumulated_data(queue, start_ts, end_ts, units) # pragma: no cover
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/user/MQTTSubscribe.py", line 937, in get_accumulated_data
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** accumulator.addRecord(data)
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/weewx/accum.py", line 436, in addRecord
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** func(self, record, obs_type, add_hilo, weight) 
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/weewx/accum.py", line 495, in add_value
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** self[obs_type].addHiLo(val, record['dateTime'])
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/weewx/accum.py", line 168, in addHiLo
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** val = to_float(val)
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** File "/usr/share/weewx/weeutil/weeutil.py", line 1250, in to_float
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** return float(x) if x is not None else None
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** ValueError: could not convert string to float: '#c5e566'
Feb 10 19:32:47 LokalWiki weewx[378692] CRITICAL __main__: **** Exiting.

I tried "none" and "None" in the configuration to the same result.



bell...@gmail.com

unread,
Feb 10, 2021, 1:44:55 PM2/10/21
to weewx-user
Looks like a bug when running as a service, I'll take a look.
What does your [Accumulator] section look like?

Karen K

unread,
Feb 10, 2021, 1:51:08 PM2/10/21
to weewx-user
There is no such section. Should I have one?

bell...@gmail.com

unread,
Feb 10, 2021, 1:56:29 PM2/10/21
to weewx-user
Yes, it would be something like
[Accumulator]
    [[W567470c]]
        accumulator = firstlast
        extractor = last

See, https://github.com/weewx/weewx/wiki/Accumulators for additional information

Karen K

unread,
Feb 11, 2021, 4:11:48 AM2/11/21
to weewx-user
That's new to me. Thank you very much for that information. I will try it.

Karen K

unread,
Feb 13, 2021, 7:14:30 AM2/13/21
to weewx-user
Yes, it works. So the problem was not within MQTTSubscribe service, but in the configuration of the accumulator service. And it was no software issue, but a knowledge issue of the user. :-)
Reply all
Reply to author
Forward
0 new messages