-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[miio] Improve yeelight RGB with brightness, introduce substitutions #10984
Conversation
This will allow to send right commands for gateway and lumi devices Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
} | ||
|
||
public int queueCommand(String command, String params, String cloudServer) | ||
public int queueCommand(String command, String params, String cloudServer, String sender) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: the String sender is used in the next coming PR. already adding it to avoid merge issues while completing the development of the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the same changes in my fork few hours ago and tested with Yeelight lightstrip plus, worked properly. But i'm still in doubt, if there is a different logic in methods and status report.
And a question about Color mode channel - as I see it's supposed to run a method "set_power", "on", "smooth", "$value", so Yeelight device should react to channel switch by powering on in that color state? It doesn't. The channel is changing value only when i send rgb or ct commands.
Yes, the command is send as that is according the yeelight spec ( https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf begin page 12), and (prior this PR) I don't know the values for the color/temperature when I just switch mode. Now with this PR in place, indeed we may change the logic and indeed use the set_rgb / set_ct_abx methods instead if that solves the issue |
note the strange part in the spec regarding the mode... according the spec, you switch on with these values: however, in status and other commands it is actually reported as 1: RGB, 2: CT. which is why I fixed the mapping in this PR |
NOTE: Jenkins build error is unrelated to the PR |
Tested! No errors in docs - it's indeed like described! In method power_on 1 is for CT and 2 is for RGB, and in status report 1 is for RGB and 2 is for CT. I guess you should apply some further changes to fix mapping for power_on method. |
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@mesetka I pushed now a change that works for me locally using the alternative commands. |
Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…penhab#10984) * [miio] add deviceId and timestamp substitutions This will allow to send right commands for gateway and lumi devices Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] update brightness in yeelight RGB channel Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Use generic way to call the asyncCommunication module Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Fix mapping yeelight Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Improve Yeelight colormode mapping Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] yeelight fix unit for delayed off Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
…tutions (openhab#10984)" This reverts commit afe9142.
…penhab#10984) * [miio] add deviceId and timestamp substitutions This will allow to send right commands for gateway and lumi devices Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] update brightness in yeelight RGB channel Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Use generic way to call the asyncCommunication module Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Fix mapping yeelight Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Improve Yeelight colormode mapping Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] yeelight fix unit for delayed off Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
…tutions (openhab#10984)" This reverts commit afe9142. Signed-off-by: dw-8 <davy.wong.on+github@gmail.com>
…penhab#10984) * [miio] add deviceId and timestamp substitutions This will allow to send right commands for gateway and lumi devices Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] update brightness in yeelight RGB channel Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Use generic way to call the asyncCommunication module Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Fix mapping yeelight Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Improve Yeelight colormode mapping Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] yeelight fix unit for delayed off Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
…penhab#10984) * [miio] add deviceId and timestamp substitutions This will allow to send right commands for gateway and lumi devices Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] update brightness in yeelight RGB channel Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Use generic way to call the asyncCommunication module Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Fix mapping yeelight Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Improve Yeelight colormode mapping Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] yeelight fix unit for delayed off Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
…penhab#10984) * [miio] add deviceId and timestamp substitutions This will allow to send right commands for gateway and lumi devices Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] update brightness in yeelight RGB channel Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Use generic way to call the asyncCommunication module Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Fix mapping yeelight Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] Improve Yeelight colormode mapping Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com> * [miio] yeelight fix unit for delayed off Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Main changes
Signed-off-by: Marcel Verpaalen marcel@verpaalen.com