mwittig / node-milight-promise

A node module to control Milight LED bulbs and OEM equivalents such as Rocket LED, Limitless LED Applamp, Easybulb, s`luce, iLight, iBulb, and Kreuzer
MIT License
114 stars 27 forks source link

Inconsistency in rgbw and full-color #18

Closed greggilbert closed 7 years ago

greggilbert commented 7 years ago

Hey there. First off, awesome library - gamechanger for me.

I've got a v6 bridge (this one), and I have one RGBW/WW/CW Full Color and one RGBW Color bulb attached to it. When I run the same rgb commands for each, I get different results.

var light = new Milight({
    ip: "10.0.0.20",
    type: 'v6'
  }),
  zone = 1;

// this turns the bulb blue - seems incorrect?
light.sendCommands(commands.fullColor.on(zone), commands.fullColor.whiteMode(zone), commands.fullColor.brightness(zone, 100));
light.pause(1000);
light.sendCommands(commands.fullColor.rgb(zone, 200, 100, 100));

// this turns the light red - seems correct
light.sendCommands(commands.rgbw.on(zone), commands.rgbw.whiteMode(zone), commands.rgbw.brightness(zone, 100));
light.pause(1000);
light.sendCommands(commands.rgbw.rgb(zone, 200, 100, 100));

It's possible I'm missing something here, but I thought I'd ask. Any ideas?

mwittig commented 7 years ago

Sorry for the delay in reply. I'll look into this asap.

mwittig commented 7 years ago

Greg, thanks for reporting and the positive feedback. I'm able to reproduce the issue and it should be fixed shortly. Please note the color rendition (even for "full color") is limited: 255 hue values instead of 360 degrees hue, 20 native brightness levels instead of 100 eventhough the API is suggesting 100 levels, quality of the saturation is unknown. You'll notice the full color light for for #C86464 is much lighter than what the color table suggests.

mwittig commented 7 years ago

published node-milight-promise@0.1.2

greggilbert commented 7 years ago

Thanks! Just to be clear, the color rendering limitation is a Milight hardware issue, right?

mwittig commented 7 years ago

Yes, that's right!