Error setting up Integration #19
Comments
So i have determined that neither of the resourceTypeId values match the 4 entries received from glow.retrieve resources.... |
I am having the same issue as well. I have the bright app registered and i am using the application id in their API PDF. Logger: homeassistant.components.sensor Error while setting up hildebrandglow platform for sensor I have tried adding 0.02 and the master builds via HACS whenIi add the integration via config it says successfully added for . and does not show any entnties in the Hildebrand Glow Integration Card. |
The reason is because your meter resource type id do not match those in the code, maybe they have changed? I fixed that so the integration loads but the readings are not working, seems that something may have changed in the glow API.... |
as per their official repository url: |
yes i know but mine are: e3a5db34-6e0c-4221-9653-8d33e27511ba for electricity and 08ab415f-d851-423f-adf4-c2b1e0529e27 for gas. changing the code fixed this with one other small change in sensor.py.... |
i have figured out my resource ID's as well by doing some curl commands. Will just changing these in the sensor.py (lines 66 and 67) get me to where you are at ? |
I changed lined 66 and 67, line 107 I replaced with "Smart Meters, Gas & Electric" - no variable and also line 55 from async_add_entities([sensor]) to async_add_entities([new_entities]). It integrates OK but I am now having problems with updates, it seems that step 4b in the glow api docs does not work for me.... |
I am experiencing the same issue. I am watching this thread for a solution. |
I assume you mean step 4b? I expect my issue is that I do not yet have the CAD, I am relying on data from the meters only at this stage. Support at glowmarkt have kind of suggested this but not confirmed it. If anyone can get a reply from glowmarkt support to confirm this would be grateful (i.e that data is limited without the CAD - delayed 30 min readings is all that works, not instantaneous readings) |
I am not using this integration yet as I currently use Node Red to extract data from the MQTT stream and have done reliably since it became available. I only have the glow stick and not the CAD and can confirm instantaneous readings work perfectly with this setup. I am not sure if that answers your question but hope the info is helpful. |
My log extract with the traceback error
|
See my earlier comment on this thread on how to fix this.. |
Yes it makes sense...i have neither the stick nor CAD as they are out of stock...it seems that the glowmarkt api behaves differently in this case. MQTT is only available with one of their devices... |
I have changed lines 66 and 67 and line 55 to async_add_entities(new_entities) I get the sensors showing but no data and I get the following error File "/config/custom_components/hildebrandglow/sensor.py", line 115, in state I see a mention of changing line 107 but that doesn't make sense to me - can @timsavory share the config you have changed on 107 please ? |
Good afternoon all, Indeed the resourceTypeId may be different depending on where the data was sourced from on initial setup. It is recommended that the "classifier" field on the resource should always be used to indicate the type of data stream. (See end of Step 3 section https://docs.glowmarkt.com/GlowmarktAPIDataRetrievalDocumentationIndividualUserForBright.pdf) When there is a Glow CAD, IHD or a clamp transmitter, installed the /current API will return the latest power reading. If however the data is solely sourced from your smart meter via the DCC, only the 30 minute profile reads will be available, which means that no "instantaneous" power readings are available. In such cases the /current endpoint will return something like this: |
That works fine for me using Postman but the code here doesn't work
|
I'm also hitting the same issues as others in this thread. I've set up the integration using HACS and entered an App ID, username, and password, but no entities have been added. I do not have a CAD only API access to my meter data. Due to owning a Honeywell smart meter I only have Gas data show up in the Bright App. |
Hello! 👋 @technofreak74 has sent in a pull request that will hopefully resolve the setup issues that folks in this issue have been experiencing. Please ping back with your experiences after installing the update. Thanks for your patience & @technofreak74 for patching this! |
Added the source to custom components, added the integration, authenticated and then received this error in the logs:
Logger: homeassistant.components.sensor
Source: custom_components/hildebrandglow/sensor.py:55
Integration: Sensor (documentation, issues)
First occurred: 14:22:51 (2 occurrences)
Last logged: 14:26:08
Error while setting up hildebrandglow platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/hildebrandglow/sensor.py", line 55, in async_setup_entry
async_add_entities([sensor])
UnboundLocalError: local variable 'sensor' referenced before assignment
The text was updated successfully, but these errors were encountered: