bosch-thermostat / home-assistant-bosch-custom-component

HA custom component for Bosch thermostats
Apache License 2.0
206 stars 44 forks source link

energy sensors stopped working on TC100 after update #315

Closed ronnymees closed 10 months ago

ronnymees commented 12 months ago

After an update of HA core to 2023.7.3 and bosch-thermostat to latest version everything works except the energy sensors give the reading 'unknown'.

image

The new API is selected as the documentation states:

image

But no luck on getting the energy sensors readings...

Before the update everything was working fine.

I have tried to run the bosch.debug.scan but I get an error.

rameister commented 12 months ago

@pszafer I hope it helps a little bit then in July 2023 the API has changed many things: https://github.com/BoschSmartHome/bosch-shc-api-docs/blob/master/CHANGELOG.md I found this with api connection to openHAB.

ronnymees commented 11 months ago

In the update of the Logamatic TC100 firmware of june 2023 it is stated that the energy monitoring is changed. Possibly something must be altered to read the energy sensors correctly from the response of the Bosch API. If someone could give me the correct way to approch the API from Postman I could read out the response for my situation and post it here to give more information...

xNookie commented 11 months ago

I am facing the same issue with my CT200 Both sensors showing the status "unknown"

image

the problem also exists with a new HA installation + v0.23.2 + CT200 04.02.00

busaku commented 11 months ago

Same with RC300

xNookie commented 11 months ago

@pszafer please let us know if we can assist in any way to resolve this. It would be great if we could find a solution for this.

pszafer commented 11 months ago

Collect debug logs from at least a few days, only from my integration and bosch library. The most important are between 11pm - 3am. Maybe I could find with that data what's wrong...

ronnymees commented 11 months ago

Maybe this part of my log can help. IP-adresses blanked out.

HA-bosh-debug.log

xNookie commented 11 months ago

@pszafer sorry for my late reply.

I have collected the debugs for a few days. I have tested this behavior on a fresh HA test environment. I am not very familiar in this topic, but the logs also show that the attributes eCH & eHW cannot be read.

2023-08-16 01:55:22.026 DEBUG (MainThread) [custom_components.bosch] Updating component 1-hour Sensor by 139933398317264 2023-08-16 01:55:22.027 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/historyEntries by 139933439092752 2023-08-16 01:55:22.097 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/historyEntries: {"id": "/energy/historyEntries", "type": "floatValue", "writeable": 0, "recordable": 0, "value": 344.0, "used": "true", "available": "true", "unitOfMeasure": "", "minValue": 0.0, "maxValue": 6400.0, "stepSize": 1.0} 2023-08-16 01:55:22.097 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/history?entry=342 by 139933439092752 2023-08-16 01:55:22.199 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/history?entry=342: {"id": "/energy/history", "type": "energyRecordings", "writeable": 0, "recordable": 0, "used": "true", "available": "true", "value": [{"d": "14-08-2023", "T": 20.5, "gCh": 0.0, "gHw": 1.56}, {"d": "15-08-2023", "T": 22.2, "gCh": 0.0, "gHw": 1.5}]} 2023-08-16 01:55:22.200 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/history?entry=343 by 139933439092752 2023-08-16 01:55:22.270 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/history?entry=343: {"id": "/energy/history", "type": "energyRecordings", "writeable": 0, "recordable": 0, "used": "true", "available": "true", "value": [{"d": "15-08-2023", "T": 22.2, "gCh": 0.0, "gHw": 1.5}]} 2023-08-16 01:55:22.271 DEBUG (MainThread) [custom_components.bosch] Updating component 1-hour Sensor by 139933398317264 2023-08-16 01:55:22.271 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/historyEntries by 139933439092752 2023-08-16 01:55:22.336 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/historyEntries: {"id": "/energy/historyEntries", "type": "floatValue", "writeable": 0, "recordable": 0, "value": 344.0, "used": "true", "available": "true", "unitOfMeasure": "", "minValue": 0.0, "maxValue": 6400.0, "stepSize": 1.0} 2023-08-16 01:55:22.336 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/history?entry=342 by 139933439092752 2023-08-16 01:55:22.404 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/history?entry=342: {"id": "/energy/history", "type": "energyRecordings", "writeable": 0, "recordable": 0, "used": "true", "available": "true", "value": [{"d": "14-08-2023", "T": 20.5, "gCh": 0.0, "gHw": 1.56}, {"d": "15-08-2023", "T": 22.2, "gCh": 0.0, "gHw": 1.5}]} 2023-08-16 01:55:22.404 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/history?entry=343 by 139933439092752 2023-08-16 01:55:22.480 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/history?entry=343: {"id": "/energy/history", "type": "energyRecordings", "writeable": 0, "recordable": 0, "used": "true", "available": "true", "value": [{"d": "15-08-2023", "T": 22.2, "gCh": 0.0, "gHw": 1.5}]} 2023-08-16 01:55:22.480 DEBUG (MainThread) [custom_components.bosch] Next update of 1-hour sensors scheduled at: 2023-08-16 02:06:00+02:00 2023-08-16 01:55:22.481 DEBUG (MainThread) [custom_components.bosch] Bosch 1-hour entitites updated. 2023-08-16 01:55:22.482 DEBUG (MainThread) [custom_components.bosch.sensor.energy] Reading attribute not available eCH 2023-08-16 01:55:22.482 DEBUG (MainThread) [custom_components.bosch.sensor.energy] Reading attribute not available eHW

home-assistant_bosch_2023-08-18T21-17-47.565Z.zip

rameister commented 11 months ago

@pszafer Hi Pawel, can Bosch anything do to solve this Issue? Or the hole community of HomeAssistant. It is sad to see that a good integration is lost. Greetings.

pszafer commented 10 months ago

I'm working on fix of this issue. I can't you give an ETA as I have too much work right now, but I'll try to push update within a week

mcervar commented 10 months ago

Hi maybe this also help, I am running newest HA with HA OS, Bosch thermostat newest version, CT200 device

When trigering:

service: bosch.fetch_recordings_sensor_range data: uuid: "101202170" day: "2023-08-29" statistic_id: sensor.energy_hot_water

I get this in the logs:

2023-08-30 10:24:13.462 DEBUG (MainThread) [custom_components.bosch.services] Performing sensor update on service request. UUID: 101202170 2023-08-30 10:24:13.462 DEBUG (MainThread) [custom_components.bosch] Updating component 1-hour Sensor by 140361792640848 2023-08-30 10:24:13.463 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/historyEntries by 140361809309520 2023-08-30 10:24:13.553 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/historyEntries: {"id": "/energy/historyEntries", "type": "floatValue", "writeable": 0, "recordable": 0, "value": 727.0, "used": "true", "available": "true", "unitOfMeasure": "", "minValue": 0.0, "maxValue": 6400.0, "stepSize": 1.0} 2023-08-30 10:24:13.553 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/history?entry=725 by 140361809309520 2023-08-30 10:24:13.663 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/history?entry=725: {"id": "/energy/history", "type": "energyRecordings", "writeable": 0, "recordable": 0, "used": "true", "available": "true", "value": [{"d": "28-08-2023", "T": 23.8, "gCh": 0.0, "gHw": 2.2}, {"d": "29-08-2023", "T": 20.1, "gCh": 0.0, "gHw": 2.8}]} 2023-08-30 10:24:13.663 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/history?entry=726 by 140361809309520 2023-08-30 10:24:13.750 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/history?entry=726: {"id": "/energy/history", "type": "energyRecordings", "writeable": 0, "recordable": 0, "used": "true", "available": "true", "value": [{"d": "29-08-2023", "T": 20.1, "gCh": 0.0, "gHw": 2.8}]} 2023-08-30 10:24:13.751 DEBUG (MainThread) [custom_components.bosch] Updating component 1-hour Sensor by 140361792640848 2023-08-30 10:24:13.751 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/historyEntries by 140361809309520 2023-08-30 10:24:13.842 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/historyEntries: {"id": "/energy/historyEntries", "type": "floatValue", "writeable": 0, "recordable": 0, "value": 727.0, "used": "true", "available": "true", "unitOfMeasure": "", "minValue": 0.0, "maxValue": 6400.0, "stepSize": 1.0} 2023-08-30 10:24:13.842 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/history?entry=725 by 140361809309520 2023-08-30 10:24:13.942 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/history?entry=725: {"id": "/energy/history", "type": "energyRecordings", "writeable": 0, "recordable": 0, "used": "true", "available": "true", "value": [{"d": "28-08-2023", "T": 23.8, "gCh": 0.0, "gHw": 2.2}, {"d": "29-08-2023", "T": 20.1, "gCh": 0.0, "gHw": 2.8}]} 2023-08-30 10:24:13.942 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Sending GET request to /energy/history?entry=726 by 140361809309520 2023-08-30 10:24:14.031 DEBUG (MainThread) [bosch_thermostat_client.connectors.xmpp] Response to GET request /energy/history?entry=726: {"id": "/energy/history", "type": "energyRecordings", "writeable": 0, "recordable": 0, "used": "true", "available": "true", "value": [{"d": "29-08-2023", "T": 20.1, "gCh": 0.0, "gHw": 2.8}]} 2023-08-30 10:24:14.032 DEBUG (MainThread) [custom_components.bosch] Next update of 1-hour sensors scheduled at: 2023-08-30 11:06:00+02:00 2023-08-30 10:24:14.032 DEBUG (MainThread) [custom_components.bosch] Bosch 1-hour entitites updated. 2023-08-30 10:24:14.032 DEBUG (MainThread) [custom_components.bosch.sensor.energy] Reading attribute not available eCH 2023-08-30 10:24:14.032 DEBUG (MainThread) [custom_components.bosch.sensor.energy] Reading attribute not available eHW

so from what I can see here, data is really read from Bosch but not stored in HA properly, maybe problem with reading JSON or something

pszafer commented 10 months ago

Please check out https://github.com/bosch-thermostat/home-assistant-bosch-custom-component/releases/tag/v0.23.3 I will reopen if problem'd still occur.

rameister commented 10 months ago

@pszafer Hello Pawel, Sorry with my HA Installation it shows that is still not working. When I ask the energy sensor the value is -17 kWh. You told that the sensor is working well but my energy dashboard shows nothing. When I Try to update the statisik Data e.g. from yesterday then it shows my correct value like my iPhone App. This say all data are present but not in the energy dashboard. Please reopen this issue and show me a way to fix it. Kind regards Ralf.

ronnymees commented 10 months ago

Hello Pawel, same problem here. New API is enabled image Sensor reading is -17 (is normal acording to the API documentation) image When adding the gas source I have these options: image I selected the highlighted one. But in the Energy dashboard the readings are zero: image image Please reopen this issue.

MG-Sky commented 10 months ago

i've had same problem, the solution to me was to play with energy:entity as i had in total 6 different. but finally i have found the correct onemy problem 1. i had duplicated sensors (-17) the new have been disabled so i enabled and removed old then renamed to match old names2. in statistics you have _2... which is probably new one3. i have run service to update this stat. (i provided a date -4 months from now as this service can update in bulk for a past data).5. now i have missing data and yesterday's data ( energy: without 2)6. new energy stats called stats .... in energy dashboard.

pszafer commented 10 months ago

With the newest version statistics name should start with "Stats ...", you still got energy central heating, so it means you probably have old version.

xNookie commented 10 months ago

With the newest version statistics name should start with "Stats ...", you still got energy central heating, so it means you probably have old version.

thanks for your quick reply.

I can confirm that it works after adding both "stats" sources to the dashboard. image image

It also synced my consumption for the last few months image

thank you very much for your quick help!

rameister commented 10 months ago

Good morning gents. Yes with Stats.... names all my values shown with the same values as in my Buderus App on iPhone. So for me it is working and you can close this issue. By the way: You (Pawel) has not commented about this new item Stats... ? Kind regards Ralf and have a nice day. Thanks for your work!

pszafer commented 10 months ago

@rameister it's no new item. Before it was energy hot water. No one gives me full, useful logs, mostly screenshot, so I decided to rename those items, so I can see if people are reporting issues based on new version.

mcervar commented 10 months ago

I can also confirm it works now on CT200, what I did:

  1. Removed Bosch integration
  2. Removed Bosch integration from HACS
  3. Restarted HA
  4. Added Bosch integration to HACS
  5. Installed the integration
  6. Enabled New API statistics
  7. Enabled energy sensors
  8. Restarted HA again Then went to Energy dashboard and for gas consumption added Stats for hot water and central heating

Thx a lot!

ronnymees commented 10 months ago

I also can confirm it's working now, you can close the issue. Many thanks for all your work en effort!

busaku commented 10 months ago

i cannot confirm (RC300). CHPower still unknown

DHW working again (thank you <3)

But maybe i just currently have no data there (CH is off)

pszafer commented 10 months ago

CHPower will be available as soon as there is data in it.