A few updates to make the code compatible with firmware 2.0 #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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