mclarkk / lifxlan

Python library for accessing LIFX devices locally using the official LIFX LAN protocol.
MIT License
503 stars 115 forks source link

Add support for Tile firmware effect messages #137

Closed exking closed 3 years ago

exking commented 4 years ago

Add support for the GetTileEffect, SetTileEffect and StateTileEffect messages as documented here

ceboxsell commented 4 years ago

Did some testing and it worked but needs documenting in readme and refactoring.

exking commented 4 years ago

Added a couple README entries, thanks. I'm not sure if I need to copy the complete description from the API Docs as it may change in the future. I've also added the MultiZone Effect messages, but for some odd reason my Z2 Strip does not seem to react. Sending "SetMultiZoneEffect" and then "GetMultiZoneEffect" does reflect the parameters, but no actual "effect" is running. Very odd.

ceboxsell commented 4 years ago

I will do some testing on my z strip as well. Thanks for this.

ceboxsell commented 4 years ago

So tested set multizone effect and all good. strip.set_multizone_effect(1123,1,3000) and the get received. {'instanceid': 1123, 'type': 1, 'speed': 3000, 'duration': 0, 'parameters': [0, 0, 0, 0, 0, 0, 0, 0]}

So maybe you forgot to set your speed value ? a value of 0 means no movement so it would look like it didn't work.

exking commented 4 years ago

Thanks for testing! Mine does return the correct GetMultizoneEffect showing my speed, parameters, (if duration is specified - it actually counts it down), etc, but Z strip itself does not react. I've noticed it won't react to the Move effect button on the iPhone either, so maybe it's hosed.

LinqLover commented 4 years ago

I've noticed it won't react to the Move effect button on the iPhone either, so maybe it's hosed.

Then the API is not implemented perfectly in that respect - what's the overall state of this PR? I'm looking forward to using it in production! :D

mclarkk commented 3 years ago

Merged! I made some changes mostly to the product file generation script reflecting updates to the way that products.py is formatted. Since it is a utility, that script has been moved into the core lifxlan folder instead of examples.

Thanks for all the great work writing and testing the Tile effects messages!