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
71.96k stars 30.16k forks source link

Daikin integration fills logs with 'took longer than the scheduled update interval' #82972

Closed gigatexel closed 2 months ago

gigatexel commented 1 year ago

The problem

Since quite a long time now, all my daikin devices cause warnings in the logs: image

This has absolutely nothing to do with wifi speeds or disconnects.

Compareable issues were reported earlier, but not fixed.

https://github.com/home-assistant/core/issues/75383 https://github.com/home-assistant/core/issues/52739

What version of Home Assistant Core has the issue?

core-2022.11.4

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

daikin

Link to integration documentation on our website

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

Diagnostics information

config_entry-unifi-7fa49060278dbf40c8e2d50cb7aa4ee1.json (1).txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

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

Code owner commands Code owners of `daikin` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign daikin` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


daikin documentation daikin source (message by IssueLinks)

Freekers commented 1 year ago

Same issue here

2022-12-19 04:32:33.624 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.woonkamer_streamer is taking over 10 seconds
2022-12-19 04:32:53.622 WARNING (MainThread) [homeassistant.components.switch] Updating daikin switch took longer than the scheduled update interval 0:00:30
2022-12-19 04:35:33.623 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.freek_inside_temperature is taking over 10 seconds
2022-12-19 04:35:53.620 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2022-12-19 04:36:23.622 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2022-12-19 04:51:34.936 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.slaapkamer is taking over 10 seconds
2022-12-19 05:58:33.791 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.slaapkamer_inside_temperature is taking over 10 seconds
2022-12-19 05:58:53.790 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2022-12-19 05:59:23.791 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2022-12-19 07:59:35.111 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.slaapkamer is taking over 10 seconds
2022-12-19 08:30:35.296 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.woonkamer is taking over 10 seconds
2022-12-19 08:31:25.295 WARNING (MainThread) [homeassistant.components.climate] Updating daikin climate took longer than the scheduled update interval 0:01:00

Running Home Assistant 2022.12.7 in Docker.

FedericoBS commented 1 year ago

same problem. the controller is answering but very slowly even id the wifi signal is good

2023-03-09 10:15:18.483 WARNING (MainThread) [homeassistant.components.daikin] Connection failed for 192.168.1.162 2023-03-09 10:15:20.054 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30 2023-03-09 10:15:30.056 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.camera_da_letto_inside_temperature is taking over 10 seconds

Home Assistant 2023.4.1 Supervisor 2023.04.0 Operating System 9.5 Frontend 20230406.1 - latest

gigatexel commented 1 year ago

@fredrike would you mind changing the update interval to, for instance, 60 seconds instead of the standard 30 seconds? On my Stylish units, the logs keep flooding.

cremor commented 1 year ago

Decreasing the update interval is only a band-aid workaround. Who knows if it wouldn't still take over 60 seconds. Why does it even take that long? The AC itself replies instantly to API requests when I test it manually.

gigatexel commented 1 year ago

Why does it even take that long? The AC itself replies instantly to API requests when I test it manually.

Any suggestions on how we can try to identify what is causing the delay? I refuse to blame the Wifi. According to my UniFi console, all my AC units (5) have excellent connections and signal power is no lower than -50dBm

cremor commented 1 year ago

I don't know. Maybe enabling more logging levels would help? @fredrike would have to answer this. I see this warnings in my logs too. And my WiFi connection to the AC is "perfect".

Djelibeybi commented 1 year ago

It's being addressed upstream in pydaikin: https://bitbucket.org/mustang51/pydaikin/pull-requests/55

fredrike commented 1 year ago

Thanks @Djelibeybi, I'll create a new new version from bitbucket and ping you when it is ready.

cremor commented 1 year ago

@Djelibeybi @mover85 #94214 has been closed. Will there be a new PR to get that fix in HA?

mover85 commented 1 year ago

Yes there will be a new PR, just waiting for a new version of pydaikin. I'm testing it on the forum if anyone wants to test it. https://community.home-assistant.io/t/daikin-airbase-testing-new-version-of-pydaikin/584104/41

cremor commented 1 year ago

Should this be fixed by #95656?

cremor commented 1 year ago

Ok, no, it isn't fixed. I still get the warnings in the log with HA 2023.7.2:

2023-07-14 16:47:41.121 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.livingroom is taking over 10 seconds
2023-07-14 16:48:31.120 WARNING (MainThread) [homeassistant.components.climate] Updating daikin climate took longer than the scheduled update interval 0:01:00

2023-07-14 20:34:42.856 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.livingroom_inside_temperature is taking over 10 seconds
2023-07-14 20:35:02.854 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-07-14 20:35:32.856 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30

2023-07-15 04:19:16.190 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.livingroom_inside_temperature is taking over 10 seconds
mover85 commented 1 year ago

If you ping the controller is the latency consistent?

cremor commented 1 year ago

If I ping directly from Home Assistant to the AC then the latency is mostly at around 1 ms. There are some outliers around 10 ms and also some around 100 ms. But never more than about 150 ms.

Here are the ping statistics for 10000 pings:

10000 packets transmitted, 10000 packets received, 0% packet loss
round-trip min/avg/max = 0.907/1.332/118.036 ms
mover85 commented 1 year ago

That seems fine, it might be a timeout not being triggered for some reason.

cremor commented 1 year ago

Seems like this also affects HA startup time. I got the following in my log after the last startup of HA 2023.7.3:

2023-07-22 18:11:02.466 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: daikin
2023-07-22 18:11:13.885 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC' for daikin integration not ready yet; Retrying in background

It was by far the slowest integration to start: grafik

sddgit commented 1 year ago

Just a me too....

cremor commented 1 year ago

It's being addressed upstream in pydaikin: https://bitbucket.org/mustang51/pydaikin/pull-requests/55

@Djelibeybi I'm now using HA 2023.9.2 which contains pydaikin 2.11.1 and I still get those warnings in the log. So it seems like that PR didn't fix the issue after all.

kameo4242 commented 1 year ago

I also have some unifi AP. By default, when power is set to « auto », it’s more or less equal to max power. When I turned my 2.4 ghz network power from auto to low, I get far less of those timeouts. Just found out. Will confirm (or not) after more days but sounds promising.

Can someone with a similar setup test that too?

gigatexel commented 1 year ago

I also have some unifi AP. By default, when power is set to « auto », it’s more or less equal to max power. When I turned my 2.4 ghz network power from auto to low, I get far less of those timeouts. Just found out. Will confirm (or not) after more days but sounds promising.

Can someone with a similar setup test that too?

Just made the same changes.

gigatexel commented 1 year ago

Does not fix anything over here.

kameo4242 commented 1 year ago

Yeah after some days, not really better over here either. Sorry

sddgit commented 11 months ago

Does anyone have any further suggestions/comments regarding this ongoing issue?

froniusMW commented 11 months ago

Same issue for me

kameo4242 commented 9 months ago

I have a weird question: do we all have a Unifi Wifi network here? I mean ... could it be a compatibility issue between Daikin client wifi and Unifi APs?

Here is a typical log at my place (I filtered out only the Daikin part):


2023-12-11 08:52:06.808 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.kid_bedroom is taking over 10 seconds
2023-12-11 08:56:06.811 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.kid_bedroom is taking over 10 seconds
2023-12-11 09:01:06.817 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.kid_bedroom is taking over 10 seconds
2023-12-11 09:15:46.017 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.office_inside_temperature is taking over 10 seconds
2023-12-11 09:15:46.026 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kid_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 09:47:16.080 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_kitchen_inside_temperature is taking over 10 seconds
2023-12-11 10:06:09.014 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.parent_bedroom is taking over 10 seconds
2023-12-11 10:08:09.016 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.parent_bedroom is taking over 10 seconds
2023-12-11 10:25:47.735 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_parent_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 10:28:47.799 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_parent_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 10:51:48.155 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_parent_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 11:00:50.211 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_parent_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 11:02:50.226 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_parent_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 13:03:28.633 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_library_inside_temperature is taking over 10 seconds
2023-12-11 13:03:48.630 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 13:54:04.012 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.daikinap21760_energy_consumption is taking over 10 seconds
2023-12-11 13:57:05.947 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kid_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 14:08:34.972 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.kid_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 14:15:35.009 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.ac_kid_bedroom_streamer is taking over 10 seconds
2023-12-11 14:19:35.015 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.ac_kid_bedroom_streamer is taking over 10 seconds
2023-12-11 14:20:35.015 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.ac_kid_bedroom_streamer is taking over 10 seconds
2023-12-11 14:21:35.017 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.ac_kid_bedroom_streamer is taking over 10 seconds
2023-12-11 14:38:35.077 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.gaming_room_inside_temperature is taking over 10 seconds
2023-12-11 14:38:55.077 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 14:39:25.078 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 15:37:08.001 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.office_inside_temperature is taking over 10 seconds
2023-12-11 15:37:27.991 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 15:37:57.994 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 15:40:21.857 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.kid_bedroom is taking over 10 seconds
2023-12-11 15:41:11.858 WARNING (MainThread) [homeassistant.components.climate] Updating daikin climate took longer than the scheduled update interval 0:01:00
2023-12-11 16:17:41.854 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_library_inside_temperature is taking over 10 seconds
2023-12-11 16:17:41.866 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.office_inside_temperature is taking over 10 seconds
2023-12-11 16:46:11.865 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_library_inside_temperature is taking over 10 seconds
2023-12-11 16:46:31.863 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 16:47:01.866 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 17:07:11.934 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_kitchen_inside_temperature is taking over 10 seconds
2023-12-11 17:07:31.932 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 17:08:01.933 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2023-12-11 17:11:12.000 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.ac_parent_bedroom_inside_temperature is taking over 10 seconds
2023-12-11 17:33:22.151 WARNING (MainThread) [homeassistant.helpers.entity] Update of climate.living_room_1 is taking over 10 seconds
2023-12-11 17:34:12.150 WARNING (MainThread) [homeassistant.components.climate] Updating daikin climate took longer than the scheduled update interval 0:01:00

There seem to be "streams" of them, like in the case of climate.kid_bedroom or parent bedroom that seem to be unavailable for 10 mins and be back to normal. For the parent bedroom between 10 and 11am, several errors and the nothing until 5pm... ? 

btw, in this example, both kids & parents are on the same AP (UAP-AC-Pro).

Maybe the wifi units of the A/C are provoking some kind of congestion and provoke a lot of Tx retry. 

To further drill down in the problem, I'll try to pin the A/C units to a specific AP to see if it's a roaming issue. (even though there should not be any impact since my A/C splits aren't mobile, neither my APs)

I could capture some ping samples of one unit to see if it's having a higher latency when they fail to respond.
Also, maybe a tcpdump could bring some insights.

Any of you tried that?
froniusMW commented 9 months ago

I have 3 Unify APs, filled my log also. Turned off the mesh setting on the APs, improved a bit. Now aprox 2-3 entrys in the log per day instead of 30-40

cremor commented 9 months ago

do we all have a Unifi Wifi network here?

No

sddgit commented 9 months ago

I have 4 Daikin units using this integration, and a Unifi network. My HA instance has been up for 5 days, and there are 37,835 “longer than 10 seconds” in the log! They cover all the Daikin units and multiple entities in each. The Daikin Mobile Controller app also takes a long time to refresh any status, so I figured slow response is “normal”. I’d really love for this timeout to be extended to stop all these messages!

Joo01 commented 8 months ago

Hi, I have 2 Daikin units and see the warning messages in the log irregularly every 2 to 6 hours. However, I have had this since I installed the HA Daikin integration (sometime in early 2023). I've read some reports about the message but never found a solution. Maybe someone knows how to increase the “update interval”. An update interval of 5 minutes would be completely sufficient for me. Maybe then the messages would be gone :-)

2024-02-03 06:11:20.939 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
2024-02-03 06:11:50.941 WARNING (MainThread) [homeassistant.components.sensor] Updating daikin sensor took longer than the scheduled update interval 0:00:30
robinhood-code commented 6 months ago

Anyone has got any solution to this? This is the only regular error / warning message left that I can't resolve in my HA setup.

sddgit commented 6 months ago

I’d really love for something to be done to address this. Maybe a configurable timeout interval? But 10 seconds is clearly too short for many systems. The message has occurred in my current log 27,518 times. And yet all my air conditioners work flawlessly in HA. If not configurable, maybe a one minute timeout would suffice. I can’t see a downside really.

kameo4242 commented 6 months ago

Many decide to use Faikin to remedy this situation if I understood properly. Otherwise I removed all cloud dependancies by replacing the std wifi chip by an older, lan-only, version.

I’ve few timeouts. Like on 8 splits, overall maybe 12 per day.

I isolated the splits on a wifi net too, a relaxed, 802.11b old stuff iot compatible and got my decent devices on another network.

You can also put manually delays in your automations. As well, I avoid triggering automation at fix hours since I suspect this the moment where stats are polled by the system already.

On Wed 27 Mar 2024 at 02:05, sddgit @.***> wrote:

I’d really love for something to be done to address this. Maybe a configurable timeout interval? But 10 seconds is clearly too short for many systems. The message has occurred in my current log 27,518 times. And yet all my air conditioners work flawlessly in HA. If not configurable, maybe a one minute timeout would suffice. I can’t see a downside really.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/82972#issuecomment-2021739172, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPKKRDSFET7Z3CK4MWTF2LY2ILOJAVCNFSM6AAAAAASPL4VL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRRG4ZTSMJXGI . You are receiving this because you commented.Message ID: @.***>

sddgit commented 6 months ago

I have 4 splits (in Australia). They all behave exactly the same way wrt timeouts. Each individual “device” (climate device itself, temperature sensors etc.) on each unit suffers many, many timeouts. But any attempt to control the device is instantaneous. Even the official Daikin app is painfully slow to refresh status. I truly believe this is “normal” behaviour, at least for my systems. Different models cold well behave differently. I have a rock solid Unifi wifi system. I don’t think it has anything to do with wifi, more just the units themselves. A simple change to increase the timeout would be most welcome! It looks to me like the Air Touch 4 Daikin integration has a timeout of 30 seconds.

robinhood-code commented 6 months ago

can anyone advise how to change the 10 seconds timeout setting?

kameo4242 commented 6 months ago

I’m not home but I’ll try to have a look when back. I think the package maintainers may have their reason not to have done it yet.

One last tip, I also disabled a lot of useless sensors (like whatever pump frequency and the likes) don’t known if it helps or not. I suppose the systems polls less data.

On Mon 1 Apr 2024 at 01:15, robinhood-code @.***> wrote:

can anyone advise how to change the 10 seconds timeout setting?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/82972#issuecomment-2028943236, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPKKRBHF5VZ2FMHQDSG22LY3CKIRAVCNFSM6AAAAAASPL4VL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYHE2DGMRTGY . You are receiving this because you commented.Message ID: @.***>

robinhood-code commented 6 months ago

One last tip, I also disabled a lot of useless sensors (like whatever pump frequency and the likes) don’t known if it helps or not. I suppose the systems polls less data.

For me, the warning message is always:

Logger: homeassistant.helpers.entity Source: helpers/entity.py:1232 First occurred: 9:11:27 PM (7 occurrences) Last logged: 9:50:28 PM

Update of sensor.guest_ac_inside_temperature is taking over 10 seconds Update of sensor.master_ac_inside_temperature is taking over 10 seconds

so the timeout is for these 2 specific sensors but not the device itself. As I'm using the inside_temp in my automation I can't disable these 2 sensors.

sddgit commented 6 months ago

I get mostly inside_temperature warnings, and they happen every minute for each of my units. But I also get climate device and power measurement timeouts. I’m not sure if disabling the sensors will stop the integration polling for those sensors. Does it definitely stop some timeout errors for you @kameo4242 ?

kameo4242 commented 6 months ago

Hi everyone,

Same here, mostly temps failing to be fetched.

My setup is 2 units, 8 splits, unifi Wifi network (with 4 AP, dedicated subnet on 2.4ghz, allowing 2mbps as lowest rate), all local with no cloud dependency:

I have to add that my onecta app is also reporting very weird temps readings (like 26°C in parents room instead of 20°C in reality).

I've a few suspicions which would need confirmation here: 1/ The system automatically polls the climate units at regular intervals but probably all at once, which could be part of the issue. Maybe spreading those autopolls over 2 minutes would help. 2/ The Daikin temp probes are not really neither accurate or fast enough. Their data bus may take more time than expected to poll the temperature, leading the motherboard to wait and time out. They are already not very accurate and cheap, so this could be part of the problem 3/ Their BRP069B45 series may have poor wifi integration/performance

Le mar. 2 avr. 2024 à 01:31, sddgit @.***> a écrit :

I get mostly inside_temperature warnings, and they happen every minute for each of my units. But I also get climate device and power measurement timeouts. I’m not sure if disabling the sensors will stop the integration polling for those sensors. Does it definitely stop some timeout errors for you @kameo4242 https://github.com/kameo4242 ?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/82972#issuecomment-2030788791, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPKKRG3ISN4POSGV4KUHQLY3H36TAVCNFSM6AAAAAASPL4VL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZQG44DQNZZGE . You are receiving this because you were mentioned.Message ID: @.***>

-- __ Philippe Humeau

sddgit commented 6 months ago

Whatever the issue, the fix should be simple - either change the timeout value or, better still, make it configurable. Hoping someone will have the time to look into doing this.

cremor commented 5 months ago

Possible cause: #114345