home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.15k stars 31.12k forks source link

Sensors are not getting updated after some time #104870

Closed gtfr closed 8 months ago

gtfr commented 1 year ago

The problem

After some time (< 24h) from HA reset/Bosch SHC integration reload, the sensors in Bosch SHC do not receive updates anymore. Their status in HA remains unchanged, while in the Bosch Smart Home App updated values are shown. In my set up I observe this this for door contacts' and wall thermostats' sensor values.

Control of smart plugs, covers, light switch is possible but their status is in the error case also not updated in HA.

Reloading the Bosch SHC integration heals the problem for again some time.

What version of Home Assistant Core has the issue?

core-2023.11.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

bosch_shc

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bosch_shc

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-12-10 13:53:07.553 DEBUG (SHCPollingThread) [boschshcpy] Long poll: {'rootDeviceId': '64-da-a0-12-6d-83', '@type': 'device', 'supportedProfiles': [], 'profile': 'REGULAR_WINDOW', 'deviceServiceIds': ['CommunicationQuality', 'ShutterContact', 'BatteryLevel', 'Bypass'], 'roomId': 'hz_5', 'manufacturer': 'BOSCH', 'serial': '18FC26000000801E', 'name': 'Fenster Kinderzimmer A', 'deviceModel': 'SWD2', 'id': 'hdm:ZigBee:18fc26000000801e', 'childDeviceIds': [], 'status': 'UNDEFINED'}
2023-12-10 13:53:07.753 DEBUG (SHCPollingThread) [boschshcpy] Long poll: {'rootDeviceId': '64-da-a0-12-6d-83', '@type': 'device', 'supportedProfiles': [], 'profile': 'REGULAR_WINDOW', 'deviceServiceIds': ['CommunicationQuality', 'ShutterContact', 'BatteryLevel', 'Bypass'], 'roomId': 'hz_5', 'manufacturer': 'BOSCH', 'serial': '18FC26000000801E', 'name': 'Fenster Kinderzimmer A', 'deviceModel': 'SWD2', 'id': 'hdm:ZigBee:18fc26000000801e', 'childDeviceIds': [], 'status': 'AVAILABLE'}
2023-12-10 13:53:07.813 DEBUG (SHCPollingThread) [boschshcpy] Long poll: {'path': '/devices/hdm:ZigBee:18fc26000000801e/services/Bypass', '@type': 'DeviceServiceData', 'id': 'Bypass', 'state': {'configuration': {'infinite': False, 'enabled': True, 'timeout': 5}, '@type': 'bypassState', 'state': 'BYPASS_INACTIVE'}, 'deviceId': 'hdm:ZigBee:18fc26000000801e'}
2023-12-10 13:53:07.823 INFO (SHCPollingThread) [boschshcpy] Stopping polling thread after expected runtime error.
2023-12-10 13:53:07.824 INFO (SHCPollingThread) [boschshcpy] Error description: maximum recursion depth exceeded. ('maximum recursion depth exceeded',)
2023-12-10 13:53:07.824 INFO (SHCPollingThread) [boschshcpy] Attempting unsubscribe...
2023-12-10 13:53:07.909 DEBUG (SHCPollingThread) [boschshcpy] Unsubscribed from long poll w/ poll id fam929m86-40

Additional information

I am observing this, since my Bosch Smart Home Controller (version 1.1) is updated to Software Version 10.18.3249-29469.

home-assistant[bot] commented 1 year ago

Hey there @tschamm, mind taking a look at this issue as it has been labeled with an integration (bosch_shc) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `bosch_shc` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign bosch_shc` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


bosch_shc documentation bosch_shc source (message by IssueLinks)

gtfr commented 11 months ago

Above problem is still seen after updating to Core 2023.12.1

Meanwhile, I enabled debug logs and found this:

2023-12-10 13:53:07.553 DEBUG (SHCPollingThread) [boschshcpy] Long poll: {'rootDeviceId': '64-da-a0-12-6d-83', '@type': 'device', 'supportedProfiles': [], 'profile': 'REGULAR_WINDOW', 'deviceServiceIds': ['CommunicationQuality', 'ShutterContact', 'BatteryLevel', 'Bypass'], 'roomId': 'hz_5', 'manufacturer': 'BOSCH', 'serial': '18FC26000000801E', 'name': 'Fenster Kinderzimmer A', 'deviceModel': 'SWD2', 'id': 'hdm:ZigBee:18fc26000000801e', 'childDeviceIds': [], 'status': 'UNDEFINED'}
2023-12-10 13:53:07.753 DEBUG (SHCPollingThread) [boschshcpy] Long poll: {'rootDeviceId': '64-da-a0-12-6d-83', '@type': 'device', 'supportedProfiles': [], 'profile': 'REGULAR_WINDOW', 'deviceServiceIds': ['CommunicationQuality', 'ShutterContact', 'BatteryLevel', 'Bypass'], 'roomId': 'hz_5', 'manufacturer': 'BOSCH', 'serial': '18FC26000000801E', 'name': 'Fenster Kinderzimmer A', 'deviceModel': 'SWD2', 'id': 'hdm:ZigBee:18fc26000000801e', 'childDeviceIds': [], 'status': 'AVAILABLE'}
2023-12-10 13:53:07.813 DEBUG (SHCPollingThread) [boschshcpy] Long poll: {'path': '/devices/hdm:ZigBee:18fc26000000801e/services/Bypass', '@type': 'DeviceServiceData', 'id': 'Bypass', 'state': {'configuration': {'infinite': False, 'enabled': True, 'timeout': 5}, '@type': 'bypassState', 'state': 'BYPASS_INACTIVE'}, 'deviceId': 'hdm:ZigBee:18fc26000000801e'}
2023-12-10 13:53:07.823 INFO (SHCPollingThread) [boschshcpy] Stopping polling thread after expected runtime error.
2023-12-10 13:53:07.824 INFO (SHCPollingThread) [boschshcpy] Error description: maximum recursion depth exceeded. ('maximum recursion depth exceeded',)
2023-12-10 13:53:07.824 INFO (SHCPollingThread) [boschshcpy] Attempting unsubscribe...
2023-12-10 13:53:07.909 DEBUG (SHCPollingThread) [boschshcpy] Unsubscribed from long poll w/ poll id fam929m86-40

Timestamp and device ID match to communication problems with one of my window contacts. I will temporary disable this particular device and see what is happening!

gtfr commented 11 months ago

Helllo @tschamm,

I observed this problem first end of November. My first thought was, it was caused by my Bosch Controller SW Update. But going through your code, I found this commit: https://github.com/tschamm/boschshcpy/commit/90303010fa76d1c31f8d8128b12ae29df1350677

This commit went into boschshcpy version 0.2.75, which in fact went in core-2023.11.3 released on the 22nd of November. I potentially updated both Home Assistant and Bosch Smart Home Controller at around this time.

Can you please check if above error coud be caused by this commit?

Many thanks in advance for your support!

anthraxn8b commented 11 months ago

Hello @tschamm ! Same problem here.

tschamm commented 11 months ago

Will provide an update for latest boschshcpy. Let’s see if that fixes that problem.

gtfr commented 11 months ago

Hello @tschamm,

any chance you can update boschshcpy for the next release?

I tried to disable the causing device in HA, but I still see the problem. It is quite annoying to reload the integration multiple times a day :-(.

Many thanks in advance for your support!

ctron commented 11 months ago

I seem to have the same issue.

SvenHogenmueller commented 11 months ago

Same problem with 2023.12.3

issue-triage-workflows[bot] commented 8 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

ctron commented 8 months ago

For me this seems to work again.

joostlek commented 8 months ago

I'll close this issue then