Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When turning on Heating whole HA freezes #1511

Open
destywald opened this issue Dec 8, 2024 · 17 comments
Open

When turning on Heating whole HA freezes #1511

destywald opened this issue Dec 8, 2024 · 17 comments
Assignees
Labels

Comments

@destywald
Copy link

Prerequisites

  • HA Core 2024.12.1
  • HA Supervisor 2024.11.4
  • Device Eve Thermo radiator thermostat with firmware 2.1.3 via official HomeKit Device integration

Description

I am running the Better Thermostat version 1.6.1 for a month or two now and I am experiencing some strange behaviour with it. When the HVAC mode is set to off and I turn it to "heating" mode, the whole HA freezes and is not responding anymore until I perform a force shutdown with holding a power button on my Pi.

This thing happens randomly, sometimes it does, sometimes it does not. I am using the Better Thermostat only on my dashboard, without any automation.

I checked the logs via Log Viewer addon, but there are no records regarding this issue? I am a bit new to the whole HA thing, so where could the other logs be?

In the logbook of Better Thermostat device is see the event:
Living Room Better Thermo changed to Heat triggered by action Climate: Set HVAC mode

Eve Thermo event:
Living Room Thermostat changed to Heat

After this, the whole HA freezes.

What could be wrong?

@destywald destywald added the new bug incoming bug issue label Dec 8, 2024
@alex-murashko
Copy link

I can confirm that after update to 2024.12, changing setpoint in the better thermostat frequently leads to freeze HA for 10 minutes.

@destywald
Copy link
Author

I’ve also had issues on previous versions, but on 2024.12 it happens just more often than before.

@miwa4711
Copy link

Same here.....

@vdiogo
Copy link

vdiogo commented Dec 13, 2024

Experienced the same today: had to reboot HA (lxc on proxmox)

@folfy
Copy link
Collaborator

folfy commented Dec 17, 2024

Are you all on v1.6.1 of BT? Or are you all using Eve valves? Can someone enable debug logging of BT and then try to reproduce the issue, and/or send the homeasistant log (either remove personal information, or send it in PM)?

For me it has been working fine with v1.6.1 and 2024.12, so the diagnostic data from the integration page would be needed at least.

@folfy
Copy link
Collaborator

folfy commented Dec 19, 2024

You should enable debug logging for the integration, and then once the issue occurs again, either upload these logs (waiting till HA unfreezes again), or provide the HA logfile (in case it doesn't unfreez, so you can't download BT diagnostics only through the WebUI). Without any more logs, it's not possible to analyze or reproduce the issue unfortunately.

@Anis2020VMW
Copy link

i have the same issue. i think that the pb is the UI card better. When we try to change value

@Anis2020VMW
Copy link

this is the error:
IMG_6484

@folfy
Copy link
Collaborator

folfy commented Dec 29, 2024

You should enable debug logging for the integration](https://www.home-assistant.io/docs/configuration/troubleshooting/#debug-logs-and-diagnostics), and then once the issue occurs again, either upload these logs (waiting till HA unfreezes again), or provide the HA logfile (in case it doesn't unfreez, so you can't download BT diagnostics only through the WebUI). Without any more logs, it's not possible to analyze or reproduce the issue unfortunately.

@Anis2020VMW This

@Anis2020VMW
Copy link

ok i will so it thank you.
Do you know if we can do some thing like proximity with BT? like this video, but in BT GUI
https://www.youtube.com/watch?v=0ojMz1s3Y84

@folfy
Copy link
Collaborator

folfy commented Dec 29, 2024

@Anis2020VMW this is unrelated to this isssue, please use the discussions board for this.
Ofc you can create HA automations changing the BT target temperature or idk what you'd wanna do, based on proximity or any other trigger condition available in HA. This works like with any other thermostat in HA, and is completly unrelated to BT as an intergration.

@MrMojoR
Copy link

MrMojoR commented Jan 7, 2025

I manage to capture the issue, it can happen multiple times a day, I have 5 zigbee thermostatic valves, here are the logs:

ellows.ash.NcpFailure: NcpResetCode.ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT2025-01-06 23:55:27.689 ERROR (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: ERROR controlling: climate.nappali_trv_2_thermostatTraceback (most recent call last):  File "/config/custom_components/better_thermostat/utils/controlling.py", line 53, in control_queue    _temp = await control_trv(self, trv)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/config/custom_components/better_thermostat/utils/controlling.py", line 277, in control_trv    await set_temperature(self, heater_entity_id, _temperature)  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 77, in set_temperature    return await self.real_trvs[entity_id]["adapter"].set_temperature(           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^        self, entity_id, temperature        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^    )    ^  File "/config/custom_components/better_thermostat/adapters/generic.py", line 111, in set_temperature    await self.hass.services.async_call(    ...<5 lines>...    )  File "/usr/local/lib/python3.13/site-packages/homeassistant/core.py", line 2802, in async_call    response_data = await coro                    ^^^^^^^^^^  File "/usr/local/lib/python3.13/site-packages/homeassistant/core.py", line 2845, in _execute_service    return await target(service_call)           ^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.13/site-packages/homeassistant/helpers/service.py", line 1007, in entity_service_call    single_response = await _handle_entity_call(                      ^^^^^^^^^^^^^^^^^^^^^^^^^^        hass, entity, func, data, call.context        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    )    ^  File "/usr/local/lib/python3.13/site-packages/homeassistant/helpers/service.py", line 1079, in _handle_entity_call    result = await task             ^^^^^^^^^^  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/climate/__init__.py", line 1084, in async_service_temperature_set    await entity.async_set_temperature(**kwargs)  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/zha/helpers.py", line 1335, in handler    return await func(self, *args, **kwargs)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.13/site-packages/homeassistant/components/zha/climate.py", line 230, in async_set_temperature    await self.entity_data.entity.async_set_temperature(    ...<4 lines>...    )  File "/usr/local/lib/python3.13/site-packages/zha/application/platforms/climate/__init__.py", line 462, in async_set_temperature    await self._thermostat_cluster_handler.async_set_heating_setpoint(    ...<2 lines>...    )  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/cluster_handlers/hvac.py", line 286, in async_set_heating_setpoint    await self.write_attributes_safe({attr: temperature})  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/cluster_handlers/__init__.py", line 614, in write_attributes_safe    res = await self.write_attributes(attributes, manufacturer=manufacturer)          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.13/site-packages/zha/zigbee/cluster_handlers/__init__.py", line 85, in wrapper    return await RETRYABLE_REQUEST_DECORATOR(func)(*args, **kwargs)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.13/site-packages/zigpy/util.py", line 136, in retry    return await func()           ^^^^^^^^^^^^  File "/usr/local/lib/python3.13/site-packages/zhaquirks/tuya/__init__.py", line 743, in write_attributes    await self.endpoint.tuya_manufacturer.write_attributes(        manufacturer_attrs, manufacturer=manufacturer    )  File "/usr/local/lib/python3.13/site-packages/zhaquirks/tuya/__init__.py", line 521, in write_attributes    await super().command(    ...<5 lines>...    )  File "/usr/local/lib/python3.13/site-packages/zigpy/quirks/__init__.py", line 263, in command    return await self.request(           ^^^^^^^^^^^^^^^^^^^    ...<8 lines>...    )    ^  File "/usr/local/lib/python3.13/site-packages/zigpy/zcl/__init__.py", line 375, in request    return await self._endpoint.request(           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    ...<9 lines>...    )    ^  File "/usr/local/lib/python3.13/site-packages/zigpy/endpoint.py", line 270, in request    return await self.device.request(           ^^^^^^^^^^^^^^^^^^^^^^^^^^    ...<11 lines>...    )    ^  File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 373, in request    await send_request()  File "/usr/local/lib/python3.13/site-packages/zigpy/application.py", line 835, in request    await self.send_packet(    ...<14 lines>...    )  File "/usr/local/lib/python3.13/site-packages/bellows/zigbee/application.py", line 789, in send_packet    status, _ = await self._ezsp.send_unicast(                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^    ...<4 lines>...    )    ^  File "/usr/local/lib/python3.13/site-packages/bellows/ezsp/v4/__init__.py", line 137, in send_unicast    status, sequence = await self.sendUnicast(                       ^^^^^^^^^^^^^^^^^^^^^^^    ...<5 lines>...    )    ^  File "/usr/local/lib/python3.13/site-packages/bellows/ezsp/protocol.py", line 126, in command    await self._gw.send_data(data)  File "/usr/local/lib/python3.13/site-packages/bellows/uart.py", line 31, in send_data await self._transport.send_data(data)  File "/usr/local/lib/python3.13/site-packages/bellows/ash.py", line 708, in send_data await asyncio.shield(    ...<6 lines>...    )

@folfy
Copy link
Collaborator

folfy commented Jan 7, 2025

@MrMojoR So your ZigBee network failed to deliver the change command. From BT side, we call the actual HASS function async and await the result, so it shouldn't be us blocking anything/causing the freeze, but actually the command for changing your TRV setpoint itself. Or you catched a red herring and and this isn't what's blocking your HA instance, but again it's hard to diagnose without full logs.

@folfy
Copy link
Collaborator

folfy commented Jan 9, 2025

If you need more help, additional data would be needed for analysis, or we will have to close this issue. Your problem quite likely could be unrelated or at least outside of BT. From that one line I just can say, that's not something that would make BT cause a HA freeze...

diagnostic data
IMPORTANT:
Download and paste the diagnostic data from your Better Thermostat Entity(s) below. (not working in v1.6.1 and v1.7.0b1 - please update)
https://www.home-assistant.io/docs/configuration/troubleshooting/#download-diagnostics

debug log
Depending on how complicated you issue is, it might be necessary to enable debug logging for BT,
reproduce the issue, and then upload this logfile here.
https://www.home-assistant.io/docs/configuration/troubleshooting/#enabling-debug-logging

Current base-issue: #1532

@folfy folfy assigned folfy and unassigned KartoffelToby Jan 9, 2025
@alex-murashko
Copy link

alex-murashko commented Jan 9, 2025

I re-enabled this integration, enabled debug and tried.
After changing temperature it's hangs for 15 minutes and homeassistant restarted after that.
It generated approx. 250Mb of log file. 99% of log file repeating the same log messages. So I've attached the first part (just after changing temperature) and end of file with few final messages ( just before reboot).

after-start.log
.......
end-of-log.log

please let me know if you need more information

@folfy
Copy link
Collaborator

folfy commented Jan 9, 2025

@alex-murashko Okay, that's something totally different, so BT seems to be stuck in a loop. Could you also provide the diagnositic data (see my last comment, works in v1.7.0b2)? Actually BT shouldn't even try to set the temperature to 33°C, if the max. is really defined as 30°C. On the other hand, even if, ofc shouldn't get stuck in a loop like this (and also not affect HA, like other tasks still should be scheduled).

@alex-murashko
Copy link

I didnt checked it yet, but i think that it is related to combination of factors.
I defined this BT thermostat with 3 climate devices: TRV 1, TRV 2 and AirCon.
TRV 1 and TRV 2 are zigbee trv's installed on radiator in the room.
AC is custom controller which defined in yaml and works via MQTT(wifi). with setpoint limit from 18 to 30 (config is attached)

To enable heating, I move cooling slider (in BT UI component) higher and then move temperature slider above current temperature. And system hangs after that.

config for AC yaml is attached
ac_yaml.txt

will continue checking further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants