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
72.64k stars 30.4k forks source link

TP-Link Kasa KL125 bulbs unreliable within HA since 2024.10.2 #128677

Open welborn opened 10 hours ago

welborn commented 10 hours ago

I have 11 kasa KL125 bulbs and since 2024.10.2 (I skipped 2024.10.0 and 2024.10.1 releases) they've been going offline in HA. In the app they are always online and consistently immediately responsive. The fact that the app works instantly on all bulbs that show offline in HA tells me that this is definitely a HA integration thing.

One person in another thread mentioned changing IPs in dhcp, but I've since migrated all to static IPs.

This is what I see in home assistant. Again, all of these have solid signal to the access point, and are available in the kasa app and instantly respond to changes from kasa.

image

Some of the behavior I see when using the homeassistant is:

When turning on or off a group of 4 bulbs I see the following behavior

Not all will toggle usually 2 or 3 out of 4 One may blink at full brightness for about a tenth of a second every 3 to 4 seconds Sometimes they come on a different brightnesses When adjusting individual bulbs Long delays before responding Bulb immediately reporting offline Bulb coming on at partial brightness when instructed to turn on at 100%

Code for my toggle call

metadata: {}
data:
  brightness_pct: 100
target:
  area_id: office
  entity_id: light.office_lights
action: light.toggle

light.office_lights is a group entity containing office light 1-4

Adding log entries - I see a bunch of this over and over with all of my bulbs:

2024-10-18 12:13:17.806 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 10.1.11.19 data: Unable to query the device 10.1.11.19:9999:
2024-10-18 12:13:17.807 WARNING (MainThread) [homeassistant.components.group.sensor] Unable to use state. Only numerical states are supported, entity sensor.office_light_1_current_consumption with value unavailable excluded from calculation in sensor.lights_current_energy_usage
2024-10-18 12:13:17.807 WARNING (MainThread) [homeassistant.components.group.sensor] Unable to use state. Only numerical states are supported, entity sensor.office_light_1_today_s_consumption with value unavailable excluded from calculation in sensor.lights_today_s_usage
2024-10-18 12:13:18.005 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 10.1.11.10 data: Unable to query the device 10.1.11.10:9999:
2024-10-18 12:13:18.007 WARNING (MainThread) [homeassistant.components.group.sensor] Unable to use state. Only numerical states are supported, entity sensor.office_light_4_current_consumption with value unavailable excluded from calculation in sensor.lights_current_energy_usage
2024-10-18 12:13:18.007 WARNING (MainThread) [homeassistant.components.group.sensor] Unable to use state. Only numerical states are supported, entity sensor.office_light_4_today_s_consumption with value unavailable excluded from calculation in sensor.lights_today_s_usage
2024-10-18 12:13:27.946 ERROR (MainThread) [homeassistant.components.tplink.coordinator] Error fetching 10.1.11.11 data: Unable to query the device 10.1.11.11:9999:
2024-10-18 12:13:27.947 WARNING (MainThread) [homeassistant.components.group.sensor] Unable to use state. Only numerical states are supported, entity sensor.bedroom_light_2_current_consumption with value unavailable excluded from calculation in sensor.lights_current_energy_usage
2024-10-18 12:13:27.947 WARNING (MainThread) [homeassistant.components.group.sensor] Unable to use state. Only numerical states are supported, entity sensor.bedroom_light_2_today_s_consumption with value unavailable excluded from calculation in sensor.lights_today_s_usage

more logs from logbook

Kitchen 2 Light preset changed to Not set
1:17:38 PM - Now
Kitchen 2 turned off
1:17:38 PM - Now
Kitchen 2 Cloud connection was connected
1:17:38 PM - Now
Office Light 3 Light preset changed to Not set
1:17:35 PM - Now
Office Light 3 turned on
1:17:35 PM - Now
Office Light 3 Cloud connection was connected
1:17:35 PM - Now
Office Light 4 Light preset became unavailable
1:17:35 PM - Now
Office Light 4 became unavailable
1:17:35 PM - Now
Office Light 4 Cloud connection became unavailable
1:17:35 PM - Now
Kitchen Lights turned off triggered by state of Kitchen 1 turned off
1:17:32 PM - 1 second ago
Kitchen 1 Light preset changed to Not set
1:17:32 PM - 1 second ago
Kitchen 1 turned off
1:17:32 PM - 1 second ago
Kitchen 1 Cloud connection was connected
1:17:32 PM - 1 second ago
Bedroom Light 1 Light preset changed to Not set
1:17:27 PM - 6 seconds ago
Bedroom Light 1 turned off
1:17:27 PM - 6 seconds ago
Bedroom Light 1 Cloud connection was connected
1:17:27 PM - 6 seconds ago
Bedroom Light 3 Light preset changed to Not set
1:17:26 PM - 8 seconds ago
Bedroom Light 3 turned off
1:17:26 PM - 8 seconds ago
Bedroom Light 3 Cloud connection was connected
1:17:26 PM - 8 seconds ago
Bedroom Light 2 Light preset became unavailable
1:17:24 PM - 9 seconds ago
Bedroom Light 2 became unavailable
1:17:24 PM - 9 seconds ago

Originally posted by @welborn in https://github.com/home-assistant/core/issues/128040#issuecomment-2422964545

welborn commented 10 hours ago

Additional info:

Confirmed all firmware on all bulbs are up to date.

Confirmed that all bulbs appear online in firewall and that all IPs are static and unchanging.

image

Confirmed signal strength for all bulbs - bulb with the lowest signal (laundry room bulb) gives me the least problems

image