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.03k stars 29.69k forks source link

Kasa Lightstrips No Longer Turn on Properly #122220

Closed dmz38 closed 1 month ago

dmz38 commented 1 month ago

The problem

I have 3 Kasa Light Strips (models KL420L5, KL430) that will not turn on properly now unless you specify a static color (say, as part of a routine). If you have an effect color as the default (say, rainbow), this will no longer turn on.

What version of Home Assistant Core has the issue?

core-2024.7.3

What was the last working version of Home Assistant Core?

core-2024.6.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

TPLink

Link to integration documentation on our website

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

Diagnostics information

home-assistant_tplink_2024-07-20T01-55-48.021Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

We believe the reproduction steps should be for any Kasa lightstrip:

  1. Set the color to an effect like "Rainbow" while the device is turned on.
  2. Shut off the device in HA
  3. Attempt to turn on the device in HA
  4. Be sad. :(

Please reach out if further debugging is required!

home-assistant[bot] commented 1 month ago

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)

sdb9696 commented 1 month ago

Hi @dmz38, in step 1:

  1. Set the color to an effect like "Rainbow" while the device is turned on.

Are you doing this step in HA or in the kasa app?

dmz38 commented 1 month ago

This step can be done in either app with the same result. It's the fact that the device is in that state when it turns on that seems to break it.

dmz38 commented 1 month ago

I believe there could be a chance that #122401 is related/same issue.

ToniCipriani commented 1 month ago

I'm seeing the same issue with my KL400L5, have to select a colour or effect, and it ignores the brightness when I select an effect.

I'm not doing anything with scenes, just an automation to turn it on or off, ~and there's no option to select an effect there, only presets which isn't supported by the controller.~

EDIT: I've replaced the simple on-off with Scenes to workaround this, but toggling on the dashboard still doesn't work if it was previously on an effect. Manually running kasa off and kasa on CLI within the HA Docker works as expected though, it retrieves the previous effect.

sdb9696 commented 1 month ago

@dmz38 can I just clarify something. When you say:

this will no longer turn on.

do you mean the light doesn't turn on back to the Rainbow effect or the light won't turn on at all? If it's the former then I think we have a fix. If it won't turn on at all then I need more info on how to reproduce as I've been testing with a KL420 and it always turns on, just not back to the effect.

dmz38 commented 1 month ago

@sdb9696 it won't turn on at all if set to the rainbow effect, turned off (anywhere), and then attempted to be turned on via HA.

Let me know if we need to connect privately to walk through troubleshooting/reproduction.

sdb9696 commented 1 month ago

Sure, let's connect on discord, my username is the same, sdb9696. I can't do anymore today but am around tomorrow.

ToniCipriani commented 1 month ago

@dmz38 can I just clarify something. When you say:

this will no longer turn on.

do you mean the light doesn't turn on back to the Rainbow effect or the light won't turn on at all? If it's the former then I think we have a fix. If it won't turn on at all then I need more info on how to reproduce as I've been testing with a KL420 and it always turns on, just not back to the effect.

FWIW my KL400L5 simply doesn't turn on, even though kasa sysinfo says it's on and light_state.on_off is 1.

sdb9696 commented 1 month ago

FWIW my KL400L5 simply doesn't turn on, even though kasa sysinfo says it's on and light_state.on_off is 1.

Could you upload redacted output of kasa --host IP_ADDRESS --json when it's in this state?

ToniCipriani commented 1 month ago

FWIW my KL400L5 simply doesn't turn on, even though kasa sysinfo says it's on and light_state.on_off is 1.

Could you upload redacted output of kasa --host IP_ADDRESS --json when it's in this state?

Here you go. LightsOffButOnInHA.json

sdb9696 commented 1 month ago

This issue could be fixed in the latest beta 2024.8.0.b0 although we've not been able to recreate it entirely. Please feel free to test this out on the beta and provide any feedback in the homeassistant discord beta channel. (Make sure you have backups enabled in case you need to rollback)