Data from cloud MQTT service crashing Glow2MQTT HASS add-on

In the past couple of weeks I've been getting the following error log from the Glow2MQTT add-on for Home Assistant:

MQTT found in this Home Assistant instance.
MQTT connected...
Connected to Glow MQTT broker...
Configuring Home Assistant...
{'elec_imp': 42749.539, 'watt_now': 454}
{'elec_imp': 42749.542, 'watt_now': 461}
Traceback (most recent call last):
  File "/", line 240, in <module>
  File "/usr/lib/python3.10/site-packages/paho/mqtt/", line 1756, in loop_forever
    rc = self._loop(timeout)
  File "/usr/lib/python3.10/site-packages/paho/mqtt/", line 1164, in _loop
    rc = self.loop_read()
  File "/usr/lib/python3.10/site-packages/paho/mqtt/", line 1556, in loop_read
    rc = self._packet_read()
  File "/usr/lib/python3.10/site-packages/paho/mqtt/", line 2439, in _packet_read
    rc = self._packet_handle()
  File "/usr/lib/python3.10/site-packages/paho/mqtt/", line 3033, in _packet_handle
    return self._handle_publish()
  File "/usr/lib/python3.10/site-packages/paho/mqtt/", line 3327, in _handle_publish
  File "/usr/lib/python3.10/site-packages/paho/mqtt/", line 3570, in _handle_on_message
    on_message(self, self._userdata, message)
  File "/", line 83, in process_msg
    if '00' in data['elecMtr']['0702']['04']:
KeyError: '04'
s6-rc: info: service legacy-services: stopping

I have to restart the add-on manually and it then runs for an indeterminate period before crashing with the same error.


  • The problem seems to have been intermittent supply of null values from the cloud MQTT service. The add-on has now been updated by the developer to catch these and filter them out.

Sign In or Register to comment.