esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

TCS34725 does overexposure on auto (which leads to negative color temperatures) #3575

Closed RubenKelevra closed 1 month ago

RubenKelevra commented 2 years ago

The problem

I'm using a TCS34725 with integration_time: auto on a D1 mini.

Around noon the color temperature is either NaN or is reported negative:

IMG_20220912_213211

After 14:30 for the rest of the day (with obviously less intense sun hitting the sensor) the values are reported correctly:

Screenshot_2022-09-12-21-31-36-861_io homeassistant companion android jpg Screenshot_2022-09-12-21-31-23-517_io homeassistant companion android jpg Screenshot_2022-09-12-21-31-10-166_io homeassistant companion android jpg Screenshot_2022-09-12-21-30-58-298_io homeassistant companion android jpg

Which version of ESPHome has the issue?

2022.8.3

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2022.9.2

What platform are you using?

ESP8266

Board

D1_mini

Component causing the issue

TCS34725

Example YAML snippet

esphome:
  name: $devicename
  platform: ESP8266
  board: d1_mini

substitutions:
  devicename: ambient-light-sensor
  friendly_name: "Ambient Light Sensor"

logger:
  esp8266_store_log_strings_in_flash: false

mdns:
  disabled: true

api:
  encryption: 
    key: !secret api_key-ambient-light-sensor

ota:
  password: !secret ota_password_ambient-light-sensor

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  manual_ip:
    static_ip: 192.168.8.27
    gateway: !secret wifi_gateway
    subnet: !secret wifi_subnet
    dns1: !secret wifi_dns1
    dns2: !secret wifi_dns2
  fast_connect: true
  reboot_timeout: 5min

i2c:
  sda: D1
  scl: D2
  scan: true
  id: bus_a

sensor:
  - platform: tcs34725
    i2c_id: bus_a
    red_channel:
      name: "$friendly_name Red Channel relative"
      accuracy_decimals: 2
      filters:
        - exponential_moving_average:
            alpha: 0.05
            send_every: 2
            send_first_at: 2
        - or:
          - throttle: 10s
          - delta: 0.5
    green_channel:
      name: "$friendly_name Green Channel relative"
      accuracy_decimals: 2
      filters:
        - exponential_moving_average:
            alpha: 0.05
            send_every: 2
            send_first_at: 2
        - or:
          - throttle: 10s
          - delta: 0.5
    blue_channel:
      name: "$friendly_name Blue Channel relative"
      accuracy_decimals: 2
      filters:
        - exponential_moving_average:
            alpha: 0.05
            send_every: 2
            send_first_at: 2
        - or:
          - throttle: 10s
          - delta: 0.5
    clear_channel:
      name: "$friendly_name Clear Channel"
      accuracy_decimals: 5
      filters:
        - exponential_moving_average:
            alpha: 0.05
            send_every: 2
            send_first_at: 2
        - or:
          - throttle: 10s
          - delta: 0.5
    illuminance:
      name: "$friendly_name Illuminance"
      accuracy_decimals: 2
      filters:
        - exponential_moving_average:
            alpha: 0.05
            send_every: 2
            send_first_at: 2
        - or:
          - throttle: 10s
          - delta: 0.2
    color_temperature:
      name: "$friendly_name Color Temperature"
      accuracy_decimals: 2
      filters:
        - exponential_moving_average:
            alpha: 0.05
            send_every: 2
            send_first_at: 2
        - or:
          - throttle: 10s
          - delta: 0.5
    integration_time: auto
    glass_attenuation_factor: 1.0
    address: 0x29
    update_interval: 1s    

output:
  - platform: gpio
    pin: D3
    id: white_led
    inverted: false

light:
  - platform: binary
    output: white_led
    name: "$friendly_name White LED"

Anything in the logs that might be useful for us?

No response

Additional information

No response

RubenKelevra commented 2 years ago

Example from today:

Screenshot from 2022-09-13 13-30-58

swifty99 commented 2 years ago

that's not good. could you provide more information? the raw values of all

    red_channel:
      name: "TCS34725 Red Channel"
    green_channel:
      name: "TCS34725 Green Channel"
    blue_channel:
      name: "TCS34725 Blue Channel"
    clear_channel:
      name: "TCS34725 Clear Channel"
    illuminance:
      name: "TCS34725 Illuminance"

would be helpful.

RubenKelevra commented 2 years ago

@swifty99 yeah sure - sorry for the delay:

Ambient Light - Blue Channel raw Ambient Light - Clear Channel raw Ambient Light - Color Temperature Ambient Light - Green Channel raw Ambient Light - Illuminance Ambient Light - Red Channel raw

RubenKelevra commented 2 years ago

@swifty99 It looks like the negative values in illuminance trigger the negative values in color temperature.

swifty99 commented 2 years ago

no worries,

do you have a chance to log the Esphome logs while this happens? It will look something like this:

[21:13:10][D][tcs34725:251]: Got Red=62.5%,Green=25.0%,Blue=17.5%,Clear=0.0% Illuminance=0.1lx Color Temperature=2343.5K
[21:13:10][D][tcs34725:292]: Integration time: 614.4ms, ideal: 614.4ms regval_new 0 Gain: 60 Clear channel raw: 40  gain reg: 3

Probably the sensor ist oversaturated. The only thing that really helps would be a grey filter. I use the light from a reflected surface. Not linear perfectly but good enough.

cheers Jan

swifty99 commented 1 year ago

Maybe we can close this issue.

Probable take away: have a look in the logs for the overasaturation message.

RubenKelevra commented 1 year ago

Hey @swifty99,

so I can confirm issues with the latest ESPHome version as well: While there's an output of the chip reported which includes the Color temperature, HA will receive an "inf K" reporting:

``` INFO Reading configuration /config/esphome/ambient-light-sensor.yaml... INFO Starting log output from 192.168.8.27 using esphome API INFO Successfully connected to 192.168.8.27 [17:23:50][I][app:102]: ESPHome version 2023.2.3 compiled on Feb 20 2023, 08:23:51 [17:23:50][C][wifi:504]: WiFi: [17:23:50][C][wifi:362]: Local MAC: [redacted] [17:23:50][C][wifi:363]: SSID: [redacted] [17:23:50][C][wifi:364]: IP Address: 192.168.8.27 [17:23:50][C][wifi:365]: BSSID: [redacted] [17:23:50][C][wifi:367]: Hostname: 'ambient-light-sensor' [17:23:50][C][wifi:369]: Signal strength: -70 dB ▂▄▆█ [17:23:50][C][wifi:373]: Channel: 1 [17:23:50][C][wifi:374]: Subnet: 255.255.254.0 [17:23:50][C][wifi:375]: Gateway: 192.168.8.1 [17:23:50][C][wifi:376]: DNS1: 192.168.8.2 [17:23:50][C][wifi:377]: DNS2: 0.0.0.0 [17:23:50][C][logger:293]: Logger: [17:23:50][C][logger:294]: Level: DEBUG [17:23:50][C][logger:295]: Log Baud Rate: 115200 [17:23:50][C][logger:296]: Hardware UART: UART0 [17:23:50][C][i2c.arduino:052]: I2C Bus: [17:23:50][C][i2c.arduino:053]: SDA Pin: GPIO5 [17:23:50][C][i2c.arduino:054]: SCL Pin: GPIO4 [17:23:50][C][i2c.arduino:055]: Frequency: 50000 Hz [17:23:50][C][i2c.arduino:058]: Recovery: bus successfully recovered [17:23:50][I][i2c.arduino:068]: Results from i2c bus scan: [17:23:50][I][i2c.arduino:074]: Found i2c device at address 0x29 [17:23:50][C][uptime.sensor:031]: Uptime Sensor 'Uptime Sensor' [17:23:50][C][uptime.sensor:031]: Device Class: 'duration' [17:23:50][C][uptime.sensor:031]: State Class: '' [17:23:50][C][uptime.sensor:031]: Unit of Measurement: 's' [17:23:50][C][uptime.sensor:031]: Accuracy Decimals: 0 [17:23:50][C][uptime.sensor:031]: Icon: 'mdi:timer-outline' [17:23:50][D][tcs34725:248]: Got Red=57.3%,Green=49.6%,Blue=47.8%,Clear=66.9% Illuminance=15220.0lx Color Temperature=3994.0K [17:23:50][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44095 gain reg: 0 [17:23:50][C][gpio.output:010]: GPIO Binary Output: [17:23:50][C][gpio.output:011]: Pin: GPIO0 [17:23:50][C][light:104]: Light 'Ambient Light Sensor White LED' [17:23:50][C][adc:087]: ADC Sensor 'VCC Voltage' [17:23:50][C][adc:087]: Device Class: 'voltage' [17:23:50][C][adc:087]: State Class: 'measurement' [17:23:50][C][adc:087]: Unit of Measurement: 'V' [17:23:50][C][adc:087]: Accuracy Decimals: 2 [17:23:50][C][adc:090]: Pin: VCC [17:23:50][C][adc:126]: Update Interval: 60.0s [17:23:50][C][tcs34725:047]: TCS34725: [17:23:50][C][tcs34725:048]: Address: 0x29 [17:23:50][C][tcs34725:052]: Update Interval: 1.0s [17:23:50][C][tcs34725:054]: Clear Channel 'Ambient Light Sensor Clear Channel' [17:23:50][C][tcs34725:054]: State Class: 'measurement' [17:23:50][C][tcs34725:054]: Unit of Measurement: '%' [17:23:50][C][tcs34725:054]: Accuracy Decimals: 5 [17:23:50][C][tcs34725:054]: Icon: 'mdi:lightbulb' [17:23:50][C][tcs34725:055]: Red Channel 'Ambient Light Sensor Red Channel relative' [17:23:50][C][tcs34725:055]: State Class: 'measurement' [17:23:50][C][tcs34725:055]: Unit of Measurement: '%' [17:23:50][C][tcs34725:055]: Accuracy Decimals: 2 [17:23:50][C][tcs34725:055]: Icon: 'mdi:lightbulb' [17:23:50][C][tcs34725:056]: Green Channel 'Ambient Light Sensor Green Channel relative' [17:23:50][C][tcs34725:056]: State Class: 'measurement' [17:23:50][C][tcs34725:056]: Unit of Measurement: '%' [17:23:50][C][tcs34725:056]: Accuracy Decimals: 2 [17:23:50][C][tcs34725:056]: Icon: 'mdi:lightbulb' [17:23:50][C][tcs34725:057]: Blue Channel 'Ambient Light Sensor Blue Channel relative' [17:23:50][C][tcs34725:057]: State Class: 'measurement' [17:23:50][C][tcs34725:057]: Unit of Measurement: '%' [17:23:50][C][tcs34725:057]: Accuracy Decimals: 2 [17:23:50][C][tcs34725:057]: Icon: 'mdi:lightbulb' [17:23:50][C][tcs34725:058]: Illuminance 'Ambient Light Sensor Illuminance' [17:23:50][C][tcs34725:058]: Device Class: 'illuminance' [17:23:50][C][tcs34725:058]: State Class: 'measurement' [17:23:50][C][tcs34725:058]: Unit of Measurement: 'lx' [17:23:50][C][tcs34725:058]: Accuracy Decimals: 2 [17:23:50][C][tcs34725:059]: Color Temperature 'Ambient Light Sensor Color Temperature' [17:23:50][C][tcs34725:059]: State Class: 'measurement' [17:23:50][C][tcs34725:059]: Unit of Measurement: 'K' [17:23:50][C][tcs34725:059]: Accuracy Decimals: 2 [17:23:50][C][tcs34725:059]: Icon: 'mdi:thermometer' [17:23:50][C][ota:093]: Over-The-Air Updates: [17:23:50][C][ota:094]: Address: 192.168.8.27:8266 [17:23:50][C][ota:097]: Using Password. [17:23:50][C][api:138]: API Server: [17:23:50][C][api:139]: Address: 192.168.8.27:6053 [17:23:50][C][api:141]: Using noise encryption: YES [17:23:51][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 58.53132 % with 5 decimals of accuracy [17:23:51][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.01374 % with 2 decimals of accuracy [17:23:51][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 47.61183 % with 2 decimals of accuracy [17:23:51][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 13351.96191 lx with 2 decimals of accuracy [17:23:51][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 13351.96191 lx with 2 decimals of accuracy [17:23:51][D][sensor:126]: 'Ambient Light Sensor Color Temperature': Sending state inf K with 2 decimals of accuracy [17:23:51][D][tcs34725:248]: Got Red=57.4%,Green=49.6%,Blue=47.8%,Clear=67.2% Illuminance=15295.0lx Color Temperature=3990.8K [17:23:51][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44316 gain reg: 0 [17:23:52][D][tcs34725:248]: Got Red=57.3%,Green=49.6%,Blue=47.9%,Clear=65.6% Illuminance=14904.6lx Color Temperature=4001.1K [17:23:52][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43250 gain reg: 0 [17:23:53][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 59.33603 % with 5 decimals of accuracy [17:23:53][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 56.27606 % with 2 decimals of accuracy [17:23:53][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 13529.62598 lx with 2 decimals of accuracy [17:23:53][D][tcs34725:248]: Got Red=57.4%,Green=49.6%,Blue=47.9%,Clear=67.9% Illuminance=15430.2lx Color Temperature=3983.3K [17:23:53][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44738 gain reg: 0 [17:23:54][D][tcs34725:248]: Got Red=57.4%,Green=49.6%,Blue=47.9%,Clear=67.8% Illuminance=15409.4lx Color Temperature=3984.0K [17:23:55][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44669 gain reg: 0 [17:23:55][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 59.99409 % with 5 decimals of accuracy [17:23:55][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 47.65679 % with 2 decimals of accuracy [17:23:55][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 13674.03125 lx with 2 decimals of accuracy [17:23:55][D][tcs34725:248]: Got Red=57.2%,Green=49.5%,Blue=47.9%,Clear=64.5% Illuminance=14631.9lx Color Temperature=4011.4K [17:23:55][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 42491 gain reg: 0 [17:23:56][D][tcs34725:248]: Got Red=57.3%,Green=49.5%,Blue=47.9%,Clear=65.4% Illuminance=14845.0lx Color Temperature=4002.0K [17:23:57][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43102 gain reg: 0 [17:23:57][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 60.58147 % with 5 decimals of accuracy [17:23:57][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 60.58147 % with 5 decimals of accuracy [17:23:57][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 56.47029 % with 2 decimals of accuracy [17:23:57][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 13802.16504 lx with 2 decimals of accuracy [17:23:57][D][tcs34725:248]: Got Red=57.4%,Green=49.6%,Blue=47.9%,Clear=66.6% Illuminance=15124.3lx Color Temperature=3991.0K [17:23:57][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43894 gain reg: 0 [17:23:58][D][tcs34725:248]: Got Red=57.4%,Green=49.6%,Blue=47.9%,Clear=66.5% Illuminance=15094.1lx Color Temperature=3989.0K [17:23:58][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43840 gain reg: 0 [17:23:59][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 61.19764 % with 5 decimals of accuracy [17:23:59][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 13936.79004 lx with 2 decimals of accuracy [17:23:59][D][tcs34725:248]: Got Red=57.5%,Green=49.6%,Blue=47.9%,Clear=67.3% Illuminance=15267.3lx Color Temperature=3984.6K [17:23:59][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44327 gain reg: 0 [17:24:00][D][tcs34725:248]: Got Red=57.5%,Green=49.6%,Blue=47.9%,Clear=67.1% Illuminance=15223.2lx Color Temperature=3984.1K [17:24:04][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44225 gain reg: 0 [17:24:04][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 61.72594 % with 5 decimals of accuracy [17:24:04][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14051.04102 lx with 2 decimals of accuracy [17:24:04][D][tcs34725:248]: Got Red=57.4%,Green=49.6%,Blue=47.9%,Clear=66.2% Illuminance=14999.8lx Color Temperature=3990.9K [17:24:04][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43595 gain reg: 0 [17:24:04][D][tcs34725:248]: Got Red=57.4%,Green=49.6%,Blue=47.9%,Clear=66.4% Illuminance=15066.6lx Color Temperature=3986.6K [17:24:04][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43788 gain reg: 0 [17:24:04][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 62.27722 % with 5 decimals of accuracy [17:24:04][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.28452 % with 2 decimals of accuracy [17:24:04][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 47.73505 % with 2 decimals of accuracy [17:24:04][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14170.89844 lx with 2 decimals of accuracy [17:24:04][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14170.89844 lx with 2 decimals of accuracy [17:24:04][D][sensor:126]: 'Ambient Light Sensor Color Temperature': Sending state inf K with 2 decimals of accuracy [17:24:04][D][tcs34725:248]: Got Red=57.6%,Green=49.7%,Blue=47.9%,Clear=68.3% Illuminance=15483.4lx Color Temperature=3970.7K [17:24:04][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44992 gain reg: 0 [17:24:04][D][tcs34725:248]: Got Red=57.5%,Green=49.7%,Blue=47.9%,Clear=67.3% Illuminance=15268.9lx Color Temperature=3977.7K [17:24:04][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44375 gain reg: 0 [17:24:05][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 56.79758 % with 2 decimals of accuracy [17:24:05][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14236.72461 lx with 2 decimals of accuracy [17:24:05][D][tcs34725:248]: Got Red=57.2%,Green=49.5%,Blue=47.9%,Clear=63.7% Illuminance=14444.3lx Color Temperature=4011.5K [17:24:05][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 42004 gain reg: 0 [17:24:06][D][tcs34725:248]: Got Red=57.6%,Green=49.7%,Blue=47.9%,Clear=67.9% Illuminance=15381.3lx Color Temperature=3970.3K [17:24:06][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44730 gain reg: 0 [17:24:07][D][sensor:126]: 'Uptime Sensor': Sending state 236266.57812 s with 0 decimals of accuracy [17:24:07][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 63.14006 % with 5 decimals of accuracy [17:24:07][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14356.30176 lx with 2 decimals of accuracy [17:24:07][D][tcs34725:248]: Got Red=57.7%,Green=49.7%,Blue=47.9%,Clear=68.6% Illuminance=15540.9lx Color Temperature=3965.1K [17:24:07][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 45187 gain reg: 0 [17:24:08][D][tcs34725:248]: Got Red=57.6%,Green=49.7%,Blue=47.9%,Clear=67.6% Illuminance=15315.9lx Color Temperature=3971.9K [17:24:08][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44550 gain reg: 0 [17:24:09][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 63.63691 % with 5 decimals of accuracy [17:24:09][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 56.95683 % with 2 decimals of accuracy [17:24:09][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14464.06445 lx with 2 decimals of accuracy [17:24:09][D][tcs34725:248]: Got Red=57.7%,Green=49.7%,Blue=47.9%,Clear=68.8% Illuminance=15599.9lx Color Temperature=3960.9K [17:24:09][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 45368 gain reg: 0 [17:24:10][D][tcs34725:248]: Got Red=57.8%,Green=49.8%,Blue=48.0%,Clear=69.6% Illuminance=15779.4lx Color Temperature=3953.0K [17:24:14][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 45896 gain reg: 0 [17:24:14][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 64.12445 % with 5 decimals of accuracy [17:24:14][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.42047 % with 2 decimals of accuracy [17:24:14][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14569.87500 lx with 2 decimals of accuracy [17:24:14][D][tcs34725:248]: Got Red=57.6%,Green=49.7%,Blue=47.9%,Clear=67.7% Illuminance=15330.7lx Color Temperature=3969.6K [17:24:14][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44605 gain reg: 0 [17:24:14][D][tcs34725:248]: Got Red=57.3%,Green=49.5%,Blue=47.9%,Clear=64.6% Illuminance=14638.1lx Color Temperature=3999.2K [17:24:14][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 42599 gain reg: 0 [17:24:14][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14577.20215 lx with 2 decimals of accuracy [17:24:18][D][tcs34725:248]: Got Red=57.3%,Green=49.5%,Blue=47.9%,Clear=64.7% Illuminance=14651.6lx Color Temperature=4000.3K [17:24:18][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 42619 gain reg: 0 [17:24:18][D][sensor:126]: 'VCC Voltage': Sending state 3.00000 V with 2 decimals of accuracy [17:24:18][D][tcs34725:248]: Got Red=57.5%,Green=49.6%,Blue=47.9%,Clear=65.8% Illuminance=14907.5lx Color Temperature=3985.6K [17:24:18][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43384 gain reg: 0 [17:24:18][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.44613 % with 2 decimals of accuracy [17:24:18][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 47.81888 % with 2 decimals of accuracy [17:24:18][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14596.15625 lx with 2 decimals of accuracy [17:24:18][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14596.15625 lx with 2 decimals of accuracy [17:24:18][D][sensor:126]: 'Ambient Light Sensor Color Temperature': Sending state inf K with 2 decimals of accuracy [17:24:18][D][tcs34725:248]: Got Red=57.4%,Green=49.6%,Blue=47.9%,Clear=64.7% Illuminance=14642.5lx Color Temperature=3997.4K [17:24:19][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14637.72070 lx with 2 decimals of accuracy [17:24:19][D][tcs34725:248]: Got Red=57.7%,Green=49.7%,Blue=48.0%,Clear=66.9% Illuminance=15120.9lx Color Temperature=3968.3K [17:24:19][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44090 gain reg: 0 [17:24:20][D][tcs34725:248]: Got Red=57.7%,Green=49.7%,Blue=48.0%,Clear=66.9% Illuminance=15112.9lx Color Temperature=3968.6K [17:24:20][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44061 gain reg: 0 [17:24:21][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 64.75452 % with 5 decimals of accuracy [17:24:21][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 64.75452 % with 5 decimals of accuracy [17:24:21][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 57.22382 % with 2 decimals of accuracy [17:24:21][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14687.54980 lx with 2 decimals of accuracy [17:24:21][D][tcs34725:248]: Got Red=57.7%,Green=49.7%,Blue=48.0%,Clear=67.2% Illuminance=15182.9lx Color Temperature=3965.8K [17:24:21][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44262 gain reg: 0 [17:24:22][D][tcs34725:248]: Got Red=57.8%,Green=49.7%,Blue=48.0%,Clear=67.5% Illuminance=15248.7lx Color Temperature=3960.4K [17:24:23][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44487 gain reg: 0 [17:24:23][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14742.23242 lx with 2 decimals of accuracy [17:24:23][D][tcs34725:248]: Got Red=57.8%,Green=49.7%,Blue=48.0%,Clear=67.5% Illuminance=15248.1lx Color Temperature=3960.5K [17:24:23][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44489 gain reg: 0 [17:24:24][D][tcs34725:248]: Got Red=57.8%,Green=49.8%,Blue=48.0%,Clear=67.6% Illuminance=15259.3lx Color Temperature=3957.6K [17:24:24][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44543 gain reg: 0 [17:24:25][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 65.27256 % with 5 decimals of accuracy [17:24:25][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 57.33064 % with 2 decimals of accuracy [17:24:25][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.54816 % with 2 decimals of accuracy [17:24:25][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 47.88454 % with 2 decimals of accuracy [17:24:25][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14792.34961 lx with 2 decimals of accuracy [17:24:25][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14792.34961 lx with 2 decimals of accuracy [17:24:25][D][sensor:126]: 'Ambient Light Sensor Color Temperature': Sending state inf K with 2 decimals of accuracy [17:24:25][D][tcs34725:248]: Got Red=57.8%,Green=49.8%,Blue=48.0%,Clear=67.6% Illuminance=15253.4lx Color Temperature=3956.4K [17:24:25][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44538 gain reg: 0 [17:24:26][D][tcs34725:248]: Got Red=57.7%,Green=49.7%,Blue=48.0%,Clear=66.8% Illuminance=15083.6lx Color Temperature=3965.7K [17:24:26][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44030 gain reg: 0 [17:24:27][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14817.53223 lx with 2 decimals of accuracy [17:24:27][D][tcs34725:248]: Got Red=57.7%,Green=49.7%,Blue=48.0%,Clear=66.5% Illuminance=15019.4lx Color Temperature=3967.9K [17:24:27][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43844 gain reg: 0 [17:24:28][D][tcs34725:248]: Got Red=57.8%,Green=49.7%,Blue=48.0%,Clear=67.0% Illuminance=15116.8lx Color Temperature=3962.9K [17:24:28][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44145 gain reg: 0 [17:24:29][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14845.53418 lx with 2 decimals of accuracy [17:24:29][D][tcs34725:248]: Got Red=57.7%,Green=49.7%,Blue=48.0%,Clear=66.8% Illuminance=15093.3lx Color Temperature=3965.6K [17:24:29][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44050 gain reg: 0 [17:24:30][D][tcs34725:248]: Got Red=57.8%,Green=49.7%,Blue=48.0%,Clear=66.9% Illuminance=15091.9lx Color Temperature=3962.3K [17:24:30][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44090 gain reg: 0 [17:24:31][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14868.43848 lx with 2 decimals of accuracy [17:24:31][D][tcs34725:248]: Got Red=57.8%,Green=49.7%,Blue=48.0%,Clear=66.8% Illuminance=15069.6lx Color Temperature=3960.8K [17:24:31][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44035 gain reg: 0 [17:24:32][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.0%,Clear=67.4% Illuminance=15205.4lx Color Temperature=3954.5K [17:24:32][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44428 gain reg: 0 [17:24:33][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 65.86056 % with 5 decimals of accuracy [17:24:33][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 65.86056 % with 5 decimals of accuracy [17:24:33][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 57.48433 % with 2 decimals of accuracy [17:24:33][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14903.38086 lx with 2 decimals of accuracy [17:24:33][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.0%,Clear=67.6% Illuminance=15247.2lx Color Temperature=3952.9K [17:24:33][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44555 gain reg: 0 [17:24:34][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.1%,Clear=67.2% Illuminance=15140.0lx Color Temperature=3953.9K [17:24:34][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44276 gain reg: 0 [17:24:35][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14919.99902 lx with 2 decimals of accuracy [17:24:35][D][tcs34725:248]: Got Red=57.8%,Green=49.7%,Blue=48.0%,Clear=66.5% Illuminance=15011.0lx Color Temperature=3963.3K [17:24:35][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43856 gain reg: 0 [17:24:36][D][tcs34725:248]: Got Red=57.8%,Green=49.8%,Blue=48.1%,Clear=66.5% Illuminance=14974.6lx Color Temperature=3959.7K [17:24:36][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43810 gain reg: 0 [17:24:37][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.64055 % with 2 decimals of accuracy [17:24:37][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 47.95181 % with 2 decimals of accuracy [17:24:37][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14935.26758 lx with 2 decimals of accuracy [17:24:37][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14935.26758 lx with 2 decimals of accuracy [17:24:37][D][sensor:126]: 'Ambient Light Sensor Color Temperature': Sending state inf K with 2 decimals of accuracy [17:24:37][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.1%,Clear=67.3% Illuminance=15173.5lx Color Temperature=3951.3K [17:24:37][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44382 gain reg: 0 [17:24:38][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.1%,Clear=67.1% Illuminance=15105.9lx Color Temperature=3952.2K [17:24:38][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44205 gain reg: 0 [17:24:39][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14948.33594 lx with 2 decimals of accuracy [17:24:39][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.1%,Clear=66.8% Illuminance=15034.6lx Color Temperature=3954.1K [17:24:39][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44022 gain reg: 0 [17:24:40][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.1%,Clear=66.9% Illuminance=15059.7lx Color Temperature=3951.3K [17:24:40][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44105 gain reg: 0 [17:24:41][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14960.81738 lx with 2 decimals of accuracy [17:24:41][D][tcs34725:248]: Got Red=58.0%,Green=49.8%,Blue=48.1%,Clear=67.1% Illuminance=15092.2lx Color Temperature=3949.0K [17:24:41][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 44197 gain reg: 0 [17:24:42][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.1%,Clear=66.6% Illuminance=14986.6lx Color Temperature=3952.5K [17:24:42][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43905 gain reg: 0 [17:24:43][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14961.46680 lx with 2 decimals of accuracy [17:24:43][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.1%,Clear=66.4% Illuminance=14949.3lx Color Temperature=3954.2K [17:24:43][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43787 gain reg: 0 [17:24:44][D][tcs34725:248]: Got Red=57.9%,Green=49.8%,Blue=48.1%,Clear=66.5% Illuminance=14947.2lx Color Temperature=3952.1K [17:24:44][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43810 gain reg: 0 [17:24:45][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 66.28066 % with 5 decimals of accuracy [17:24:45][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 57.68133 % with 2 decimals of accuracy [17:24:45][D][tcs34725:248]: Got Red=58.0%,Green=49.8%,Blue=48.1%,Clear=66.6% Illuminance=14977.3lx Color Temperature=3950.1K [17:24:45][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43907 gain reg: 0 [17:24:46][D][tcs34725:248]: Got Red=58.0%,Green=49.8%,Blue=48.1%,Clear=66.5% Illuminance=14937.8lx Color Temperature=3950.1K [17:24:47][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43798 gain reg: 0 [17:24:47][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.70590 % with 2 decimals of accuracy [17:24:47][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 48.01099 % with 2 decimals of accuracy [17:24:47][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14956.66602 lx with 2 decimals of accuracy [17:24:47][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14956.66602 lx with 2 decimals of accuracy [17:24:47][D][sensor:126]: 'Ambient Light Sensor Color Temperature': Sending state inf K with 2 decimals of accuracy [17:24:47][D][tcs34725:248]: Got Red=58.0%,Green=49.8%,Blue=48.1%,Clear=66.2% Illuminance=14885.8lx Color Temperature=3951.4K [17:24:47][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43659 gain reg: 0 [17:24:48][D][tcs34725:248]: Got Red=58.0%,Green=49.8%,Blue=48.1%,Clear=66.5% Illuminance=14920.2lx Color Temperature=3947.9K [17:24:50][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43797 gain reg: 0 [17:24:50][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14952.50000 lx with 2 decimals of accuracy [17:24:50][D][tcs34725:248]: Got Red=58.0%,Green=49.8%,Blue=48.1%,Clear=66.4% Illuminance=14908.0lx Color Temperature=3947.9K [17:24:50][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43758 gain reg: 0 [17:24:51][D][tcs34725:248]: Got Red=58.1%,Green=49.8%,Blue=48.2%,Clear=66.6% Illuminance=14939.6lx Color Temperature=3944.5K [17:24:51][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43867 gain reg: 0 [17:24:51][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14950.77637 lx with 2 decimals of accuracy [17:24:51][D][tcs34725:248]: Got Red=58.1%,Green=49.9%,Blue=48.2%,Clear=66.5% Illuminance=14930.3lx Color Temperature=3943.9K [17:24:51][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43855 gain reg: 0 [17:24:52][D][tcs34725:248]: Got Red=58.1%,Green=49.8%,Blue=48.2%,Clear=66.4% Illuminance=14908.0lx Color Temperature=3943.9K [17:24:52][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43791 gain reg: 0 [17:24:53][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14949.32520 lx with 2 decimals of accuracy [17:24:53][D][tcs34725:248]: Got Red=58.1%,Green=49.9%,Blue=48.2%,Clear=66.7% Illuminance=14962.4lx Color Temperature=3940.1K [17:24:54][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43964 gain reg: 0 [17:24:54][D][tcs34725:248]: Got Red=58.1%,Green=49.9%,Blue=48.2%,Clear=66.7% Illuminance=14954.7lx Color Temperature=3939.5K [17:24:54][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43939 gain reg: 0 [17:24:55][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 66.37810 % with 5 decimals of accuracy [17:24:56][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 57.83221 % with 2 decimals of accuracy [17:24:56][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14948.65820 lx with 2 decimals of accuracy [17:24:56][D][tcs34725:248]: Got Red=58.1%,Green=49.9%,Blue=48.2%,Clear=66.6% Illuminance=14930.9lx Color Temperature=3939.9K [17:24:56][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43887 gain reg: 0 [17:24:56][D][tcs34725:248]: Got Red=58.1%,Green=49.9%,Blue=48.2%,Clear=66.7% Illuminance=14944.6lx Color Temperature=3937.6K [17:24:56][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43932 gain reg: 0 [17:24:57][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 66.40333 % with 5 decimals of accuracy [17:24:57][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 57.86306 % with 2 decimals of accuracy [17:24:57][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.76825 % with 2 decimals of accuracy [17:24:57][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 48.07340 % with 2 decimals of accuracy [17:24:57][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14947.32227 lx with 2 decimals of accuracy [17:24:57][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14947.32227 lx with 2 decimals of accuracy [17:24:57][D][sensor:126]: 'Ambient Light Sensor Color Temperature': Sending state inf K with 2 decimals of accuracy [17:24:57][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.6% Illuminance=14925.8lx Color Temperature=3937.7K [17:24:57][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43900 gain reg: 0 [17:24:58][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.6% Illuminance=14914.0lx Color Temperature=3937.1K [17:24:58][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43873 gain reg: 0 [17:24:59][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14945.24707 lx with 2 decimals of accuracy [17:24:59][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.7% Illuminance=14937.4lx Color Temperature=3935.2K [17:24:59][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43956 gain reg: 0 [17:25:00][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.5% Illuminance=14899.0lx Color Temperature=3935.5K [17:25:00][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43850 gain reg: 0 [17:25:01][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14939.90625 lx with 2 decimals of accuracy [17:25:01][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.5% Illuminance=14882.4lx Color Temperature=3935.4K [17:25:01][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43817 gain reg: 0 [17:25:02][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.6% Illuminance=14911.5lx Color Temperature=3933.8K [17:25:02][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43899 gain reg: 0 [17:25:03][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14935.75488 lx with 2 decimals of accuracy [17:25:03][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.5% Illuminance=14883.8lx Color Temperature=3933.7K [17:25:03][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43834 gain reg: 0 [17:25:04][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.5% Illuminance=14881.9lx Color Temperature=3932.9K [17:25:04][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43836 gain reg: 0 [17:25:05][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14929.84082 lx with 2 decimals of accuracy [17:25:05][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.5% Illuminance=14868.7lx Color Temperature=3932.9K [17:25:05][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43807 gain reg: 0 [17:25:06][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.5% Illuminance=14880.1lx Color Temperature=3931.7K [17:25:06][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43849 gain reg: 0 [17:25:07][D][sensor:126]: 'Uptime Sensor': Sending state 236326.57812 s with 0 decimals of accuracy [17:25:07][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14922.91309 lx with 2 decimals of accuracy [17:25:07][D][tcs34725:248]: Got Red=58.2%,Green=49.9%,Blue=48.2%,Clear=66.4% Illuminance=14838.5lx Color Temperature=3932.7K [17:25:07][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43735 gain reg: 0 [17:25:08][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=66.4% Illuminance=14849.2lx Color Temperature=3931.3K [17:25:08][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43773 gain reg: 0 [17:25:09][D][sensor:126]: 'Ambient Light Sensor Clear Channel': Sending state 66.44833 % with 5 decimals of accuracy [17:25:09][D][sensor:126]: 'Ambient Light Sensor Red Channel relative': Sending state 58.03018 % with 2 decimals of accuracy [17:25:09][D][sensor:126]: 'Ambient Light Sensor Green Channel relative': Sending state 49.83602 % with 2 decimals of accuracy [17:25:09][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 48.14580 % with 2 decimals of accuracy [17:25:09][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14915.60840 lx with 2 decimals of accuracy [17:25:09][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14915.60840 lx with 2 decimals of accuracy [17:25:09][D][sensor:126]: 'Ambient Light Sensor Color Temperature': Sending state inf K with 2 decimals of accuracy [17:25:09][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=66.4% Illuminance=14846.9lx Color Temperature=3930.4K [17:25:09][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43778 gain reg: 0 [17:25:10][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=66.4% Illuminance=14831.3lx Color Temperature=3930.3K [17:25:10][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43735 gain reg: 0 [17:25:11][D][sensor:126]: 'Ambient Light Sensor Blue Channel relative': Sending state 48.15688 % with 2 decimals of accuracy [17:25:11][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14907.65039 lx with 2 decimals of accuracy [17:25:11][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=66.4% Illuminance=14836.5lx Color Temperature=3929.8K [17:25:11][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43759 gain reg: 0 [17:25:12][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=66.1% Illuminance=14770.0lx Color Temperature=3932.1K [17:25:12][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43555 gain reg: 0 [17:25:13][D][sensor:126]: 'Ambient Light Sensor Illuminance': Sending state 14891.84863 lx with 2 decimals of accuracy [17:25:13][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=65.9% Illuminance=14722.4lx Color Temperature=3933.1K [17:25:13][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43433 gain reg: 0 [17:25:13][D][sensor:126]: 'VCC Voltage': Sending state 3.00098 V with 2 decimals of accuracy [17:25:14][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=65.9% Illuminance=14720.0lx Color Temperature=3933.0K [17:25:14][D][tcs34725:291]: Integration time: 154.5ms, ideal: 154.0ms regval_new 191 Gain: 1 Clear channel raw: 43421 gain reg: 0 ```
swifty99 commented 1 year ago

The internal calculation is OK as: [17:25:13][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=65.9% Illuminance=14722.4lx Color Temperature=3933.1K

with this code:

  ESP_LOGD(TAG,
           "Got Red=%.1f%%,Green=%.1f%%,Blue=%.1f%%,Clear=%.1f%% Illuminance=%.1flx Color "
           "Temperature=%.1fK",
           channel_r, channel_g, channel_b, channel_c, this->illuminance_, this->color_temperature_);

this value will be given to sensor properties:

   if (this->color_temperature_sensor_ != nullptr)
      this->color_temperature_sensor_->publish_state(this->color_temperature_);

At the moment I think I cannot do anything, as the value was calcualted correctly (3933.1K ). And it is not overexposed, none of the raw values reaches 100%. What you could try is take a different Node and give it different name and try once more. Another try would be to remove the filters temporary.

RubenKelevra commented 1 year ago

Alright, will do that.

So I think what happens is, that some calculations runs towards infinity and then the value gets stuck there...

That's what it looks like here in this HA-graph:

Screenshot_2023-03-02-11-44-19-824-edit_io.homeassistant.companion.android.jpg

RubenKelevra commented 1 year ago

@swifty99 wrote:

The internal calculation is OK as: [17:25:13][D][tcs34725:248]: Got Red=58.3%,Green=49.9%,Blue=48.3%,Clear=65.9% Illuminance=14722.4lx Color Temperature=3933.1K

At the moment I think I cannot do anything, as the value was calcualted correctly (3933.1K ). And it is not overexposed, none of the raw values reaches 100%. What you could try is take a different Node and give it different name and try once more. Another try would be to remove the filters temporary.

Well, actually the sensor does get overexposed: clear channel hits (nearly 100%). Guess the "nearly" 100% is not detected and thus the calculations runs off the rails.

Screenshot_2023-03-02-11-50-39-110-edit_io.homeassistant.companion.android.jpg

This is then leading to those absurd numbers I guess:

Screenshot_2023-03-02-11-50-57-065-edit_io.homeassistant.companion.android.jpg

And since the averaging filter is getting extremely large numbers, maybe even infinity, as input, the output gets stuck for longer at 'inf' even if the sensor gives new and correct values - like in the log above.

swifty99 commented 1 year ago

ok. the logging did not indicate that.

Overexposure shall be avoided. Use a filter or a different location. There is nothing the hard or software could fix.

RubenKelevra commented 1 year ago

@swifty99 so I dug in the code today, and I think I found the issue – and at least one other.

I'll tackle them and send PRs :)