Best Option for Color Temperature Control

Well, according to the binding docs only the white milight bulbs support the color temperature control. The info on amazon tends to agree with this. I suspect it is a gamut issue. milight makes RGB, RGBW, and white bulbs, and apparently only the white ones support color temp control.

I might be able to fake it with an amberish hue and the saturation control on an RGB bulb. But, I don’t care about RGB.

I’m also getting somewhat flaky behavior from the bulbs (sending ON to a group of dimmers doesn’t result in the bulbs all going to 100%). I might end up having to work around that with events. It seems like the bulbs are a little flaky in general.

Unlike zwave and Hue, the Milight control protocol isn’t very reliable. Color “quality” (brightness, gamut, …) also is known not to be the best. As I said, they’re the cheapest ones out there, so you get what you pay for.
If I were you and serious about HA and lighting quality, I’d dump them and go with a better technology. You can still deploy your Milights in the basement… then you also don’t have to bother figuring out what that “color temperature control” marketing term really means.
If you want to be able to tune the bulb to different shades of white, then get decent RGB(W) bulbs or strips, these you can tune to any color which is a useful thing even way beyond ‘disco lighting’.
If not, get a (zwave or other) dimmer plus a standard bulb to match your favorite-shade-of-white color needs. Note that for single-color, there’s also ‘screw-in’ plugs like the Everspring AN145 where you don’t have to mess with the wiring AND are free to select the best bulb.

Well, in the basement I’d just stick with simple on/off relays. I don’t need to control color temp in rooms I rarely use.

Sure, but are there any good options that aren’t $60 per bulb?

I’m really just looking for some kind of endorsement from somebody who says “I use this, and it is great. I have no trouble producing a decent 2700K and 6500K.”

I’m also concerned that for some bulbs the higher temps might simply be out of gamut for them. If the W LEDs in the RGBW bulb are soft-white then they’re going to struggle to produce a decent 6500K even if you throw some blue in.

Of course, I have no idea what the CRI of these Milight bulbs are either.

But, I definitely want the ability to vary the temperature of each bulb. My use case is to have a few lights in highly-trafficked areas be able to be either 2700K or 6500K depending on time of day. Unless I double up on fixtures somehow and switch which lights are powered (with bulbs at each temp) I can’t do that without varying the temp of individual bulbs. That is more-or-less what I’ve been doing, but I’m limited on fixtures in some rooms and don’t really want to go adding more. I don’t want to have half as much light to have it be the right temp.

For rooms where I either am not often in them, or where I only need lights at certain times of day then I’ll just stick with relays or dimmers. I’d really prefer to not put the smarts in the bulbs anyway.

I’m wondering about a similar problem with a philips lightstrip plus
these are 5 channel ledstrips

I’ve managed to get the colors and warmwhite/coldwhite channels going with this sketch

#include <ESP8266WiFi.h>
#include <PubSubClient.h>
//            ESP-12 LoLin v3 (nodemcu 0.9) used in this example
// RGB FET
#define redPin 16   //Red, obviously
#define greenPin 5 //G
#define bluePin 4   //B
#define wwhitePin 2 // Warm White
#define cwhitePin 0  // Cold White
int wait = 2000;

const char *ssid =  "ssid";   // cannot be longer than 32 characters!
const char *pass =  "pass";
const char *logtopic = "/esp8266/log";
const char *pubtopic = "/home/in/esp8266_5";
const char *subtopic = "/home/out/esp8266_5";

// Update these with values suitable for your network.
IPAddress broker(192, 168, 1, 253);

void callback(const MQTT::Publish& pub) {
  // handle message arrived
}

WiFiClient wclient;
PubSubClient client(wclient, broker);
void setup()
{
  Serial.begin(115200);
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);  
  pinMode(wwhitePin, OUTPUT); 
  pinMode(cwhitePin, OUTPUT);
  InitWiFi();
}

void loop()
{
   if (client.connected())
      client.loop();
  Serial.println("red:");
  setColor(1023, 0, 0, 0, 0);  // red
  delay(wait);
  Serial.println("green:");
  setColor(0, 1023, 0, 0, 0);  // green
  delay(wait);
  Serial.println("blue:");
  setColor(0, 0, 1023, 0, 0);  // blue
  delay(wait);
  Serial.println("yellow:");
  setColor(512, 512, 0, 0, 0);  // yellow
  delay(wait);  
  Serial.println("magenta:");
  setColor(512, 0, 512, 0, 0);  // magenta
  delay(wait);
  Serial.println("cyan:");
  setColor(0, 512, 512, 0, 0);  // cyan
  delay(wait);
  Serial.println("composite white:");
  setColor(341, 341, 341, 0, 0);  // composite white
  delay(wait);
  Serial.println("warm white:");
  setColor(0, 0, 0, 1023, 0);  // cold white
  delay(wait);
  Serial.println("cold white:");
  setColor(0, 0, 0, 0, 1023);  
  delay(wait);
  Serial.println("coldest white:");
  setColor(0, 0, 512, 0, 512);  
  delay(wait);
  
}
bool InitWiFi() {

if (WiFi.status() != WL_CONNECTED) {
              setColor(1023, 0, 0, 0, 0);  // red
          delay(1000);
          setColor(0, 0, 0, 0, 0);  // green
          delay(1000);
    Serial.print("Connecting to ");
    Serial.print(ssid);
    Serial.println("...");
    if (WiFi.status() != WL_CONNECTED) {
              setColor(1023, 512, 0, 0, 0);  // red
          delay(1000);
          setColor(0, 0, 0, 0, 0);  // green
          delay(1000);
          }
    WiFi.begin(ssid, pass);

    if (WiFi.waitForConnectResult() != WL_CONNECTED)
      return 1;
    Serial.println("WiFi connected");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());
    Serial.println("");
  }

  if (WiFi.status() == WL_CONNECTED) {
    if (!client.connected()) {
      if (client.connect("arduinoClient")) {
          setColor(0, 1023, 0, 0, 0);  // green
          delay(wait);
          setColor(0, 0, 0, 0, 0);  // green
          delay(wait);
  client.publish(logtopic,"Wi-fi connected, boot message sent.");
  client.subscribe(subtopic);
  return 0;
      }
    }

    
  }
}
void setColor(int red, int green, int blue, int wwhite, int cwhite)
{
   client.publish(logtopic,"Setting color");
  analogWrite(redPin, red);
  Serial.print("R: ");
  Serial.print(red);
  analogWrite(greenPin, green);
  Serial.print(" G: ");
  Serial.print(green);
  analogWrite(bluePin, blue);  
  Serial.print(" B: ");
  Serial.print(blue);
  analogWrite(wwhitePin, wwhite);
  Serial.print(" W: ");
  Serial.print(wwhite);
  analogWrite(cwhitePin, cwhite);
Serial.print(" C: ");
  Serial.println(cwhite);
}

I’ve been using this example
It works, but I need an extra channel for the warm/cold whites. I’d also like to make it simpler

Hi Richard
Did you mange to find a good rule that emulates the f-lux with you light? If so would you mind sharing it?
regards

I had milights and found them to occasionally not respond so I shifted to Philips. The 10-15 dollar bulbs are only for dimming and are warm white. The 25-35 dollar white ones (they look like the RGBW bulbs) to color temperature 2700K-6500k, and so do the RGBW bulbs. There are way to cut down on the cost and this is what I did. In the US on eBay you can get a 4 bulb RGBW starter kit for 150.00. I bought 2 and kept one bridge. Then sell the bridge for 35-40 dollars. By another bulb and I ended up with 9 bulbs at roughly 33 dollars each. If you want to do strips then get:

54 dollars on amazon
Wireless electronic ballast FLS-PP lp with Power PWM interface for RGBW and RGB lights (12/24V LED/LED stripes), ZigBee certified product

and

15 dollars
SUPERNIGHT 16.4ft 12V 5050 RGBWW Warm White LED Strip Lighting 5M 300 LEDs Waterproof Ribbon Lamps Multi-colored LED Tape Lights

then you will have 16ft of RGBW leds that work with philips hue. Don’t forget to buy a 12v power supply if you don’t have one.

The only difference is the FLS-PP will show up as 2 items, a RGB and a Dimmable White light. It can do color temperature as well.

I have replaced all my milights and am very happy because things actually respond 100% of the time.

Note: If you have 2.4g wifi make sure you adjust the Zigbee frequency because it can cause interference. The hue app lets you change it and there are charts online to show which channel to pick.

1 Like

Thanks for your swift reply, did you set up and rule that changes the color temperature during the day as f-lux does?
BR
Brian

I made a rule that changes the color based on the outside temperature. I don’t see why it couldn’t be modified to adjust the temperature of the white based on the outdoor lux or time. Since the hue plugin uses a dimmer for white temperature then adjust the dimmer based on the outdoor lux.

Lux 0 -1000 Typical for my area.
White Temp 0-100

For every 10 change in Lux then the Dimmer for temperature changes by 1

rule "F.Lux"
when
	Item OutsideLux changed 
then	
	val DecimalType lux = OutsideLux as DecimalType
	int level = (((lux.intValue) / 1000.0) * 100 )
if(level > 100 && HueTemp.state != 100){HueTemp.sendCommand(100)}
else if(level <= 100 && HueTemp.state != level){HueTemp.sendCommand(level)}
end

I believe it should be an integer, but I could be wrong. Then have a rule that turns the light on and the temperature will be different based on the Outdoor Lux level.

1 Like

Thanks, how do you set the Item OutsideLux?

I have an Aeon Labs Multisensor 6 outside.

okay:slight_smile: thanks

For what it’s worth, re your question “is anyone else concerned with color temp” my answer is YES! I’m designing and building new lighting in the home from scratch, and I’m really interested in colour temperature.

  1. RGB lighting does NOT emulate colour temperature well. Have you ever tried to set a 5050 RGB LED string to match the colour of a tungsten lamp? It’s just not possible. You can get much closer with the new range of RGBCCWW lighting. These are bulbs with RGB SMDs as well as separate cool white and warm white chips. Maybe some day in the future, manufacturers will start producing them as a single chip. (Do they do that now? I don’t know.)

  2. I’m planning a multi-sensor for each room of the house, to include PIR, temp/humidity sensor, Lux sensor, light colour sensor, and maybe even air quality. The light colour sensor would be used to fine tune the overall light colour of the room. No idea how yet - but as the sensors are so cheap, I may as well include them.

  3. I have some Hue RGB bulbs. I think they have separate white LED chips, I’m not sure. Either way, I’m impressed by the colour rendering. I’ve tried Sonoff B1 bulbs and Hue so far, the Sonoff don’t come close - they are rubbish. I guess you get what you pay for. I have a few items set up in openHAB for each Hue: dimmer, white balance, and RGB.

I really love the warmth that came with traditional tungsten bulbs (and candles. Maybe I should live in the 19th century?) and this is a topic close to my heart, so I’ll be following this thread with interest.

Just wanted to share a rule I’ve been using the last month or so to control the colour temperature of my LIFX lights in an f.lux style.

I’ve written up my solution at Automatic sunrise and sunset color / colour temperature control (with LIFX).

Cheers,
Simon

I’m curious about controlling the bulbs as well. My idea was to increase the lamps brightness when it gets darker outside. But what I can’t find anywhere is a good LUX measuring sensor.
I read somewhere that the Hue motion sensor also outputs lux values, but are there others that don’t cost 38 euro? Does anyone know?

There’s zwave multisensors to cost ~45-55€. While that’s a lot you will also get motion detection and temperature for the price.
You might also get away with buying some cheap sensor and connecting it to some ESP8266 such as a Sonoff, but that’s sort of DIY then.

The reviews of the Sonoff are pretty poor. The Zwave is pretty cool, I’ve looked at it, but I don’t have any other ZWave stuff, so it wouldn’t justify buying and the stick, and the sensor.
For now the Hue is my best option. Thanks though.

That’s a poor pattern not uncommon among newbies … you need to make some experiences yourself before you settle on one or more technologies.
Think long-term, too. If you’re serious about home automation you will soon want more than just lighting, easily justifying the stick cost.

I agree, but I did think it through, and for the ‘social acceptance’ factor (AKA the wife) determines the possible options. All my stuff is currently using 433Mhz and the Hue is a next step. Having all ZWave would be nice, but just not feasible atm.

I use a number of Sonoff B1 bulbs that are reflashed with Tasmota firmware. Although they are capable of RGB colour, they also have CW and WW chips in them and support a colour temperature command. I’ve found them reliable but not very bright, so I’ve used 2 or 3 in some rooms. They’re ~$20 from the usual chinese suppliers.
In places where I needed a brighter light, I’ve used LIFX tunable white bulbs. I’ve also found these reliable and have much smoother fading and a wider colour temperature range than the B1. Unfortunately they’re also double the price.

If have been testing two Sengled Smart LED Tunable White (Element Plus), 2700-6500K, A19 60W Equivalent bulbs for some time now and I have found them to be very reliable in my system. They use the Zigbee protocol, so I use the OH2 Zigbee Binding to control them. They are currently available for US$18 from Amazon.com.