No announcement yet.

Sensor that reports color temperature?

  • Filter
  • Time
  • Show
Clear All
new posts

    Sensor that reports color temperature?

    Is there a sensor that I can point out a window, or even place outside, that would sense the color temperature? I've seen some but only for dedicated commercial lighting systems. I have mostly Philips Hue White Ambient bulbs inside, and instead of changing color temperature on a timer it would be useful to have it exactly match what's outside.

    There's an adafruit RGB color sensor if you're up to a DIY solution. Here's a project that adjusts your computer monitor color based on ambient light color temperature that might be a jumping off point.


      That would definitely work, although getting I2C into Homeseer probably takes quite a few steps and pieces of hardware. But that gave me an idea... the RGB color sensor is just a few normal photodiodes with RGB color filters. So I could get 3 Zigbee light sensors (, put a color filter on each of them, and then it's just a bit of math to convert RGB to CCT.


        Owww... i do like that thought! I have two of those, so might need to get another one But the math part is something harder I am afraid....
        -- Wim

        Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
        650 devices ---- 336 events ----- 40 scripts


          another DIY option: APDS9960

          ​​​​​​I use it here. Some learning curve if you're not into Tasmota but pretty straightforward HS Integration via MCSMQTT.

          Click image for larger version  Name:	Screenshot_20210714-142558_Chrome.jpg Views:	0 Size:	45.9 KB ID:	1484027


            Another toy for me to play. Somebody is getting rich or I am getting poor with these toys. The Wemos mini and Tasmota approach is really not that difficult. Much online documentation and a large user community anxious to help.


              Agreed; but nothing to make you poorer, so ridiculously cheap:


              However, the list of "nice to have" projects is getting longer...

              PS: This one was a bit tricky to configure so just in case someone takes a shot at it:

              1: you must compile your build to use it so add the following to user_config_override.h:

              #ifndef USE_APDS9960
              #define USE_APDS9960 // Enable APDS9960 Proximity Sensor (+4k7 code)

              2: You must disable driver 16, Otherwise It will be detected as a TSL2561

              Console: “i2cdriver16 0”

              3: Unless you want to use gesture features, add this rule to disable gesture and access illumance, RGB, etc.

              rule1 on System#Boot do sensor27 0 endon
              rule1 on


                I'm going to try the zigbee solution first, just to see if it's straightforward, and will post the results (and math) if I get it done. I ordered some camera lens color filters about the same size as the sensors. We'll see how it works, calibration might be tough.

                I like the Wemos mini and Tasmota approach, there seems to be a lot I can get into there, I may look into that eventually, seems intriguing.


                  I had Tasmota installed so I built with this version. The directions from the post herein and the Tasmota site are a little different, but actually easier where all I needed to do was enable the #define for the APDS9960 and select color & proximity as the mode of operation.

                  Click image for larger version

Name:	Capture.JPG
Views:	53
Size:	26.2 KB
ID:	1485048

                  It came right up on my test ESP8266 with no additional configuration needed.

                  My observations on its operation
                  1. proximity measurements are very close to the sensor. If within inches then it will report a range, but if trying to sense feet then it will not do it. This is expected since it is a Broadcom sensor for smartphones.
                  2. color measurements will show for both reflected and generated light.
                  3. it may be useful to distinguish primary colors, but unless some optics are used it will not be able to accurate report the color of the sensed object. I suspect the ambient light biases it toward the white spectrum. No matter how close I held the sensor to a LED that was illuminating Green, Red or Blue LED the sensor reported components of the other two colors. e.g.. a blue LED was reported as 50,50,200 for RGB. I do not have calibrated LED as the source so this could also bias the result.

                  It is a nice sensor with lots of capability. It may fit some use cases and it will miss the mark on others.

                  If anybody wants a binary of the Tasmota code with this senosr that can be installed on an ESP8266 then let me know. I will post it.