Hildebrandglow - Smart Meters - SMETS2

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!

1 Like

@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.

1 Like

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. :slight_smile:

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

6 Likes

Should your forked version work without the Glow hardware?

Yes, it works without needing Glowmarkt hardware

Fantastic! I’ve added it to HACS, but can’t see the option to add it as an integration. Have I missed a step?

1 Like

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 :blush: thanks for doing this!

1 Like

This is indeed amazing. Thank you! But where do I find my “application ID”?

1 Like

It’s b0f1b774-a586-4f72-9edd-27ead8aa7a8d

2 Likes

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

3 Likes

Thank you! :grinning:

That was exactly my problem, thanks @declan-morris!

I’m getting the following when trying to add a HACS repository;
image

can anyone spot what I’ve done wrong?

You’re searching in the existing repositories.
To get it working

  • Go to the HACs integration screen
  • Click on the top right then “Custom Repositories”
  • Add the URL https://github.com/HandyHat/ha-hildebrandglow and the type is “integration”

That should then let you install, you’ll need to reboot HA then go to the “normal” integrations page to add the new integration there.

1 Like

@declan-morris Thank you. Followed your instructions and bingo, all setup. Really looking forward to seeing this as the data starts to flow.
@HandyHat - Thanks for your support for the HA Energy Stats.

1 Like

@HandyHat i have everything set up but for some reason my electricity sensor has gone unavailable around midnight for the past couple of days and I have to re add the integration to get it back. Any ideas on why this is?

I’m seeing the same thing. Tried a reboot this morning and that switched the sensors back to being present but with no data being reported.

Didn’t think to try that, a restart brought the sensor back. No energy reported in the dashboard yet but it does take a bit of time.

I’m also getting the sensor not providing data from midnight. I’ll try rebooting and see what happens.

One other question. In the Bright app I can see that both the electric and gas meters are present (under the Settings → Verified Meters section. However only the electric meter is providing data in the App. when Originally setup in HA only the Electric meter readings appear. Is there any other setting that is required to get gas data to flow or am i restricted to Electric data only?

Once again this is already a big step forward from where I was so happy to help in any testing and/or problem solving.