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

MultiZone Support #6

Open
frakman1 opened this issue Dec 9, 2016 · 6 comments
Open

MultiZone Support #6

frakman1 opened this issue Dec 9, 2016 · 6 comments

Comments

@frakman1
Copy link

frakman1 commented Dec 9, 2016

Is there any chance you could add support for the new LIFX light strip's multi-zone capability?

The protocol documentation is here
The product link is here

Thank you for writing this awesome LIFX library!

@petrklus
Copy link
Owner

petrklus commented Dec 9, 2016

I have pre-ordered the product as soon as it came out but still waiting to receive it. Do you have it already? Planning to implement as soon as I get my hands on the product!

@frakman1
Copy link
Author

frakman1 commented Dec 9, 2016

Yes. I have two starter kits and would love to help you test it if you want.

@petrklus
Copy link
Owner

@frakman1 see my latest commit - have a play! At the moment command-line support only, no webservice yet

@frakman1
Copy link
Author

frakman1 commented Dec 17, 2016

I just checked it out. I tried the demo mode with just one parameter (IP address) Looks great!
I'm not sure how to use the full command line options. In particular, how the start and end index are supposed to work. Can you provide some example calls or some more information, please? I can make the whole strip change colour but I don't know what parameters to change to change different segments to different colours.

For example, I would expect the call to:

python set_colour_multizone.py 192.168.2.182 0 125 20 100 100 3500 1

to change the first half of the strip (0 to 125) to colour red (hue=20) etc etc. However, what happens instead, is that the whole strip turns red. What am I missing?

I also don't understand the use of the "tools.NO_APPLY/APPLY_ONLY" parameter. Why would you set the parameters but not apply them?

@frakman1
Copy link
Author

mousex

I played around with it this weekend and made a simple change so that the mouse now controls it.

X position of mouse selects the segment and moves it.
Y position of mouse changes the hue of that segment.

@petrklus
Copy link
Owner

Hello @frakman1 , thank you for your interest!

  1. I have not tested the command line interface yet but the order of parameters should be following:

start_index, end_index, hue, sat, bri, kel, apply_changes

For the LIFX Z, assuming you've plugged in 2 of the segments (normal starter pack), you've got 16 total zones. I do not think there is a device yet that would support any more, I suppose they are future proofing.

  1. There are three types of packet - setting a colour (APPLY), only putting colour in a queue (NO_APPLY) and "submit" packet (APPLY_ONLY). The idea is that you can prepare colour change with multiple NO_APPLY packets and then either submit the change with one that would contain APPLY or noop packet with APPLY_ONLY. The reason for existence of APPLY_ONLY is that sometimes it's cleaner to separate the colour setting and "commit" but in theory there is no functional difference between this and sending last packet with both colour change and APPLY param.

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

2 participants