Hildebrandglow - Smart Meters - SMETS2

This is what works for me -

- platform: mqtt
  name: "Gas M3"
  state_topic: "SMART/HILD/XXXXXXXXXXXXX"
  unit_of_measurement: 'm³'
  value_template: "{{ value_json['gasMtr']['0702']['00']['00']|int(base=16) * value_json['gasMtr']['0702']['03']['01']|int(base=16) / value_json['gasMtr']['0702']['03']['02']|int(base=16) }}"
  icon: 'mdi:fire'
  state_class: total_increasing
  device_class: gas

Something weird is going on. Even though mine is the same as yours, I copied your into my sensors.yaml and restarted - That then appears as sensor I can choose. :-/
I deleted my sensor and used yours except I changed the name back to “Home Gas”, restarted…It’s not available to choose. I restore my sensors.yaml back to the way it was, renamed the sensors from “Home Gas” to “Home Total Gas” and it appears. I dont get why it wouldn’t like the name, but that seems to have been the problem.

Maybe the last_reset attribute was missing in customisations ? If you change the names the sensor name will also change as well.

Thanks for the heads up. I previously had it set to measurement. Will this accommodate the fact that the sensor value resets every day?

Thats the bit that makes even less sense… the new sensor doesn’t have a last_reset in the customize.yaml:

GAS

Unlike my electricity sensor:

ELE

For those who have, like me, lost all data recently, it is worth checking with your supplier. I’ve just spoken with mine (Bulb) who tell me our meter has dropped off the network. They’ll get it rebooted but it could take 2-3 weeks to pickup again.

Why must everything involving smart meters take 2-3 weeks? It’s a relatively new technology but it all just feels so clunky.

This setup works for me:

template:
  sensor:
    - name: Gas Consumption
      unit_of_measurement: 'm³'
      state: "{{ states('sensor.gas_consumption_today') | float * 3.6 / 40 / 1.02264 }}"
      icon: 'mdi:fire'
      state_class: total_increasing
      device_class: gas

And is bringing the data back correctly:

3 Likes

Given that no home wifi is needed for a smart meter, my guess is that the data-voles unionised so it takes a while for the reboot message to traverse the void and be processed. That or the entire network runs off some bloke with a repurposed licence fee detector van driving around the country broadcasting update messages.

Either seem equally likely to me!

1 Like

Confirmed working for me too.

Thanks to WhimsySpoon for pointing me here. Appreciated!

Got this setup - and now got Gas on Energy Dashboard but two quick queries…

And added a last_reset attribute with the value of 1970-01-01T00:00:00.000000+00:00 as a customization to that new entity. Thanks to @BertrumUK for the guidance.

What exactly is the steps for this? I’ve added the configuration yaml bit - all good, but not sure where this goes?

Also - Now have a new Gas sensor for total_increasing - but my electricity doesn’t have this total_increasing - do I need to setup a new electricity sensor?

Thanks in advance :slight_smile:

Looks like the last_reset addition is no longer required! - Energy Management in Home Assistant - #801 by Mariusthvdb

You shouldn’t need to make any changes to add the Electricity reading. I use a Shelly EM rather than this integration, but I have noticed it already shows up in the config by default.

Perfect then - just waiting for the gas reading to start populating. Run a kitchen sink worth of hot water at lunch time to generate some usage :slight_smile:

Thanks again for your help.

Cheers

confirmed that this works for me also


Oldbloke

Has anyone elses stopped reporting consumption since around 10am today?

Data wasn’t in the bright app either but is now… reinstalled the integration and now i’m not getting a sensor at all :frowning:

Now i’m getting a reading which looks some what correct… why is it that i have had to delete and re-add the integration twice now? does anyone know? would it of evnetually come back by itself?

1 Like

Not sure why but this doesn’t work for me, I don’t get the option in the Energy to add.

I only just noticed mine was no longer working. It stopped sometime on the 7th, presumably at around the same time as yours. I had to remove the integration and re-add…

I’ve come up with my own solution which i’m now running along side this addon… that way i can see if they both stop at the same time, then it’s nothing to do with the addon.

if you’re interested it’s here : Glow2MQTT - Send data from Glowmarkt / Hildebrand (Bright app) to MQTT

1 Like

Hi, I’m with EON and using the Bright app to retrieve the meter readings. It’s working fine but on my smart meter (and same on the app) I can’t see the tariff I’m on so I can’t track my energy cost (despite the fact that on the smart meter I can see how much I spent every day/week/month/year).

Do I need to manually do all the calculation on HA?

I seem to having an issue where everytime I restart HA - the integration fails to authenticate (almost as if it’s lost my password) - and I have to remove the integration - re-add it - and then it’s fine - until the next time.

Anybody got any suggestions as to whats causing this ?

HA shows this -

Logger: homeassistant.components.sensor
Source: custom_components/hildebrandglow_dcc/sensor.py:36
Integration: Sensor (documentation, issues)
First occurred: 15:10:31 (2 occurrences)
Last logged: 16:23:19

Error while setting up hildebrandglow_dcc platform for sensor
Traceback (most recent call last):
File “/config/custom_components/hildebrandglow_dcc/sensor.py”, line 33, in async_setup_entry
resources = await hass.async_add_executor_job(glow.retrieve_resources)
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 78, in retrieve_resources
raise InvalidAuth
custom_components.hildebrandglow_dcc.glow.InvalidAuth

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 249, in _async_setup_platform
await asyncio.shield(task)
File “/config/custom_components/hildebrandglow_dcc/sensor.py”, line 36, in async_setup_entry
await Glow.handle_failed_auth(config, hass)
TypeError: handle_failed_auth() missing 1 required positional argument: ‘hass’