I also bought the CAD but didn’t get MQTT enabled. As per my previous post I was recieving data from my Electricity meter but not the gas. Now i’m not receiving anything. The electricity sensor is just showing as unavailable. Are things still working ok for you?
If you want to get all your data then you need to request MQTT access via email.
I did have an outage on my gas earlier tonight on the CAD and MQTT but that is working again now.
I found an excellent GitHub Link about getting the MQTT data into HA. I use NR so it was quick and easy to get at the data and to update a couple of sensors but it is easy enough to add them to a sensor.yaml file.
Is anyone using the hildebrand integration through HACS? I’ve added the integration via HACS and restarted but it doesn’t come up as an integration to add and there’s no error in the logs?
I was going through just this yesterday. I tried installing it via HACS a couple of times, latterly enabling beta versions and getting the most recent. Initially there was still no integration to setup but after about 45 minutes I checked again and it had appeared as an integration. I was able to add it and add my Bright app login credentials but it reports “failed to setup” and checking the logs I have:
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/hildebrandglow/glow.py:100
Integration: Hildebrand Glow (documentation)
First occurred: 8:29:14 (1 occurrences)
Last logged: 8:29:14
Error setting up entry for hildebrandglow
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 293, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/hildebrandglow/__init__.py", line 30, in async_setup_entry
await hass.async_add_executor_job(glow.retrieve_cad_hardwareId)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/hildebrandglow/glow.py", line 100, in retrieve_cad_hardwareId
self.hardwareId = cad["hardwareId"]
KeyError: 'hardwareId'
With the new features in Home Assistant I was hoping to pull in my data from my SMETS2 meter. I don’t mind buying a Glowmarkt device if that’s the key but currently they are out of stock
I tried getting this working as well, after reinstalling multiple times I finally managed to install the beta and add the integration only to hit a similar (or same) error as you. I thought it was an install error given the initial issues so I restored a backup but I’m back at square one of not having it even appear in the integrations.
Are there any other companies that offer a similar API product as Glowmarkt which is currently supported by HA? Does anyone know of documentation on writing HA integrations? I work as a dev so if there’s nothing in this space that works I might give it a shot when I have time, it has been quite a while since I wrote any python though!
@Eldudemeister Not so far. Although beyond retrying it a couple of times in case it was some random glitch or temporary connectivity issue I haven’t tried anything else yet.
@declan-morris No other companies that I know of (but then my knowledge in this space is limited). There is documentation on integrations at Starting with Development | Home Assistant Developer Docs (home-assistant.io). From the error message I can’t help but wonder whether it’s as basic as something having changed in the Bright API that the current integration hasn’t caught up with. But I don’t know where to look on either end of that to investigate further.
Has a quick play with some of the glow.py code last night, authenticating and retrieving a list of resources worked, didn’t have time to test grabbing actual readings.
Looks like a PR has been submitted to get the integration at least found by HA. I implemented it manually and this allowed it to be found on the integrations page and it found my gas and electricity meters. After that though the sensors doesn’t update and I got the below errors.
2021-08-11 19:27:44 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 708, in _update_entity_states
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 451, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state
state = self._stringify_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in _stringify_state
state = self.state
File "/config/custom_components/hildebrandglow/sensor.py", line 112, in state
return self._state["data"][0][1]
IndexError: list index out of range
Hey @Gronda@Eldudemeister@declan-morris
The integration doesn’t work unless you have Glowmarkt hardware because it’s using the API to request realtime usage data, which doesn’t exist if you are going via the DCC because that data is updated every 30 minutes max. I’ve forked that integration and modified it slightly to have it pull the usage so far that day (but of course it will be up to 1 hour off) - you can find that repo and install it via HACS here (EDIT: new repo) Additionally, it has support for the home assistant energy statistics.
The only other company providing a similar API product are n3rgy, however from what I can tell they only update their data every day so it’s not as powerful as Hildebrand’s
This is amazing! Not against buying the CAD but don’t really need it if I can use your integration. All set up so will keep an eye on it and see my energy stats thanks for doing this!
Ah this is fantastic, I’ve quickly added your integration @HandyHat and it appears to be working! Thanks very much for getting this working. I’ve created a quick PR just to update the instructions in case people don’t notice the different URL!
@WhimsySpoon make sure you’ve added the URL https://github.com/HandyHat/ha-hildebrandglow not the unlobito repo