Skip to content
This repository has been archived by the owner on Apr 30, 2022. It is now read-only.

No Data In HA For The Past Few Days #53

Open
townsmcp opened this issue Mar 25, 2022 · 4 comments
Open

No Data In HA For The Past Few Days #53

townsmcp opened this issue Mar 25, 2022 · 4 comments

Comments

@townsmcp
Copy link

Hi, Im looking for help. I run Home Assistant and have the integration installed and one of the Hildebrand USB zigbee sticks connected and pulling data from the smart meters. It has worked flawlessly for the past 3 months. In the last few days the integration has not been working for me. I get no data. I have uninstalled the integration/reinstalled, rolled back to previous backup of HA when the device was working etc all to no joy.

Today I sent an email to Hildebrand support and they came back saying MQTT had not been enabled on my account and it has now enabled it and it was not enabled before. This was definitely wrong as I requested MQTT access on 24/12/21 and had the integrations working fine ever since - I know I had MQTT access running as I was able to see power consumption which was being updated every 20 seconds or so and matched my display from the smart meter install (not a Hildebrand screen)

The MQTT connection worked for about 20 minutes this morning and around 9:05 has not worked since. Again, I have removed integrations/ restarted/ added integration etc but just cant get any data.

As a last ditch effort before posting here, I have tried using MQTT Explorer and connecting to glowmqtt.energyhive.com with my username and password same as the Bright app. First I tried with port 1883/no TLS enabled. I can connect but see no data (Bright app shows data). I then tried enabling TLS and changed to port 8883 and selected Validate Certificate but I get an 'Certificate has expired'. Im not sure how to pull the updated certificate though to add to MQTT Explorer?

Also, the outstanding issue remains for Home Assistant - when deleting the integration, I have completely removed the custom integration and all files - I would be grateful if someone can help on both MQTT Explorer/certificate and Home Assistant side

@townsmcp townsmcp changed the title No Data In HA No Data In HA For The Past Few Days Mar 25, 2022
@townsmcp
Copy link
Author

townsmcp commented Mar 26, 2022

Just tried reloading the integration and this is the error I’m seeing:


This error originated from a custom integration.

Logger: root
Source: custom_components/hildebrandglow/glow/mqttpayload.py:62 
Integration: Hildebrand Glow (documentation) 
First occurred: 25 March 2022, 10:47:30 pm (2 occurrences) 
Last logged: 9:48:10 am

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
    rc = self._loop(timeout)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop
    rc = self.loop_read()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1556, in loop_read
    rc = self._packet_read()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
    rc = self._packet_handle()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
    return self._handle_publish()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
    self._handle_on_message(message)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
    on_message(self, self._userdata, message)
  File "/config/custom_components/hildebrandglow/glow/__init__.py", line 136, in _cb_on_message
    payload = MQTTPayload(msg.payload)
  File "/config/custom_components/hildebrandglow/glow/mqttpayload.py", line 255, in __init__
    Meter(payload["gasMtr"]) if "03" in payload["gasMtr"]["0702"] else None
  File "/config/custom_components/hildebrandglow/glow/mqttpayload.py", line 224, in __init__
    self.reading_information_set = self.ReadingInformationSet(payload)
  File "/config/custom_components/hildebrandglow/glow/mqttpayload.py", line 62, in __init__
    self.supply_status = self.SupplyStatus(
  File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: 'FF' is not a valid Meter.ReadingInformationSet.SupplyStatus

@unlobito sorry, but any ideas what else I can try/should be doing?

@townsmcp
Copy link
Author

So, to try moving this forward, I have created a bridged MQTT connection from my instance of MQTT to Glow MQTT. I have:

In the local MQTT share (/share/mosquitto/) I have created 3 files; 'accesscontrollist', 'acl.conf', 'mosquitto.conf' based on info from https://gist.github.com/ndfred/5bb51b567f8cfaf2bb06da6393169321:
'accesscontrolllist' file contains:

user mqtt-user
topic readwrite #

'acl.conf' file contains:

acl_file /share/mosquitto/accesscontrollist

mosquitto.conf file contains:

connection glowmqtt
address glowmqtt.energyhive.com:8883
remote_username ***USER_NAME FROM BRIGHT APP***
remote_password ***PASSWORD FROM BRIGHT APP***
bridge_capath /etc/ssl/certs/
topic ***ZIGBEE GLOW STICK DEVICE ID FROM BRIGHT APP*** in 0

When I restart Mosquitto broker the log is filling up with the following error message repeated:

1648382926: Socket error on client local.core-mosquitto.glowmqtt, disconnecting.
1648382931: Connecting bridge glowmqtt (glowmqtt.energyhive.com:8883)
Does this not mean the issue is at Glow side?

@townsmcp
Copy link
Author

Update - Hildebrand was down for a couple of days however that is now resolved. I have a seperate MQTT instance pulling data from them however I would love to get this integration working again. When I try to reload the integration I now see the following error log:

This error originated from a custom integration.

Logger: root
Source: custom_components/hildebrandglow/glow/mqttpayload.py:62
Integration: Hildebrand Glow (documentation)
First occurred: 11:09:53 am (2 occurrences)
Last logged: 11:17:34 am

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
    rc = self._loop(timeout)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop
    rc = self.loop_read()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1556, in loop_read
    rc = self._packet_read()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
    rc = self._packet_handle()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
    return self._handle_publish()
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
    self._handle_on_message(message)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
    on_message(self, self._userdata, message)
  File "/config/custom_components/hildebrandglow/glow/__init__.py", line 136, in _cb_on_message
    payload = MQTTPayload(msg.payload)
  File "/config/custom_components/hildebrandglow/glow/mqttpayload.py", line 255, in __init__
    Meter(payload["gasMtr"]) if "03" in payload["gasMtr"]["0702"] else None
  File "/config/custom_components/hildebrandglow/glow/mqttpayload.py", line 224, in __init__
    self.reading_information_set = self.ReadingInformationSet(payload)
  File "/config/custom_components/hildebrandglow/glow/mqttpayload.py", line 62, in __init__
    self.supply_status = self.SupplyStatus(
  File "/usr/local/lib/python3.9/enum.py", line 384, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.9/enum.py", line 702, in __new__
    raise ve_exc
ValueError: 'FF' is not a valid Meter.ReadingInformationSet.SupplyStatus

Just to be clear, I am running supervised HA on version 2022.3.7

@townsmcp
Copy link
Author

townsmcp commented Apr 9, 2022

@unlobito any ideas about this issue and failing to load the integration?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant