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

Can't configure bulb to stay off after power loss #579

Open
dreamlayers opened this issue Dec 14, 2023 · 2 comments
Open

Can't configure bulb to stay off after power loss #579

dreamlayers opened this issue Dec 14, 2023 · 2 comments

Comments

@dreamlayers
Copy link

dreamlayers commented Dec 14, 2023

I have a Kasa KL135(US) WiFi RGB bulb. After it loses and regains power, I want the light either have the state it had before power loss, or stay off. This seems impossible.

Right now kasa --host x.x.x.x --type bulb turn-on-behavior returns Current turn on behavior: soft=TurnOnBehavior(preset=None, mode=<BehaviorMode.Last: 'last_status'>) hard=TurnOnBehavior(preset=None, mode=<BehaviorMode.Last: 'last_status'>). The problem is that last ends up being the last settings the bulb had while it was lit. If the light was turned off via WiFi, that won't be remembered after a power interruption, and it will turn on with the settings it had before it was turned off via WiFi.,

The other turn on behaviour option is presets. The problem with presets is that for this bulb, a brightness value of 0 is minimum brightness, not literally zero brightness with no light being produced. So, even a preset with brightness=0 hue=0 saturation=0 color_temp=0 custom=None id=None mode=None results in the bulb being dimly lit after a power interruption.

I seem to have no way to change the id and mode of the preset. Maybe they can be changed to create a preset that turns the light off?

@rytilahti
Copy link
Member

Hi, have you tried if the expected behaviour can be configured using the official mobile app?

If yes, it would be great if you could set it up and check the settings the device reports for turn on behaviours so we could improve the library to handle that.

@kirichkov
Copy link
Contributor

I can't speak particularly of this bulb, but the smart wi-fi bulbs from xiaomi I tested a while ago, always come online after a "power loss". It was extremely annoying when a brown/blackout occurs during the night. I believe this behavior is intentional however - If you switch a smart bulb using it's designated non-smart wall switch, you'd expect it to come on just as a regular bulb, and mostly likely that's why all bulbs assume the "on" state on power loss, and so far I haven't found one that can be programmed differently. Likely this is the case with the TP-Link bulbs as well.

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

No branches or pull requests

3 participants