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

HA custom component for Bosch thermostats
Apache License 2.0
234 stars 45 forks source link

Contact between thermostat and home assistant seems to get lost #454

Open krisgeusens opened 2 days ago

krisgeusens commented 2 days ago

Describe the bug The connection/reporting between the thermostat and home assistant seenms to break.

To Reproduce Steps to reproduce the behavior: It happens daily, not on the same time. Restarting the integration solves the problem until next day. The entities don't show unavailable, but no new values come in and no settings can be changed.

Expected behavior that it keeps working withour restart.

Screenshots If applicable, add screenshots to help explain your problem.

Version

Debug SCAN IMPORTANT Go to Developer tools in Home Assistant, choose Service tab and choose bosch.debug_scan Download file to your computer and upload it somewhere eg. https://jsonblob.com/ There is not such tab in my home assistant/developer tools

Additional context Add any other context about the problem here.

JBakers commented 2 days ago

Core 2024.11.1 Supervisor 2024.11.2 Operating System 13.2 Frontend 20241106.2

Same here. Today my sensors stopped updating at 11, no logs arround that time, but an hour later this showed in my log:

Deze fout is ontstaan door een aangepaste integratie.

Logger: homeassistant
Bron: custom_components/bosch/__init__.py:360
integratie: Bosch thermostat (documentatie, problemen)
Eerst voorgekomen: 12:06:22 (1 gebeurtenissen)
Laatst gelogd: 12:06:22

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/bosch_thermostat_client/sensors/energy.py", line 158, in update
    result = await self._connector.get(self.build_uri(page_number=i))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bosch_thermostat_client/connectors/xmpp.py", line 131, in get
    raise DeviceException(f"Error requesting data from {path}")
bosch_thermostat_client.exceptions.DeviceException: Error requesting data from /energy/history?entry=779

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/bosch/__init__.py", line 360, in recording_sensors_update
    await entity.bosch_object.update(time=now)
  File "/usr/local/lib/python3.12/site-packages/bosch_thermostat_client/sensors/energy.py", line 162, in update
    f"Can't update data for {self.name}. Trying uri: {self._data[URI]}. Error message: {err}"
                                                      ~~~~~~~~~~^^^^^
KeyError: 'uri'

For now I made an automation that triggers the integration reload when the temp hasnt changed for 2 hours. (and also sends a notification so I can keep track how many times its fired)

alias: Bosch Integratie 2 uur geen verandering
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.woonkamer_temperatuur
    for:
      hours: 2
      minutes: 0
      seconds: 0
conditions: []
actions:
  - device_id: REDACTED
    domain: mobile_app
    type: notify
    message: Bosch Thermostaat integratie offline?
    title: al 2 uur geen verandering temperatuur
  - action: homeassistant.reload_config_entry
    metadata: {}
    data: {}
    target:
      entity_id: climate.woonkamer
mode: single
mmakaay commented 2 days ago

Same here. Yesterday, I also noticed that the EasyControl app on my iPhone was very sluggish, and I found some references by Bosch about server maintenance.

One thing I wondered about, is if the issue could have something to do with recovering from a connection loss / timeout while talking to the Bosch systems. What strengthens this idea, is that restarting Home Assistant or the integration brings back the functionality right away.

I just started writing an automation for handling an integration reload, but @JBakers beat me to it. Thanks for the example! 👍

JackPoint commented 2 days ago

There is maintenance since yesterday, it's listed on this (Dutch) website: https://www.nefit-bosch.nl/consument/na-je-aankoop/actuele-meldingen

12 november 2024 - In verband met werkzaamheden aan de server is het mogelijk dat de thermostaat tijdelijk geen verbinding maakt met het internet. Gebruikers kunnen hiervan hinder ondervinden bij het bedienen van de thermostaat via de app. Probeer het in dit geval later nog eens. Je kunt de thermostaat uiteraard altijd handmatig bedienen. De verwarming blijft gewoon werken - ook als er tijdelijk geen internetverbinding is. Onze excuses voor het eventuele ongemak.

It's a bit confusing since the app did show a notification about maintenance but that one shows the maintenance is on 15 november

mmakaay commented 2 days ago

Yes, the information is a bit scattered. For those not too well-versed in Dutch, the Bosch site tells us:

November 12th - due to server maintenance, it is possible that the thermostat temporarily cannot connect to the internet. Users can experience issues when controlling the thermostat using the app. In such case, try again later. Of course, it is always possible to control the thermostat manually. The heating will remain operational - also while the internet connection fails. Our apologies for the inconvenience.

gawsneakerz commented 2 days ago

There is maintenance since yesterday, it's listed on this (Dutch) website: https://www.nefit-bosch.nl/consument/na-je-aankoop/actuele-meldingen

12 november 2024 - In verband met werkzaamheden aan de server is het mogelijk dat de thermostaat tijdelijk geen verbinding maakt met het internet. Gebruikers kunnen hiervan hinder ondervinden bij het bedienen van de thermostaat via de app. Probeer het in dit geval later nog eens. Je kunt de thermostaat uiteraard altijd handmatig bedienen. De verwarming blijft gewoon werken - ook als er tijdelijk geen internetverbinding is. Onze excuses voor het eventuele ongemak.

It's a bit confusing since the app did show a notification about maintenance but that one shows the maintenance is on 15 november

Thanks, makes sense now, integration was working fine for the last month. Since this week having issues...

Petkay2059 commented 2 days ago

Here same problem. Bosch thermostat sensors are totally lost in HA since this afternoon. Hope someone finds a fix for this problem. Thermostat was pused a firmware update 05.02.00 after Bosch server maintenance.

JBakers commented 2 days ago

05.02.00 has been out since june or so. That's not part of the problem. It's probably the server maintenance.

Petkay2059 commented 2 days ago

Ok, final workaround would be installing EMS bus Gateway device to the Bosch Nefit boiler. It sends all the data directy to HA using MQTT. No need of the server of Bosch.

mkruseonline commented 18 hours ago

Seems to work again after a restart of KMS and reload Integration

Petkay2059 commented 16 hours ago

Restart KMS? You have to help me here, i'm a newbee. I've restarted HA and reloaded the integration, no luck for me.

mkruseonline commented 16 hours ago

Wrong naming, km200 - the Internet gateway in the heater (I have a Buderus)

Petkay2059 commented 15 hours ago

I'm having a Bosch Nefit heater/boiler Reatarting the Easy Control thermostat did not solve the problem perhaps restarting the heater/boiler?

mkruseonline commented 15 hours ago

Maybe.

mqatgit commented 14 hours ago

Wrong naming, km200 - the Internet gateway in the heater (I have a Buderus)

How do we do that - restart the gateway thingy? Mine is a MX300 Connect-Key, and it seems to have similar troubles. But the Bosch app sees it fine, locally. No cloud connecting involved, I believe.

mkruseonline commented 14 hours ago

At Buderus Heater I can simply plug out the Bus connection cable. The the Gateway has no power and restarts

krisgeusens commented 14 hours ago

my Buderus app now says 'maintenance on 17th. I will wait until that is over before taking any other action.

mqatgit commented 14 hours ago

At Buderus Heater I can simply plug out the Bus connection cable. The the Gateway has no power and restarts

Okay, thanks. Different device, it seems, but I'll try something similar...

mqatgit commented 11 hours ago

Didn't work...