Best Option for Color Temperature Control


(Richard Freeman) #1

I’m just getting started with Openhab, and my initial use case is setting up lights with Color Temperature control. If anybody has used f-lux or its many equivalents on their PC, this is what I’m after. (If you haven’t used it, the concept is that your melatonin levels are influenced by the color temperature of the light in your environment, so tungsten lighting tends to help prepare your brain for sleep, and daylight lighting tends to wake you up.)

Right now I have a few MiLight bulbs and am getting the hang of OH. I plan to set a house-wide group for color temp and use that to control the temp on all my bulbs, and use astro to auto-set the temp (or maybe I’ll use absolute time).

However, I’m not 100% certain I want to stick with MiLight. One thing that is really annoying is that their bridges can only support 4 white bulbs at a time (and 4 RGB bulbs, but disco lighting doesn’t interest me). I don’t really want a stack of bridges, though I guess I could do that at $20 each (basically a $5 premium on the bulbs, which are $20).

Philps Hue can also do it with a MUCH higher limit on connected devices, but:

  1. Anything Hue is pricier. Their “ambient white” bulbs are $30 each. The $15 ones don’t control color temp I think. I’m not sure if their $60 RGB bulbs do either, actually (Milight RGBW bulbs don’t control color temp, just the white ones.)

  2. The cheaper starter kit has bulbs without color temp control. The expensive kit might control temp (not quite sure), but it is REALLY pricey. I think this leaves me with buying everything separate, which is $60 plus $30 per bulb.

I’ve seen a few mega reviews out there (including some linked here), but I don’t really see any mention of color temp on them. So, it is hard to tell what other options exist.

Is anybody else concerned with color temp, and if so what are you using? Or does anybody happen to know which bulbs support color temp control? I don’t mind gathering the data, but I’m not sure what my universe of options includes yet.


(Markus Storm) #2

Reading your post, it’s a little unclear what you mean by “color temperature control” because you also say you don’t want RGB bulbs.
So either you want white bulb with maybe dimming capabilities, or do you really want to have the ability to turn a bulb to different shades of white ? If so, then what’s wrong with a RGB bulb ? R+B+G=W, RGB bulbs can be tuned to show any kind of white, and any bulb to have that ability in fact is a RGB bulb.

Well, I know of MiLight, Hue, LIFX, Zipato, Aeon bulbs
Plus there’s 220/110VAC dimmers, and the Fibaro FGRBGW to attach LED strips or any other LED or other 12/24VDC load to (it has 4 outputs that you can use for RGBW or W^4, does not have to be a strip).

Milight are the cheapest ones out there, so if they work for you, what’s wrong with stacking bridges ?

If you get a hue bridge or starter kit (bridges you will get on *bay for $40), it can do full color control (white dimming or RGB, depending on bulb), and it also allows for controlling ‘Friends of Hue’ products from OH. That’s the previous technology generation called ‘Living Colors’ and was just renamed, those are somewhat cheaper than new Hues but work with a Hue brindge just like a Hue does.


(Richard Freeman) #3

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.


(Markus Storm) #4

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.


(Richard Freeman) #5

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.


(Dikkedimi) #6

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


(Brian M. Pedersen) #7

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


(Fastcar550) #8

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.


(Brian M. Pedersen) #9

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


(Fastcar550) #10

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.


(Brian M. Pedersen) #11

Thanks, how do you set the Item OutsideLux?


(Fastcar550) #12

I have an Aeon Labs Multisensor 6 outside.


(Brian M. Pedersen) #13

okay:slight_smile: thanks


(hazymat) #14

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.


(Simon H) #15

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


(Marco Pietersen) #16

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?


(Markus Storm) #17

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.


(Marco Pietersen) #18

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.


(Markus Storm) #19

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.


(Marco Pietersen) #20

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.