HandyHat / ha-hildebrandglow-dcc

Home Assistant integration for UK SMETS (Smart) meters pulling data from the DCC via the Hildebrand Glow API
MIT License
229 stars 31 forks source link

No or Incomplete Data showing in Home Assistant #355

Open Bookermind opened 10 months ago

Bookermind commented 10 months ago

Describe the bug No or incomplete data showing in Home Assistant for Gas or Electric meters

To Reproduce Install the integration, wait the advised two hours. Observe that daily usage does not update over a period of multiple hours (is currently rough 10% of that shown in the Bright app for today)

Expected behaviour Updating energy usage information

Version using version 1.0.3 with HA 10.4 Supervisor 2023.08.1

Debug log 2023-08-13 20:32:52.148 DEBUG (MainThread) [custom_components.hildebrandglow_dcc] Successful Post to https://api.glowmarkt.com/api/v0-1/auth warnings.warn( 2023-08-13 20:32:52.565 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.11/site-packages/aioWiserHeatAPI/helpers/extra_config.py:21: RuntimeWarning: coroutine '_make_delegate_method.<locals>.method' was never awaited config_file.close() 2023-08-13 20:32:52.792 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/virtualentity 2023-08-13 20:32:52.924 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/virtualentity/7b4ad3b1-23b5-4bab-90d9-df9083055e54/resources 2023-08-13 20:32:52.974 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/resource/4757e6ec-e28d-4981-8f1d-7aa378784bec/tariff 2023-08-13 20:32:52.974 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Finished fetching tariff data in 0.048 seconds (success: True) 2023-08-13 20:32:53.074 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/resource/c3348e8f-13c7-4e5a-a7ff-4ff08d741b67/tariff 2023-08-13 20:32:53.074 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Finished fetching tariff data in 0.143 seconds (success: True) 2023-08-13 20:32:53.089 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/resource/4757e6ec-e28d-4981-8f1d-7aa378784bec/catchup 2023-08-13 20:32:53.097 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/resource/5761fe9f-b683-486c-9f4e-f3f7b4a4fd33/catchup 2023-08-13 20:32:53.152 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/resource/8cf726de-1691-4de4-ba97-35d6b4aa27b4/catchup 2023-08-13 20:32:53.165 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successful GET to https://api.glowmarkt.com/api/v0-1/resource/c3348e8f-13c7-4e5a-a7ff-4ff08d741b67/catchup 2023-08-13 20:32:53.242 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successfully got daily usage for resource id 4757e6ec-e28d-4981-8f1d-7aa378784bec 2023-08-13 20:32:53.300 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successfully got daily usage for resource id c3348e8f-13c7-4e5a-a7ff-4ff08d741b67 2023-08-13 20:32:53.351 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successfully got daily usage for resource id 8cf726de-1691-4de4-ba97-35d6b4aa27b4 2023-08-13 20:32:53.351 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.dcc_sourced_smart_electricity_meter_cost_today (<class 'custom_components.hildebrandglow_dcc.sensor.Cost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author. 2023-08-13 20:32:54.091 DEBUG (MainThread) [custom_components.hildebrandglow_dcc.sensor] Successfully got daily usage for resource id 5761fe9f-b683-486c-9f4e-f3f7b4a4fd33 2023-08-13 20:32:54.092 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.dcc_sourced_smart_gas_meter_cost_today (<class 'custom_components.hildebrandglow_dcc.sensor.Cost'>) is using state class 'total_increasing' which is impossible considering device class ('monetary') it is using; expected None or one of 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

buildwithdan commented 10 months ago

having the same issue...

gcoan commented 10 months ago

Same issue. Signed up to Bright yesterday, after an hour or so data was appearing in the app. Installed the Home Assistant integration and all that is being pulled through is the daily standing charge in DCC Sourced smart electricity meter Cost (today) The DCC Sourced smart electricity meter Usage (today) is stuck on zero all the time. In the bright app I can see the half-hourly meter data OK

ardarluk commented 10 months ago

Same issue. Signed up yesterday and the Bright App is showing good data. I get standing charge and rate figures in Home Assistant but usage is showing unknown. This is for both gas and electricity.

gcoan commented 10 months ago

There is a fault with the integration not recognising the change to British Summer Time correctly. There's a fix in #331 that hasn't been merged into the core, and there's detailed instructions in #337 on how to manually install a corrected sensor.py file. Having followed these I am now getting DCC sourced energy usage and cost into HA. Comparing the kW import data to the same that I get from my battery inverter, the DCC data is very very similar, sometimes a touch higher, sometimes a touch lower BUT the DCC data is badly lagged and nowhere near as granular. Sometimes is 30 minutes delayed, sometimes its 3 hours delayed. TBH this delay in the data makes the integration fairly useless as its so behind reality. At least it gives me confidence in being able to use my inverter import data

ardarluk commented 10 months ago

Thanks for that. I had tried calling the API directly and had realised that it was returning two values not the one that was expected. I hadn’t realised it was providing one value for the last hour of the previous day and then the current day separately. Makes sense now and the new code summing the two values should work.

On the DCC, my understanding is the best we will get is data being pulled every 30 min for electricity. For gas it seems more like 3 or 4 times a day.

The value for me is getting the gas data into Home Assistant so I can have the complete view over time on the energy dashboard.

For electricity I am getting the inverter data every 15 seconds from the Solax-modus integration.

timrwhite87 commented 5 months ago

Followed #337 fix, got a couple more updates more regularly, but still seeing big holes in the data coming through sadly.

dowling-john commented 5 months ago

I am seeing the same as @timrwhite87 getting some data but not all

gcoan commented 5 months ago

Unfortunately the integration can only share what’s available at the DCC.

For me I didn’t get gaps but the delays made the integration of limuted use. I was able to see that my DCC readings were close enough to my inverters import and export readings so I’m using that and uninstalled the DCC integration. I’ve also subsequently got an octopus mini so that gives real time data if I needed it, but I’m happy enough with the inverter data

On 25 Jan 2024, at 08:11, John Dowling @.***> wrote:

 I am seeing the same as @timrwhite87 getting some data but not all

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.