happyleavesaoc / python-limitlessled

MIT License
33 stars 22 forks source link

Issues with dual white cct leds #20

Closed andresava closed 6 years ago

andresava commented 6 years ago

Hi everybody and thank you for the awesome job.

I'm using the library to control 2 RGB bulbs and 2 dual white cct leds via a iBox2 (v6) bridge.

Everything is fine with the RGB bulbs. They turn on and off without any problems. Instead, I'm unable to control the 2 white leds. Here is the code I'm using.

from limitlessled.bridge import Bridge from limitlessled.group.rgbw import RGBW from limitlessled.group.rgbww import RGBWW from limitlessled.group.white import WHITE bridge = Bridge('192.168.1.77') living = bridge.add_group(3,'living',WHITE) living.on = True

I don't get any error messages. Simply, the lights don't turn on. I'm able to control them using the Mi-Light Android app, choosing the Multizone temperature/brightness controller.

Am I doing something wrong?

Thank you!

m038 commented 6 years ago

I'm getting the exact same behaviour. After some research i found out that the byte comands in the class CommandSetWhiteV6 are different than the ones my app uses to communicate with them. I'm preparing a PR for this. Additionally i noticed that these lights for the features warm-cool and brightness, they only have commands to make it warmer, cooler, darker or brighter. There is no set brightness or color temperature feature afaik. I think it might not be supported by these lights, or we're talking about different dual white leds.

By using the app and looking at the lights i think there are 10 gradations in brightness and color temperature.

Robiinn commented 6 years ago

I am having the same issue with my dual white lamp. I am unable to control it from Domoticz or this Python code, but the default app works.

from limitlessled.bridge import Bridge
from limitlessled.group.rgbw import RGBW
from limitlessled.group.rgbww import RGBWW
from limitlessled.group.white import WHITE
import time

bridge = Bridge('192.168.2.5')
# A group number can support two groups as long as the types differ
living = bridge.add_group(1, 'AppLamp Group2 White', WHITE)
living.on = True

hall = bridge.add_group(1, 'test', RGBW)
hall.on = False

time.sleep(10)

The RGBW lamp works fine but the WHITE bulb does not respond to the code at all.

marcusramberg commented 6 years ago

I'm also having this problem. Works fine in the node.js version tho, so as a work-around I'm using this script to make a switch for home assistant for now https://gist.github.com/marcusramberg/6a63b01588137bb6e85ae4602a12f136 - Would be really nice to have full support for dual white leds tho.

Robiinn commented 6 years ago

The NodeJS library is working great. Would love to see python-limitlessled implement the proper commands to get dual white working.

happyleavesaoc commented 6 years ago

We need a contributor with a v6 bridge to submit a PR with a fix and/or extended functionality. I only have a v5 bridge myself.

Robiinn commented 6 years ago

I have a V6 bridge, I'll see if I can figure out how the other project is building the commands and if I can translate that to this Python library.

JohanLeirnes commented 6 years ago

This might be interesting: https://github.com/sidoh/esp8266_milight_hub/pull/182

Newer CCT devices seems to use another checksum than the older.

amelchio commented 6 years ago

I have proposed a fix in #36. Feel free to test it out. Thanks.