lifx-python icon indicating copy to clipboard operation
lifx-python copied to clipboard

A few updates to make the code compatible with firmware 2.0

Open amil109 opened this issue 10 years ago • 1 comments

Hi there,

Thanks for writing this great repo! I find your code much easier to follow than other python LIFX code I could find, and it was working just fine with only a couple of minor changes to make it Python 2.7 compatible (I run it on an Arduino Yun which has 2.7 - Python 3.x should still work fine) until my bulbs got updated to firmware 2.0, when the protocol became an issue. I've added a line to the methods to change the protocol to the individual bulb mode if the target is a single bulb.

Also, my setup has 7 bulbs throughout the apartment, and they always seem to form multiple gateways, so I had to change the code a bit to create multiple gateways during connection to get them all to work correctly. All commands are sent to each gateway, even if the relevant bulb is not attached, so that could probably be improved (it maybe slows things down), but it seems to work OK right now.

Please have a look and see if you think it is worthwhile integrating my code - it's been a while since I wrote anything others had to see (and my first time contributing on GitHub), so I apologise if the style is no good!

Cheers,

Mills

Review on Reviewable

amil109 avatar Jul 07 '15 18:07 amil109

Awesome! To be honest I've been too lazy and careless to investigate the 2.0 change that broke everything and I've been hoping that someone who cared would step up and fix everything.

I'll see if I can test this out this weekend.

sharph avatar Jul 11 '15 18:07 sharph