UK "smart" energy meters

Just installed ha-hildebrandglow-dcc v0.6.0 (on Home Assistant 2022.4.6) and it doesn’t seem to work.
I cannot find it under the integrations/add Integration but it shows working under HACS (yes restarted).
I can see all the files under custom_components folder.

Any ideas what to try to get it working?

This is most likely a browser caching issue and is tucked away in HACS’ documentation: Integrations | HACS.

Clearing your browser cache should make it appear :slight_smile:

@HandyHat Yes it was a browser caching issue, thanks!!!

1 Like

I do have the Chameleon IDH3 instead of the 6, and Smart Things has a "Smart Meter " device by Chameleon. I tried to add it, it asked me for my address and an invoice and it says it will be set up in 48h. I imagine it’s trivial to get the data from Smart Things into Home Assistant (I’m installing Home Assistant as we speak, for the first time)

This works for me to. It is then possible to get the usage data into Home Assistant from Geo’s API.

However I have found the Trio a bit flakey. It’s online on my network (can ping it all the time), but often fails to send data to Geo.

I’ve been using a rest sensor :

# Geotogether Sensor
- platform: rest
  name: geo_accesstoken
  method: POST
  payload: '{ "identity" : "USERNAME", "password": "PASSWORD" }'
  resource: https://api.geotogether.com/usersservice/v2/login
  scan_interval: 3000
  value_template: "{{ value_json.username }}"
  json_attributes:
    - accessToken

- platform: rest
  name: geo_energy_usage_live
  resource: https://api.geotogether.com/api/userapi/system/smets2-live-data/SYSTEMID
  headers:
    Authorization: >
      Bearer {{ state_attr('sensor.geo_accesstoken', 'accessToken') }}
  scan_interval: 30
  value_template: "{{ value_json.id | default('unknown') }}"
  json_attributes:
    - power

- platform: rest
  name: geo_energy_usage_total
  resource: https://api.geotogether.com/api/userapi/system/smets2-periodic-data/SYSTEMID
  headers:
    Authorization: >
      Bearer {{ state_attr('sensor.geo_accesstoken', 'accessToken') }}
  scan_interval: 300
  value_template: "{{ value_json.id | default('unknown') }}"
  json_attributes:
    - totalConsumptionList
    - activeTariffList

and some template sensors:

- sensor:
  - name: "Total Gas Used"
    unique_id: geo_total_gas_used
    state: "{{ state_attr('sensor.geo_energy_usage_total','totalConsumptionList') | selectattr('commodityType', 'equalto', 'GAS_ENERGY') | map(attribute='totalConsumption') | first/1000*11.1868 | round(2) if is_state('sensor.geo_energy_usage_total','SYSTEMID') else 'unknown' }}"
    unit_of_measurement: "kWh"
    device_class: energy
    state_class: total_increasing
  - name: "Total Electricity Used"
    unique_id: geo_total_electricity_used
    state: "{{ state_attr('sensor.geo_energy_usage_total','totalConsumptionList') | selectattr('commodityType', 'equalto', 'ELECTRICITY') | map(attribute='totalConsumption') | first | round(2) if is_state('sensor.geo_energy_usage_total','SYSTEMID') else 'unknown' }}"
    device_class: energy
    state_class: total_increasing
    unit_of_measurement: "kWh"
  - name: "Live Gas Usage"
    unique_id: "geo_live_gas_usage"
    state: "{{ state_attr('sensor.geo_energy_usage_live','power') | selectattr('type', 'equalto', 'GAS_ENERGY') | map(attribute='watts') | first if is_state('sensor.geo_energy_usage_live','SYSTEMID') else 'unknown' }}"
    device_class: power
    state_class: measurement
    unit_of_measurement: "W"
  - name: "Live Electricity Usage"
    unique_id: "geo_live_electricity_usage"
    state: "{{ state_attr('sensor.geo_energy_usage_live','power') | selectattr('type', 'equalto', 'ELECTRICITY') | map(attribute='watts') | first if is_state('sensor.geo_energy_usage_live','SYSTEMID') else 'unknown' }}"
    device_class: power
    state_class: measurement
    unit_of_measurement: "W"
  - name: "Gas Active Tariff"
    unique_id: geo_gas_active_tariff
    state: "{{ state_attr('sensor.geo_energy_usage_total','activeTariffList') | selectattr('commodityType', 'equalto', 'GAS_ENERGY') | map(attribute='activeTariffPrice') | first/100 if is_state('sensor.geo_energy_usage_total','SYSTEMID') else 'unknown' }}"
    unit_of_measurement: "GBP/kWh"
  - name: "Electricity Active Tariff"
    unique_id: geo_electricity_active_tariff
    state: "{{ state_attr('sensor.geo_energy_usage_total','activeTariffList') | selectattr('commodityType', 'equalto', 'ELECTRICITY') | map(attribute='activeTariffPrice') | first/100 if is_state('sensor.geo_energy_usage_total','SYSTEMID') else 'unknown' }}"
    unit_of_measurement: "GBP/kWh"

Replace USERNAME, PASSWORD, and SYSTEMID with your details. (I can’t remember how I got SYSTEMID … its in one of the responses to the api)

2 Likes

Thanks for this - improvement over what I was using in that it includes the current price. Fantastic!

By the way, instructions for getting the system ID are in post 102 in this thread.

Hey @Scoff
Thanks for the details in this post!
I’ve got the bright app set up but I’m struggling to find the integration for glow - can you point me in the right direction?

Thanks!

Hey @vaderag
No problem, you can install the glow integration via HACS - here’s the github link which I think is also further up in this thread somewhere!

That should get you up and running :slight_smile:

2 Likes

Changing my question to something actually useful other than RTFM
Now that I have the data into HA, I see I can add the entity’s tracking total costs to the Energy tab, but I’m missing a statistic - I’ve scanned the thread and I don’t think I see anyone mentioning how they did this - anyone advise?

Thanks - just installed HACS (was on my list anyway) but oddly still not seeing it (with any search)

Sorry if this is a n00b question - do I somehow need to add the github repository to HACS - I’m assuming it should be there given a ton of others are?

EDIT: Nevermind, would help if i read the link you posted

  • @LucidityCrash
    I also have one of these IHDs and when I moved supplier (well, got moved due to supplier going bust) it stopped working. Neither Drayton or GEO have any idea why, but my Chameleon which was originally supplied has continued working swimmingly
    Based on my experience of the Drayton I would suggest using the supplier one just in case!

setup Hildebrand Glow integrations with smart metre some time ago - only a few days get an hourly reading - there are plenty of gaps when HA doesn’t get any information about kwh used at all. Anyway of improving this - would a better smart metre be best.

Hildebrand Glow are about to launch a SMETS2 compatible non-display CAD device, which will be great for those who don’t really want an extra display around the house.

What is very interesting is that they explain on the page that the reason that the SMETS1 version of the CAD doesn’t work with SMETS2 is because it only has ‘SMETS1 certificates’ on the device. I assume what they mean here is that the firmware only has the encryption keys/generators to connect to a SMETS1 HAN.

Presumably all that’s needed to enable access to the Zigbee data directly from the meter HAN itself is knowledge of the network keys used for that particular Zigbee network and the key exchange mechanism used to join the ‘IHD’ to the network. I’m sure there is some reverse engineering that could be done here to create a Zigbee dongle that could spoof being an IHD and join the network.

Hey! Can i confirm that the CAD only (no IHD) allows for 10 second updates via the cloud MQTT to home assistant? So i could have a display on my dashboard showing current usage?

1 Like

Thanks for updating this and to all who have added to this. I need to find time to convert it into a proper integration.

2 Likes

After trying to update my setup recently, I’ve broken it and I can’t work out why. This is my current config.

  - platform: rest
    name: geo_accesstoken
    method: POST
    payload: '{ "identity" : "[email protected]", "password": "Kz7N%BXT3QcWN7" }'
    resource: https://api.geotogether.com/usersservice/v2/login
    scan_interval: 3000
    value_template: "OK"
    json_attributes:
      - accessToken
  - platform: command_line
    command: >
      curl 
      -H "Authorization: Bearer {{ state_attr('sensor.geo_accesstoken', 'accessToken') }}"
      -H "Accept: application/json" 
      -H "Content-Type: application/json"
      'https://api.geotogether.com/api/userapi/system/smets2-live-data/11b0ff6b-e5a3-4c9c-bd6f-dc1206bc2296'
    name: geo_energy_usage_live
    scan_interval: 30
    value_template: "OK"
    json_attributes:
      - power

  - platform: command_line
    command: >
      curl 
      -H "Authorization: Bearer {{ state_attr('sensor.geo_accesstoken', 'accessToken') }}"
      -H "Accept: application/json" 
      -H "Content-Type: application/json"
      'https://api.geotogether.com/api/userapi/system/smets2-periodic-data/11b0ff6b-e5a3-4c9c-bd6f-dc1206bc2296'
    name: geo_energy_usage_total
    scan_interval: 600
    value_template: "OK"
    json_attributes:
      - totalConsumptionList

  - platform: filter
    name: "Home Electricity Import Meter Filtered"
    entity_id: sensor.home_electricity_import_meter
    filters:
    - filter: outlier
      window_size: 60
      radius: 4.0
template:
  sensor:
  - unique_id: geo_gas_usage_total
    name: 'Total Gas Used'
    state: "{{ state_attr('sensor.geo_energy_usage_total','totalConsumptionList') | selectattr('commodityType', 'equalto', 'GAS_ENERGY') | map(attribute='totalConsumption') | first/1000*11.1868 }}"
    unit_of_measurement: "m³"
    device_class: 'gas'
    state_class: total_increasing
    attributes:
      last_reset: '1970-01-01T00:00:00+00:00'
  - unique_id:  geo_electricity_usage_total
    name: 'Total Electricity Used'
    state: "{{ state_attr('sensor.geo_energy_usage_total','totalConsumptionList') | selectattr('commodityType', 'equalto', 'ELECTRICITY') | map(attribute='totalConsumption') | first }}"
    device_class: energy
    state_class: total_increasing
    unit_of_measurement: "kWh"
    attributes:
      last_reset: '1970-01-01T00:00:00+00:00'
  - unique_id:  geo_gas_usage_live
    name: 'Live Gas Usage'
    state: "{{ state_attr('sensor.geo_energy_usage_live','power') | selectattr('type', 'equalto', 'GAS_ENERGY') | map(attribute='watts') | first }}"
    device_class: energy
    state_class: total
    unit_of_measurement: "W"
  - unique_id:  geo_electricity_usage_live
    name: 'Live Electricity Usage'
    state: "{{ state_attr('sensor.geo_energy_usage_live','power') | selectattr('type', 'equalto', 'ELECTRICITY') | map(attribute='watts') | first }}"
    device_class: energy
    state_class: total
    unit_of_measurement: "W"
utility_meter:
  electricity:
    source: sensor.geo_electricity_usage_total
  gas:
    source: sensor.geo_gas_usage_total

But in the energy dashobard, it’s not seeing the usage. Can anyone spot the mistake I’ve made?

Any idea when will the SMETS2 CAD be available?
Im finding that the data from the glow API integration is pretty unreliable - see gaps in data below - so would definitely prefer to get 10sec data via MQTT.
I dont need a new IHD though - existing geo trio 2 works OK.

image

Would really love to know the answer to the MQTT question myself. I currently have Tasmota running on a Wemos D1 mini with a PZEM monitoring the electricity usage, but no way to get the gas usage. Getting the Hildebrand CAD and having 10 second granular updates of gas and electricity would be great…

1 Like

I’ve recently had a Smets2 meter installed (with Bulb), and am using the Hildebrand integration. Seems to work fine.

image

I’ve made some updates to this to add extra sensors etc and posted the results over on this thread which is more GEO focused https://community.home-assistant.io/t/geo-home-smart-meter-integration/379789/37