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
Strange behavior with moonlight mode in homekit scenes #68
Comments
Yeah I’m aware of that behavior. It’s because setting the moonlight mode is being a setting the brightness with a special arguments. That’s why the second set brightness overrides it I believe. I would need to spend more time investigating but one solution I thought I’d try is to only use brightness and make last 10% of it act as moonlight mode. That should theoretically solve this issue. Maybe you could try implementing it as well? |
Ok, that is fine that you are already aware of it. I can have a look at it, but I have absolut no experience with programming for homebridge. |
No. Sounds like a separate one though. You’d need to take a look at logs |
As for experience: I didn’t have any either. Check out the readme as I tried to make it as simple as possible. |
It might be better to let the moonight switch turn of the lamp completely instead of just turn off the moonlight mode. I also have trouble make this work any good in automations |
Hi @okonet, I did some tests first using the Debug mode and I am not sure if this really is the correct solution.
If I understand correctly, When I run the automation with moonlight mode disabled, I get this:
I'm asking myself why the requests are so weird when setting both at the same time. I'd expect to see a request for setting moonlight mode on, and a request for setting the brightness. It's my first time working with homebridge, so some more pointers would be appreciated. |
@bendobos thanks for working on it. I believe the issue you're seeing is exactly why it is an issue with the current implementation. For some reason, there is no API for moonlight mode Yeelight provide developers with so basically to turn this mode on or off you're forced to use
See the spec: https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf I don't know why setting the brightness interfere with it but my idea was, instead of calling two commands, to only call I propose you draft a PR and I'll take a look at it when I have a bit more time. |
🎉 This issue has been resolved in version 2.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hello @vieira and @okonet,
maybe one of you could help me with my problem. The plugin is working really well, but i have observed a strange behavior when transitioning from normal mode to moonlight or vice versa.
When i set in a scene, that it should turn on moonlight mode, but i also want to change the brightness of the moonlight, this is not always working. Most of the time, just the normal light mode stays activated and nothing happens. But for other ceiling lights which are in the same scene, this is working.
Maybe this have something to do with the sequence how the commands are sent to the light.
I am using the models ceiling3 and ceiling15.
The text was updated successfully, but these errors were encountered: