I’ve built a garage multi sensor using ESPHome (DHT22, ultrasonic sensor, door sensor, presence sensor…) and a NodeMCU 32S
In this multi sensor I have a TEMT6000 that I want to use to check at night if someone forgot to switch off the light. This TEMT6000 is in front of the light, less than 2 meters away (light is on the wall not at ceiling).
Here is my code, which is the same we can find on ESPHome website:
Issue is that at night when the light is on, returned value is 0! At day, if light is off value is still 0 and and if I turn on the light value is 4lx… If I put a light in front of it it seems to work but light must be less than 50cm away.
Is the TEMT6000 not the good sensor for this? Is my sensor defective?
Light is a LED one: 8W, 806ln, 4000K (white light). I’ve tried with a yellow (9W, 806ln, 2700K) and I got nearly the same result: between 0.5 to 4lx.
Then I tried with an old light (40W incandescent lamp) and I got 20lx… What is fun is that lx value is stable with the old one and varies a lot with the LED one.
Yeah that’s your problem. The LED lights don’t emit a smoothly continuous spectrum. More like red, green and blue spikes that trick you into thinking it’s white. You could look for a high CRI (colour rendering index) LED light (>90 CRI). This should have a better spectrum that will work with your sensor. Unfortunately high CRI lights tend to be quite dear. You might be better off changing the sensor. A BH1750 might be better. It has a much broader peak response.