telldus / tellstick-server-plugins

Plugins for TellStick Server
14 stars 8 forks source link

Lifx plugin - how to configure? #9

Closed atchoo78 closed 4 years ago

atchoo78 commented 4 years ago

@mickeprag : I've activated the Lifx plugin, but I have absolutely no idea how to proceed to connect it to my Lifx bulbs. Please enlighten me (drum roll 🥁), because I'm out of ideas.

Also, there seem to be a missing "icon.png" in the lifx plugin folder in this repository.

mickeprag commented 4 years ago

If the bulbs are connected to the same network they should be detected automatically.

The missing icon is now pushed.

atchoo78 commented 4 years ago

Thanks. Still no luck though. I can control the bulbs through the Lifx iOS app and the Flic app. I'm guessing that they (probably recently) changed something related to the way the lights connect, but I just installed it so I don't know for sure.

Skjermbilde

mickeprag commented 4 years ago

The plugin uses, a quite old, library called lifx-sdk (https://pypi.org/project/lifx-sdk/). The discovery is handled by that library. Maybe you can try it locally on your computer? If that library works on your computer is may be something else on the TellStick that is failing.

atchoo78 commented 4 years ago

@mickeprag: Seems to be working. Here's the output from a quick test I did locally:


Python 2.7.16 (default, Dec 13 2019, 18:00:32) 
[GCC 4.2.1 Compatible Apple LLVM 11.0.0 (clang-1100.0.32.4) (-macos10.15-objc-s on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> import lifx
>>> lights = lifx.Client()
>>> for i in lights.get_devices():
...     print '--- Device: "%s" ---' % i.label
...     print 'Power: %r' % i.power
...     color = i.color
...     print 'Color:'
...     print '  Hue: %d' % color.hue
...     print '  Saturation: %d' % color.saturation
...     print '  Brightness: %d' % color.brightness
...     print '  Kelvin: %d' % color.kelvin
... 
--- Device: "Stuebord" ---
Power: True
Color:
  Hue: 332
  Saturation: 1
  Brightness: 0
  Kelvin: 3500
>>>

Example code & latest version of the SDK (0.8) here

...may be something else on the TellStick that is failing.

Guess so. Either that, or there could be minor differences between version 0.7 and 0.8. Or a router/port forwarding issue, or some failing dependency.

Sigh...too many options 😓

mickeprag commented 4 years ago

Maybe it's best to continue the investigation on your actual TelllStick? Please create a support issue so we can continue there.

atchoo78 commented 4 years ago

Done.

atchoo78 commented 4 years ago

@mickeprag: I just wanted to share this thing that I wrote about stuff like brightness values, RGB, HSV converting and so on here 🙂

Thanks