Just finished DIY Outside Illuminance & Colour temperature sensor connected to a NodeMCU_u_ipex (not in the same housing) with external antenna connection (ipex).
For waterproof outside sensor housing, I used a Foscam camera housing (white) and covered the hole with transparent plastic cover and the TCS34725 sensor inside.
(Device on the right is not applicable)
I noticed my I2C bus gave me some problems when connecting a second sensor (BME280 Temperature+Pressure+Humidity). When searching the Internet a solution was suggested to add pull-up (connected to VCC) resistor to the SDA and SCL line, which I did (4K7), resulting in significant more stable I2C-bus.
I’m also looking for the best settings. At the moment I use (part of ESPHome config):
i2c:
sda: 21
scl: 22
sensor:
- platform: tcs34725
red_channel:
name: "NodeMCU_u_ipex TCS34725 Red Channel"
green_channel:
name: "NodeMCU_u_ipex TCS34725 Green Channel"
blue_channel:
name: "NodeMCU_u_ipex TCS34725 Blue Channel"
clear_channel:
name: "NodeMCU_u_ipex TCS34725 Clear Channel"
illuminance:
name: "NodeMCU_u_ipex TCS34725 Illuminance"
color_temperature:
name: "NodeMCU_u_ipex TCS34725 Color Temperature"
gain: 1x # default
integration_time: 2.4ms # default
glass_attenuation_factor: 1.0 # default
address: 0x29
update_interval: 600s
Home Assistant:
Colour temperature vs Custom Adaptive Lighting integration (HACS)
I noticed when the clear_channel/Illuminance drop-down to zero (sunset/night/dark) or when rise from zero (sunrise) , all R,G,B readings reveal spikes…
Questions:
1 - I know my config settings are not the most optimal settings. Please, can someone explain how gain, integration_time and glass_attenuation_factor are effecting the different readings?
2 - Before values drop to zero or after rise from zero always it will show spikes on the R,G.B channels (not on clear channel). Is there a way to filter that behaviour?
EDIT: Changed integration_time:
to auto
Please don’t hesitate to post your comments, it’s highly appreciated!