home-assistant/core

TP-Link Kasa KL125 bulbs unreliable within HA since 2024.10.2

welborn opened this issue · 4 comments

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 #128040 (comment)

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

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

Code owner commands

Code owners of tplink 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 tplink 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)


tplink documentation
tplink source
(message by IssueLinks)

Im experiencing the same issue with both my kasa k125 bulbs. I have 4 and they take turns dropping from home assistant but work perfectly fine from the kasa app.