Hildebrandglow - Smart Meters - SMETS2

The fix is in the beta version available now.

1 Like

Is anyone having issues with the API data again?
Nothing has appeared in HA or on the Bright app since 3AM.

Yes, it’s broken for me.

Same here.

@ColinRobbins - 10 days now since some of your pull requests.

Might it be better to keep updating your own fork (almost like a pre-release fork) - then at least we’d get some of the fixes in a more timely manner? No offense to @HandyHat but its a little frustrating knowing that fixes are there but we can’t have them because neither yours nor theirs are being updated.

My dev branch is a roll up of all the fixed I’ve done.

But this will not work with HACS, so you’ll have to install manually by coping the files.

I did try previously a merge into my main branch, but that then needed changes for HACS to work, that it would not be appropriate to push to @HandyHat. So had to back that off to enable me to keep in sync with HandyHat when they make changes.

Thanks.

So I’ve removed your 0.5.0 version and the custom repository from HACS - and re-added the HandyHat one back in, but I now can’t log in to the integration - all I get is the error : “Unexpected error”.
Where do I go to find out what’s causing this (I know the creds are right as I can log into the Bright app with no issues).

Presumably I’ve somehow ended up with part of your repository and part of the HandyHat one. But I don’t understand how or where.

I’ve tried removing everything again - the folder within custom_components disappears - I then restart HA and add the HandyHat one. And then I’m stuck. Help!

The trees are now in sync agan, so suggest using the HandyHat version.

  1. Remove the integration from the configuration / integrations page
  2. Remove the integration from the HACS / integrations page
  3. Restart HA
  4. Check custom_components/hildebrandglow_dcc has been removed.
  5. Check the sensor.electric_consumption_today has gone.
  6. Restart HA
  7. Re-add the integration into HACS
  8. Re-add the DCC integration in HA.
  9. Check the custom_components/hildebrandglow_dcc/manifest.json shows version 0.5.1 (or above)

Thanks…I’ve followed that through (almost) to the letter.

I can’t do step 1 - because I can’t add it in in the first place since removing yours.
Additional reboot after step 7.
Confirmed manifest.json is showing 0.5.1

However, it makes no difference, it still won’t accept the credentials - “Unexpected error”…

image

Assuming the code is definitely OK then the previous version must have left something behind somewhere surely ?

Thanks,
Ian

Got this in the logs : -

Logger: custom_components.hildebrandglow_dcc.config_flow
Source: custom_components/hildebrandglow_dcc/glow.py:46
Integration: Hildebrand Glow (DCC) (documentation, issues)
First occurred: 10:24:43 (3 occurrences)
Last logged: 10:34:06

Unexpected exception

Traceback (most recent call last): File “/config/custom_components/hildebrandglow_dcc/config_flow.py”, line 60, in async_step_user info = await validate_input(self.hass, user_input) File “/config/custom_components/hildebrandglow_dcc/config_flow.py”, line 37, in validate_input glow = await hass.async_add_executor_job( 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_dcc/glow.py”, line 46, in authenticate response = requests.http.post(url, json=auth, headers=headers) AttributeError: module ‘requests’ has no attribute ‘http’

That command ‘requests.http.post’ seems to be the issue, I’ve removed the ‘.http’ and it all works again.

2 Likes

Sorry about that, looks like I messed up my recent PR.
Removing the .http is the correct fix.
Have just issued a PR, so hopefully @HandyHat can make an update.

Anyone else gets days where your meters aren’t connected to DCC or is it just my meters with terrible connection? Currently showing on bright app that gas meter hasn’t been seen for 4 days and electricity meter 2 & half days.

Hi @ColinRobbins

Thanks a lot for your work with this, i was gladly surprised seeing this DCC integration (of course thanks HandyHat too), as I have been trying to find the best approach on how to get my Octopus data into HA, but hated their API :frowning:

I have set this up last night and all my data is correct, including tariff and standing charges, however when i look at the Energy dashboard, i get 0 cost for both Electricity and Gas.

I am aware of the issue you have mentioned and PRed with ha/core and the alleged ha/frontend one (though i can’t seem to find a link), i am just wondering though:

Should i be getting a cost for Electricity and something is wrong? This is the first day running the integration, i have the graphs and data, just no cost calculation. Latest HA version, for cost entity i have set up the tariff_rate sensor from the integration.

I guess the Gas one will remain “broken” until HA makes a decision on handling units of measurement?

With regards to the standing charge we get in the UK, is there a workaround that you are aware of? I have seen the feature request for it, and already voted for it, but god know when or if that will happen.

Thanks in advance
Rob

Are you seeing data values for each of the sensors from the Hildebrand DCC sensors?
I.e., are you seeing tariff and cost data pulled from DCC?
If not, are you seeing costs data in the a Glow APP?
If you are not seeing cost data here, the Energy dashboard will not work.

If you do have ‘DCC’ data, then the energy dashboard should work.
I use the ‘use an entity to track total costs’ option, and use the DCC ‘Electric Cost (Today)’ sensor.
This sidesteps the standing charge issue, as the DCC cost figure includes the standing charge.

The Energy ‘circles’ not representing Gas correctly is something we’ll have to live with until the Lovelace people come up with a solution. My PR was rejected as being kWh specific, and not dealing with Metric.

Hey Colin,

Thanks for your reply. Yes I have all the data coming correctly from DCC, and from glow API.

I was however using the entity Electric Tariff Rate instead of your recommendation Electric Cost (Today). When setting it to the new one, I get a warning:

Unexpected unit of measurement

Translation Error: The intl string context variable "currency" was not provided to the string "The following entities do not have the expected units of measurement ''{currency}/kWh'' or ''{currency}/Wh'':"

* sensor.electric_cost_today (GBP)

This ties into an issue I have just created on github (though not directly): Entities units of measurement + more ¡ Issue #88 ¡ HandyHat/ha-hildebrandglow-dcc ¡ GitHub

For me the Energy Distribution circles numbers match exactly the sum of each hourly slot from the Bright app, so not sure if I understand what you mean?

Thanks again for your help

Have you added the cost in the “Use an entity tracking the total costs” field.
It think you may have added it to “Use an entity with current price”, hence the error.

1 Like

You were absolutely spot on about this one. My bad for misreading your message. As to the Github issue, i will continue that there for the sake of cleaning this thread clean

Thanks again

And just to add on this point, it might be helpful for others if this suggestion of what entities to use for Energy Management was added to the repo Readme

These sensors appear to have been pulling data in pretty reliably for a couple of weeks. I was going to switch my energy dashboard over to them. My HA gas source is still only allowing m3 even though I’m on the latest home assistant and everything is updated via HACS. I expected to be able to select the Gas source from the extension, but it’s only in kWh?

Edit: my bad, I had to delete the existing m3 gas source before it would then let me choose a source with a different unit of measurement. You can’t mix and match at the moment.