ojarva / python-ledcontroller

Controller library for limitlessled/easybulb/milight Wi-Fi LEDs
BSD 3-Clause "New" or "Revised" License
35 stars 9 forks source link

LED strip controller vs LED bulb #10

Closed romanpeters closed 8 years ago

romanpeters commented 8 years ago

So far I've only have gotten this to work with my Milight LED-controllers and not with my white Milight LED-lightbulb. Any idea why this is?

ojarva commented 8 years ago

Can describe two things:

1) What hardware do you have, and what is configured in each group? (Something like "gateway version X, on group 1 milight led rgbw, on group 2..."). You have conflicting information in your subject and in the description field. 2) Can you paste minimum code sample you have been using? (How you initialize this library, what do you call to control each group)

ekwoodrich commented 8 years ago

@RomanPeters If you can connect to a Milight WiFi bridge, you really should be able to control any bulb that you have linked to your bridge (through the same instructions to pair with your remote).

I can confirm that this library works both with RGBW, WW, and RGB Milight bulbs (with multiple generations). I pretty much have all of them. Without knowing your configuration with each group, it is difficult to say what the problem is.

Bear in mind the commands for brightness are different between each family of bulbs (% only work for RGB e.g. White has less commands available). If you can post the models and commands you are using for your Milights I will be happy to try to help you debug the problem if I can.

ojarva commented 8 years ago

@ekwoodrich do you happen to have white bulbs or new RGBWW ones? If so, can you confirm whether those work properly?

I thought RGB bulbs are not working (not implemented yet). Do those work properly when set as RGBW?

ekwoodrich commented 8 years ago

RGB only (oldest model) definitely work, I use them for outdoor lights. I also have white only bulbs that can only change temp of white but not any colors. RGBW (sometimes labeled WW) are the newest Milight model as far as I know, I have about a dozen of them. With them you cannot mix RGB colors with white however, only can control the (warm/cold) temp of white or set RGB colors separately.

Your python-ledcontroller has worked for all of them, and as far as I know, I have every Milight branded model (although I can't attest for other hardware branding like Easybulb).

Btw, I need at minimum two Milights Wifi bridges to control them by zone.... That's a bit frustrating by works with the Milight groups in the API. I know that's a HW constraint though.

romanpeters commented 8 years ago

I'm sorry I'm new to Milight, so it is very possible that I made a rookie mistake.

1) I have a wifi bridge v3, a LED strip 4-zone controller on channel 1, another LED strip 4-zone controller on channel 2. These work perfectly with python-ledcontroller. I also have a 9W E27 WW/CW LED Bulb on channel 3 (I used a different controller screen to sync this one within the Milight app, not sure if that matters). All of the above mentioned is branded as Milight.

2) It comes down to this:

import ledcontroller

led = ledcontroller.LedController('192.168.1.242', port=8899)

led.on(1) # turns LED strip 1 on
led.on(2) # turns LED strip 2 on
led.on(3) # doesn't turn the LED bulb on

EDIT: I just tried a similar package (/McSwindler/python-milight) which only controls the inverse, so the LED bulb and not the 2 LED strips, with my current setup.

ekwoodrich commented 8 years ago

@RomanPeters

I'm having trouble interpreting what your problem is, to be honest.... I have the same WiFi bridge and a WW/CW milight bulb (several).... what isn't working?

Though as a disclaimer, I don't have a milight/easybulb LED strip... if that's the problem, mine are not compatible with the same protocol.

ojarva commented 8 years ago

The really ugly solution would be use McSwindler's library for the led bulbs and this one for LED strips. 🙈

@RomanPeters But more seriously, you don't seem to specify that group 3 is white. Try with

led = ledcontroller.LedController('192.168.1.242', port=8899, group_3="white")

There is a different command set for old WW/CW bulbs.

romanpeters commented 8 years ago

Aah, That did it!

Thanks for the help, guys :)

ojarva commented 8 years ago

If this solved the issue, I'll close this. If you still have the same problem, feel free to reopen this.

If you hit any other issues, please open a new issue instead of commenting to this one.