Fluval Aquasky BLE RGB-Light

also it seems if i turn the bluetooth on my phone off the same old error appears.

INFO ESPHome 2026.3.3
INFO Reading configuration /config/esphome/fluvalhub.yaml...
INFO Detected timezone 'America/Los_Angeles'
INFO Starting log output from 192.168.1.139 using esphome API
INFO Successfully resolved fluvalble @ 192.168.1.139 in 0.001s
INFO Successfully connected to fluvalble @ 192.168.1.139 in 0.108s
INFO Successful handshake with fluvalble @ 192.168.1.139 in 0.018s
[15:25:13.869][I][app:231]: ESPHome version 2026.3.3 compiled on 2026-04-15 13:51:46 -0700
[15:25:13.872][I][app:238]: ESP32 Chip: ESP32 rev3.1, 2 core(s)
[15:25:13.872][W][app:247]: Set minimum_chip_revision: "3.1" to reduce binary size
[15:25:13.872][C][logger:229]: Logger:
[15:25:13.872][C][logger:229]:   Max Level: VERY_VERBOSE
[15:25:13.872][C][logger:229]:   Initial Level: VERY_VERBOSE
[15:25:13.875][C][logger:236]:   Log Baud Rate: 115200
[15:25:13.875][C][logger:236]:   Hardware UART: UART0
[15:25:13.946][C][logger:246]:   Task Log Buffer Size: 768 bytes
[15:25:13.947][C][logger:253]:   Level for 'api.service': DEBUG
[15:25:13.947][C][logger:253]:   Level for 'component': ERROR
[15:25:13.947][C][logger:253]:   Level for 'esp32_ble': DEBUG
[15:25:13.947][C][logger:253]:   Level for 'esp32_ble_tracker': DEBUG
[15:25:13.948][C][logger:253]:   Level for 'fluval_ble_led': VERY_VERBOSE
[15:25:13.948][C][logger:253]:   Level for 'i2c.arduino': INFO
[15:25:13.948][C][logger:253]:   Level for 'i2c.idf': DEBUG
[15:25:13.948][C][logger:253]:   Level for 'scheduler': DEBUG
[15:25:13.949][C][homeassistant.time:010]: Home Assistant Time
[15:25:13.953][C][time:049]: Timezone: UTC-8:00 (DST UTC-7:00)
[15:25:13.954][C][time:055]: Current time: 2026-04-17 15:25:13
[15:25:13.954][C][fluval_ble_led_channel_sensor:017]: Fluval BLE Channel Sensor 'bigtank  Channel Red'
[15:25:13.954][C][fluval_ble_led_channel_sensor:017]:   State Class: ''
[15:25:13.954][C][fluval_ble_led_channel_sensor:017]:   Unit of Measurement: ''
[15:25:13.954][C][fluval_ble_led_channel_sensor:017]:   Accuracy Decimals: 0
[15:25:13.958][C][fluval_ble_led_channel_sensor:228]:   Icon: 'mdi:lightbulb'
[15:25:13.967][C][fluval_ble_led_channel_sensor:017]: Fluval BLE Channel Sensor 'bigtank  Channel Green'
[15:25:13.967][C][fluval_ble_led_channel_sensor:017]:   State Class: ''
[15:25:13.967][C][fluval_ble_led_channel_sensor:017]:   Unit of Measurement: ''
[15:25:13.967][C][fluval_ble_led_channel_sensor:017]:   Accuracy Decimals: 0
[15:25:13.971][C][fluval_ble_led_channel_sensor:228]:   Icon: 'mdi:lightbulb'
[15:25:13.987][C][fluval_ble_led_channel_sensor:017]: Fluval BLE Channel Sensor 'bigtank  Channel Blue'
[15:25:13.987][C][fluval_ble_led_channel_sensor:017]:   State Class: ''
[15:25:13.987][C][fluval_ble_led_channel_sensor:017]:   Unit of Measurement: ''
[15:25:13.987][C][fluval_ble_led_channel_sensor:017]:   Accuracy Decimals: 0
[15:25:14.044][C][fluval_ble_led_channel_sensor:228]:   Icon: 'mdi:lightbulb'
[15:25:14.044][C][fluval_ble_led_channel_sensor:017]: Fluval BLE Channel Sensor 'bigtank  Channel White'
[15:25:14.044][C][fluval_ble_led_channel_sensor:017]:   State Class: ''
[15:25:14.044][C][fluval_ble_led_channel_sensor:017]:   Unit of Measurement: ''
[15:25:14.044][C][fluval_ble_led_channel_sensor:017]:   Accuracy Decimals: 0
[15:25:14.049][C][fluval_ble_led_channel_sensor:228]:   Icon: 'mdi:lightbulb'
[15:25:14.049][C][fluval_ble_led_mode_sensor:016]: Fluval BLE Mode Sensor 'bigtank Mode'
[15:25:14.049][C][fluval_ble_led_select_mode_button:014]: Fluval BLE LED Select Mode Button 'bigtank Switch to manual'
[15:25:14.055][C][fluval_ble_led_select_mode_button:014]: Fluval BLE LED Select Mode Button 'bigtank Switch to auto'
[15:25:14.058][C][fluval_ble_led_select_mode_button:014]: Fluval BLE LED Select Mode Button 'bigtank Switch to pro'
[15:25:14.077][C][fluval_ble_led_channel_number:016]: Fluval BLE Channel Number 'bigtank Red'
[15:25:14.090][C][fluval_ble_led_channel_number:016]: Fluval BLE Channel Number 'bigtank Channel Green'
[15:25:14.148][C][fluval_ble_led_channel_number:016]: Fluval BLE Channel Number 'bigtank Channel Blue'
[15:25:14.149][C][fluval_ble_led_channel_number:016]: Fluval BLE Channel Number 'bigtank Channel White'
[15:25:14.149][C][fluval_ble_led_switch:091]: Fluval BLE LED Switch 'bigtank LED Switch'
[15:25:14.149][C][fluval_ble_led_switch:091]:   Restore Mode: always OFF
[15:25:14.149][C][fluval_ble_led_switch:228]:   Icon: 'mdi:lightbulb'
[15:25:14.150][C][esp32_ble:679]: BLE:
[15:25:14.150][C][esp32_ble:679]:   MAC address: 10:06:1C:B4:EE:D2
[15:25:14.150][C][esp32_ble:679]:   IO Capability: none
[15:25:14.150][C][ble_client:026]: BLE Client:
[15:25:14.151][C][esp32_ble_client:081]:   Address: 44:A6:E5:65:40:68
[15:25:14.151][C][esp32_ble_client:081]:   Auto-Connect: TRUE
[15:25:14.151][C][esp32_ble_client:081]:   State: IDLE
[15:25:14.151][C][esp32_ble_tracker:687]: BLE Tracker:
[15:25:14.151][C][esp32_ble_tracker:688]:   Scan Duration: 300 s
[15:25:14.151][C][esp32_ble_tracker:688]:   Scan Interval: 320.0 ms
[15:25:14.151][C][esp32_ble_tracker:688]:   Scan Window: 30.0 ms
[15:25:14.151][C][esp32_ble_tracker:688]:   Scan Type: ACTIVE
[15:25:14.151][C][esp32_ble_tracker:688]:   Continuous Scanning: YES
[15:25:14.161][C][esp32_ble_tracker:696]:   Scanner State: RUNNING
[15:25:14.161][C][esp32_ble_tracker:696]:   Connecting: 0, discovered: 0, disconnecting: 0
[15:25:14.169][C][wifi:1517]: WiFi:
[15:25:14.169][C][wifi:1517]:   Local MAC: 10:06:1C:B4:EE:D0
[15:25:14.169][C][wifi:1517]:   Connected: YES
[15:25:14.179][C][wifi:1228]:   IP Address: 192.168.1.139
[15:25:14.179][C][wifi:1239]:   SSID: [redacted]
[15:25:14.179][C][wifi:1239]:   BSSID: [redacted]
[15:25:14.179][C][wifi:1239]:   Hostname: 'fluvalble'
[15:25:14.179][C][wifi:1239]:   Signal strength: -43 dB ▂▄▆█
[15:25:14.179][C][wifi:1239]:   Channel: 2
[15:25:14.179][C][wifi:1239]:   Subnet: 255.255.255.0
[15:25:14.179][C][wifi:1239]:   Gateway: 192.168.1.254
[15:25:14.179][C][wifi:1239]:   DNS1: 192.168.1.254
[15:25:14.179][C][wifi:1239]:   DNS2: 0.0.0.0
[15:25:14.193][C][esphome.ota:071]: Over-The-Air updates:
[15:25:14.193][C][esphome.ota:071]:   Address: fluvalble.local:3232
[15:25:14.193][C][esphome.ota:071]:   Version: 2
[15:25:14.251][C][safe_mode:026]: Safe Mode:
[15:25:14.251][C][safe_mode:026]:   Successful after: 60s
[15:25:14.251][C][safe_mode:026]:   Invoke after: 10 attempts
[15:25:14.251][C][safe_mode:026]:   Duration: 300s
[15:25:14.252][C][safe_mode:043]:   Bootloader rollback: support unknown
[15:25:14.252][C][api:237]: Server:
[15:25:14.252][C][api:237]:   Address: fluvalble.local:6053
[15:25:14.252][C][api:237]:   Listen backlog: 4
[15:25:14.252][C][api:237]:   Max connections: 8
[15:25:14.257][C][api:249]:   Noise encryption: NO
[15:25:14.258][C][fluval_ble_led:014]: Fluval LED
[15:25:14.258][C][fluval_ble_led:015]:   Address: 44:A6:E5:65:40:68
[15:25:14.258][C][fluval_ble_led:016]:   Number of channels: 4
[15:25:14.260][C][mdns:194]: mDNS:
[15:25:14.260][C][mdns:194]:   Hostname: fluvalble
[15:25:14.268][V][mdns:199]:   Services:
[15:25:14.270][V][mdns:201]:   - _esphomelib, _tcp, 6053
[15:25:14.270][V][mdns:204]:     TXT: friendly_name = fluvalble
[15:25:14.272][V][mdns:204]:     TXT: version = 2026.3.3
[15:25:14.287][V][mdns:204]:     TXT: mac = 10061cb4eed0
[15:25:14.287][V][mdns:204]:     TXT: platform = ESP32
[15:25:14.288][V][mdns:204]:     TXT: board = esp32dev
[15:25:14.293][V][mdns:204]:     TXT: network = wifi
[15:25:33.610][D][switch:021]: 'bigtank LED Switch' Turning ON.
[15:25:33.613][W][fluval_ble_led:184]: Cannot write to BLE characteristic - not connected
[15:25:33.614][D][switch:064]: 'bigtank LED Switch' >> ON
[15:25:36.279][D][switch:025]: 'bigtank LED Switch' Turning OFF.
[15:25:36.283][W][fluval_ble_led:184]: Cannot write to BLE characteristic - not connected
[15:25:36.283][D][switch:064]: 'bigtank LED Switch' >> OFF
[15:25:37.193][D][switch:021]: 'bigtank LED Switch' Turning ON.
[15:25:37.196][W][fluval_ble_led:184]: Cannot write to BLE characteristic - not connected
[15:25:37.197][D][switch:064]: 'bigtank LED Switch' >> ON
[15:25:44.054][D][switch:025]: 'bigtank LED Switch' Turning OFF.
[15:25:44.056][W][fluval_ble_led:184]: Cannot write to BLE characteristic - not connected
[15:25:44.061][D][switch:064]: 'bigtank LED Switch' >> OFF
[15:25:45.503][I][safe_mode:091]: Boot seems successful; resetting boot loop counter
[15:25:45.508][VV][esp32.preferences:043]: s_pending_save: key: 233825507, len: 4
[15:25:49.008][V][esp32.preferences:117]: Saving 1 items...
[15:25:49.060][VV][esp32.preferences:125]: Checking if NVS data 233825507 has changed
[15:25:49.071][V][esp32.preferences:128]: sync: key: 233825507, len: 4
[15:25:49.072][D][esp32.preferences:144]: Writing 1 items: 0 cached, 1 written, 0 failed
[15:25:57.058][D][switch:021]: 'bigtank LED Switch' Turning ON.
[15:25:57.064][W][fluval_ble_led:184]: Cannot write to BLE characteristic - not connected
[15:25:57.064][D][switch:064]: 'bigtank LED Switch' >> ON
[15:25:59.617][D][switch:025]: 'bigtank LED Switch' Turning OFF.
[15:25:59.628][W][fluval_ble_led:184]: Cannot write to BLE characteristic - not connected
[15:25:59.645][D][switch:064]: 'bigtank LED Switch' >> OFF
[15:26:01.255][D][switch:021]: 'bigtank LED Switch' Turning ON.
[15:26:01.270][W][fluval_ble_led:184]: Cannot write to BLE characteristic - not connected
[15:26:01.270][D][switch:064]: 'bigtank LED Switch' >> ON
[15:26:04.952][D][number:064]: 'bigtank Channel White': Setting value
[15:26:04.953][D][number:123]:   New value: 400.000000
[15:26:04.953][D][fluval_ble_led_channel_number:014]: CHANNEL MODIFIED: 400.000000
[15:26:04.956][D][number:025]: 'bigtank Channel White' >> 0.00
[15:26:04.957][V][fluval_ble_led:120]: Writing packet original: 68 04 00 00 00 00 00 00 01 90  
[15:26:04.958][V][fluval_ble_led:122]: Writing packet original + CRC: 68 04 00 00 00 00 00 00 01 90 fd  
[15:26:04.958][V][fluval_ble_led:124]: Writing packet encoded: 54 58 5a 66 0a 0e 0e 0e 0e 0e 0e 0f 9e f3  to handle 0
[15:26:04.961][V][fluval_ble_led:129]: Writing packet result: ESP_ERR_INVALID_STATE
[15:26:04.964][V][fluval_ble_led:120]: Writing packet original: 68 05  
[15:26:04.971][V][fluval_ble_led:122]: Writing packet original + CRC: 68 05 6d  
[15:26:04.982][V][fluval_ble_led:124]: Writing packet encoded: 54 50 5a 66 0b 63  to handle 0
[15:26:05.037][V][fluval_ble_led:129]: Writing packet result: ESP_ERR_INVALID_STATE
[15:26:07.915][D][button:019]: 'bigtank Switch to manual' Pressed.
[15:26:07.918][VV][fluval_ble_led_select_mode_button:014]: BUTTON PRESSED: 0 
[15:26:07.918][D][fluval_ble_led:202]: Setting mode to manual
[15:26:07.920][V][fluval_ble_led:120]: Writing packet original: 68 02 00  
[15:26:07.924][V][fluval_ble_led:122]: Writing packet original + CRC: 68 02 00 6a  
[15:26:07.927][V][fluval_ble_led:124]: Writing packet encoded: 54 51 5a 66 0c 0e 64  to handle 0
[15:26:07.931][V][fluval_ble_led:129]: Writing packet result: ESP_ERR_INVALID_STATE
[15:26:13.867][VV][api.connection:292]: Sending keepalive PING
[15:26:17.132][D][number:064]: 'bigtank Red': Setting value
[15:26:17.133][D][number:123]:   New value: 300.000000
[15:26:17.134][D][fluval_ble_led_channel_number:014]: CHANNEL MODIFIED: 300.000000
[15:26:17.134][D][number:025]: 'bigtank Red' >> 0.00
[15:26:17.145][V][fluval_ble_led:120]: Writing packet original: 68 04 01 2c 00 00 00 00 01 90  
[15:26:17.146][V][fluval_ble_led:122]: Writing packet original + CRC: 68 04 01 2c 00 00 00 00 01 90 d0  
[15:26:17.146][V][fluval_ble_led:124]: Writing packet encoded: 54 58 5a 66 0a 0f 22 0e 0e 0e 0e 0f 9e de  to handle 0
[15:26:17.151][V][fluval_ble_led:129]: Writing packet result: ESP_ERR_INVALID_STATE
[15:26:17.158][V][fluval_ble_led:120]: Writing packet original: 68 05  
[15:26:17.223][V][fluval_ble_led:122]: Writing packet original + CRC: 68 05 6d  
[15:26:17.224][V][fluval_ble_led:124]: Writing packet encoded: 54 50 5a 66 0b 63  to handle 0
[15:26:17.224][V][fluval_ble_led:129]: Writing packet result: ESP_ERR_INVALID_STATE
[15:26:20.506][D][switch:025]: 'bigtank LED Switch' Turning OFF.
[15:26:20.513][W][fluval_ble_led:184]: Cannot write to BLE characteristic - not connected
[15:26:20.514][D][switch:064]: 'bigtank LED Switch' >> OFF
[15:26:24.091][D][number:064]: 'bigtank Channel White': Setting value
[15:26:24.095][D][number:123]:   New value: 190.000000
[15:26:24.098][D][fluval_ble_led_channel_number:014]: CHANNEL MODIFIED: 190.000000
[15:26:24.102][D][number:025]: 'bigtank Channel White' >> 400.00
[15:26:24.105][V][fluval_ble_led:120]: Writing packet original: 68 04 01 2c 00 00 00 00 00 be  
[15:26:24.109][V][fluval_ble_led:122]: Writing packet original + CRC: 68 04 01 2c 00 00 00 00 00 be ff  
[15:26:24.112][V][fluval_ble_led:124]: Writing packet encoded: 54 58 5a 66 0a 0f 22 0e 0e 0e 0e 0e b0 f1  to handle 0
[15:26:24.115][V][fluval_ble_led:129]: Writing packet result: ESP_ERR_INVALID_STATE
[15:26:24.121][V][fluval_ble_led:120]: Writing packet original: 68 05  
[15:26:24.130][V][fluval_ble_led:122]: Writing packet original + CRC: 68 05 6d  
[15:26:24.184][V][fluval_ble_led:124]: Writing packet encoded: 54 50 5a 66 0b 63  to handle 0
[15:26:24.194][V][fluval_ble_led:129]: Writing packet result: ESP_ERR_INVALID_STATE
[15:26:33.808][D][esp32_ble_client:207]: [0] [44:A6:E5:65:40:68] Found device
[15:26:33.808][D][esp32_ble_tracker:716]: Found device 44:A6:E5:65:40:68 RSSI=-92
[15:26:33.808][D][esp32_ble_tracker:737]:   Address Type: PUBLIC
[15:26:33.808][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 3
[15:26:33.808][D][esp32_ble_tracker:163]: connecting: 0, discovered: 1, disconnecting: 0
[15:26:33.808][D][esp32_ble_tracker:867]: Stopping scan to make connection
[15:26:33.809][D][esp32_ble_tracker:875]: Promoting client to connect
[15:26:33.809][D][esp32_ble_tracker:911]: Setting coexistence to Bluetooth to make connection.
[15:26:33.809][I][esp32_ble_client:125]: [0] [44:A6:E5:65:40:68] 0x00 Connecting
[15:26:33.818][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 4
[15:26:33.824][D][esp32_ble_tracker:826]: Scan stop complete, set scanner state to IDLE.
[15:26:33.824][D][esp32_ble_tracker:163]: connecting: 1, discovered: 0, disconnecting: 0
[15:26:34.630][VV][app:515]: logger loop enabled from ISR
[15:26:34.650][VV][esp-idf:000][BTU_TASK]: W (111623) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:34.746][VV][app:515]: logger loop enabled from ISR
[15:26:34.759][VV][esp-idf:000][BTU_TASK]: W (111729) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:34.834][VV][app:515]: logger loop enabled from ISR
[15:26:34.841][VV][esp-idf:000][BTU_TASK]: W (111834) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.041][VV][app:515]: logger loop enabled from ISR
[15:26:35.054][VV][esp-idf:000][BTU_TASK]: W (112044) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.247][VV][app:515]: logger loop enabled from ISR
[15:26:35.252][VV][esp-idf:000][BTU_TASK]: W (112253) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.346][VV][app:515]: logger loop enabled from ISR
[15:26:35.356][VV][esp-idf:000][BTU_TASK]: W (112358) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.452][VV][app:515]: logger loop enabled from ISR
[15:26:35.461][VV][esp-idf:000][BTU_TASK]: W (112460) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.550][VV][app:515]: logger loop enabled from ISR
[15:26:35.561][VV][esp-idf:000][BTU_TASK]: W (112568) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:37.295][VV][app:515]: logger loop enabled from ISR
[15:26:37.299][VV][esp-idf:000][BTU_TASK]: W (114248) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:38.044][VV][app:515]: logger loop enabled from ISR
[15:26:38.047][VV][esp-idf:000][BTU_TASK]: W (115073) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:38.518][VV][app:515]: logger loop enabled from ISR
[15:26:38.519][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=41 gattc_if=3
[15:26:38.519][D][esp32_ble_client:379]: [0] [44:A6:E5:65:40:68] ESP_GATTC_DISCONNECT_EVT, reason 0x3e
[15:26:38.519][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 1
[15:26:38.520][V][fluval_ble_led:226]: GOT GATTC EVENT: 41
[15:26:38.520][W][fluval_ble_led:229]: Disconnected from Fluval LED. Resetting handshake.
[15:26:38.520][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=2 gattc_if=3
[15:26:38.521][D][esp32_ble_client:211]: [0] [44:A6:E5:65:40:68] ESP_GATTC_OPEN_EVT
[15:26:38.521][E][esp32_ble_client:324]: [0] [44:A6:E5:65:40:68] ESP_GATTC_OPEN_EVT in DISCONNECTING state (status=133)
[15:26:38.524][W][esp32_ble_client:223]: [0] [44:A6:E5:65:40:68] Connection open error, status=133
[15:26:38.549][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 2
[15:26:38.549][V][fluval_ble_led:226]: GOT GATTC EVENT: 2
[15:26:38.550][D][esp32_ble_tracker:163]: connecting: 0, discovered: 0, disconnecting: 0
[15:26:38.551][D][esp32_ble_tracker:915]: Setting coexistence preference to balanced.
[15:26:38.551][D][esp32_ble_tracker:246]: Starting scan, set scanner state to STARTING.
[15:26:38.556][VV][esp-idf:000][BTU_TASK]: W (115508) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:38.830][D][esp32_ble_client:207]: [0] [44:A6:E5:65:40:68] Found device
[15:26:38.831][D][esp32_ble_tracker:716]: Found device 44:A6:E5:65:40:68 RSSI=-91
[15:26:38.831][D][esp32_ble_tracker:737]:   Address Type: PUBLIC
[15:26:38.831][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 3
[15:26:38.832][D][esp32_ble_tracker:163]: connecting: 0, discovered: 1, disconnecting: 0
[15:26:38.843][D][esp32_ble_tracker:867]: Stopping scan to make connection
[15:26:38.844][D][esp32_ble_tracker:875]: Promoting client to connect
[15:26:38.844][D][esp32_ble_tracker:911]: Setting coexistence to Bluetooth to make connection.
[15:26:38.844][I][esp32_ble_client:125]: [0] [44:A6:E5:65:40:68] 0x00 Connecting
[15:26:38.851][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 4
[15:26:38.863][D][esp32_ble_tracker:826]: Scan stop complete, set scanner state to IDLE.
[15:26:38.867][D][esp32_ble_tracker:163]: connecting: 1, discovered: 0, disconnecting: 0
[15:26:39.140][VV][app:515]: logger loop enabled from ISR
[15:26:39.146][VV][esp-idf:000][BTU_TASK]: W (116138) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:39.236][VV][app:515]: logger loop enabled from ISR
[15:26:39.242][VV][esp-idf:000][BTU_TASK]: W (116244) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:39.350][VV][app:515]: logger loop enabled from ISR
[15:26:39.356][VV][esp-idf:000][BTU_TASK]: W (116348) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:39.441][VV][app:515]: logger loop enabled from ISR
[15:26:39.450][VV][esp-idf:000][BTU_TASK]: W (116453) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:39.995][VV][app:515]: logger loop enabled from ISR
[15:26:40.004][VV][esp-idf:000][BTU_TASK]: W (116978) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:40.775][VV][app:515]: logger loop enabled from ISR
[15:26:40.785][VV][esp-idf:000][BTU_TASK]: W (117803) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:41.421][VV][app:515]: logger loop enabled from ISR
[15:26:41.424][VV][esp-idf:000][BTU_TASK]: W (118448) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:41.929][VV][app:515]: logger loop enabled from ISR
[15:26:41.933][VV][esp-idf:000][BTU_TASK]: W (118958) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:42.519][VV][app:515]: logger loop enabled from ISR
[15:26:42.533][VV][esp-idf:000][BTU_TASK]: W (119498) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:42.616][VV][app:515]: logger loop enabled from ISR
[15:26:42.622][VV][esp-idf:000][BTU_TASK]: W (119601) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:42.822][VV][app:515]: logger loop enabled from ISR
[15:26:42.823][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=41 gattc_if=3
[15:26:42.823][D][esp32_ble_client:379]: [0] [44:A6:E5:65:40:68] ESP_GATTC_DISCONNECT_EVT, reason 0x3e
[15:26:42.823][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 1
[15:26:42.824][V][fluval_ble_led:226]: GOT GATTC EVENT: 41
[15:26:42.824][W][fluval_ble_led:229]: Disconnected from Fluval LED. Resetting handshake.
[15:26:42.824][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=2 gattc_if=3
[15:26:42.824][D][esp32_ble_client:211]: [0] [44:A6:E5:65:40:68] ESP_GATTC_OPEN_EVT
[15:26:42.825][E][esp32_ble_client:324]: [0] [44:A6:E5:65:40:68] ESP_GATTC_OPEN_EVT in DISCONNECTING state (status=133)
[15:26:42.831][W][esp32_ble_client:223]: [0] [44:A6:E5:65:40:68] Connection open error, status=133
[15:26:42.831][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 2
[15:26:42.832][V][fluval_ble_led:226]: GOT GATTC EVENT: 2
[15:26:42.841][D][esp32_ble_tracker:163]: connecting: 0, discovered: 0, disconnecting: 0
[15:26:42.845][D][esp32_ble_tracker:915]: Setting coexistence preference to balanced.
[15:26:42.852][D][esp32_ble_tracker:246]: Starting scan, set scanner state to STARTING.
[15:26:42.897][VV][esp-idf:000][BTU_TASK]: W (119811) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:43.395][D][esp32_ble_client:207]: [0] [44:A6:E5:65:40:68] Found device
[15:26:43.395][D][esp32_ble_tracker:716]: Found device 44:A6:E5:65:40:68 RSSI=-92
[15:26:43.395][D][esp32_ble_tracker:737]:   Address Type: PUBLIC
[15:26:43.396][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 3
[15:26:43.396][D][esp32_ble_tracker:163]: connecting: 0, discovered: 1, disconnecting: 0
[15:26:43.396][D][esp32_ble_tracker:867]: Stopping scan to make connection
[15:26:43.397][D][esp32_ble_tracker:875]: Promoting client to connect
[15:26:43.397][D][esp32_ble_tracker:911]: Setting coexistence to Bluetooth to make connection.
[15:26:43.401][I][esp32_ble_client:125]: [0] [44:A6:E5:65:40:68] 0x00 Connecting
[15:26:43.402][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 4
[15:26:43.410][D][esp32_ble_tracker:826]: Scan stop complete, set scanner state to IDLE.
[15:26:43.436][D][esp32_ble_tracker:163]: connecting: 1, discovered: 0, disconnecting: 0
[15:26:43.537][VV][app:515]: logger loop enabled from ISR
[15:26:43.545][VV][esp-idf:000][BTU_TASK]: W (120548) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:44.783][VV][app:515]: logger loop enabled from ISR
[15:26:44.797][VV][esp-idf:000][BTU_TASK]: W (121812) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:45.217][VV][app:515]: logger loop enabled from ISR
[15:26:45.233][VV][esp-idf:000][BTU_TASK]: W (122222) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:45.413][VV][app:515]: logger loop enabled from ISR
[15:26:45.426][VV][esp-idf:000][BTU_TASK]: W (122439) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:46.609][VV][app:515]: logger loop enabled from ISR
[15:26:46.615][VV][esp-idf:000][BTU_TASK]: W (123578) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:47.127][VV][app:515]: logger loop enabled from ISR
[15:26:47.133][VV][esp-idf:000][BTU_TASK]: W (124118) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:47.940][VV][app:515]: logger loop enabled from ISR
[15:26:47.949][VV][esp-idf:000][BTU_TASK]: W (124958) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:48.463][VV][app:515]: logger loop enabled from ISR
[15:26:48.467][VV][esp-idf:000][BTU_TASK]: W (125483) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:48.873][VV][app:515]: logger loop enabled from ISR
[15:26:48.879][VV][esp-idf:000][BTU_TASK]: W (125901) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:49.382][VV][app:515]: logger loop enabled from ISR
[15:26:49.383][VV][esp-idf:000][BTU_TASK]: W (126309) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:49.383][VV][app:515]: logger loop enabled from ISR
[15:26:49.390][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=41 gattc_if=3
[15:26:49.391][D][esp32_ble_client:379]: [0] [44:A6:E5:65:40:68] ESP_GATTC_DISCONNECT_EVT, reason 0x3e
[15:26:49.391][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 1
[15:26:49.391][V][fluval_ble_led:226]: GOT GATTC EVENT: 41
[15:26:49.400][W][fluval_ble_led:229]: Disconnected from Fluval LED. Resetting handshake.
[15:26:49.401][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=2 gattc_if=3
[15:26:49.405][D][esp32_ble_client:211]: [0] [44:A6:E5:65:40:68] ESP_GATTC_OPEN_EVT
[15:26:49.406][E][esp32_ble_client:324]: [0] [44:A6:E5:65:40:68] ESP_GATTC_OPEN_EVT in DISCONNECTING state (status=133)
[15:26:49.423][W][esp32_ble_client:223]: [0] [44:A6:E5:65:40:68] Connection open error, status=133
[15:26:49.434][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 2
[15:26:49.434][V][fluval_ble_led:226]: GOT GATTC EVENT: 2
[15:26:49.438][D][esp32_ble_tracker:163]: connecting: 0, discovered: 0, disconnecting: 0
[15:26:49.442][D][esp32_ble_tracker:915]: Setting coexistence preference to balanced.
[15:26:49.449][D][esp32_ble_tracker:246]: Starting scan, set scanner state to STARTING.
[15:26:49.458][VV][esp-idf:000][BTU_TASK]: W (126413) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:50.194][D][esp32_ble_client:207]: [0] [44:A6:E5:65:40:68] Found device
[15:26:50.194][D][esp32_ble_tracker:716]: Found device 44:A6:E5:65:40:68 RSSI=-91
[15:26:50.195][D][esp32_ble_tracker:737]:   Address Type: PUBLIC
[15:26:50.195][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 3
[15:26:50.195][D][esp32_ble_tracker:163]: connecting: 0, discovered: 1, disconnecting: 0
[15:26:50.199][D][esp32_ble_tracker:867]: Stopping scan to make connection
[15:26:50.200][D][esp32_ble_tracker:875]: Promoting client to connect
[15:26:50.200][D][esp32_ble_tracker:911]: Setting coexistence to Bluetooth to make connection.
[15:26:50.200][I][esp32_ble_client:125]: [0] [44:A6:E5:65:40:68] 0x00 Connecting
[15:26:50.205][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 4
[15:26:50.216][D][esp32_ble_tracker:826]: Scan stop complete, set scanner state to IDLE.
[15:26:50.245][D][esp32_ble_tracker:163]: connecting: 1, discovered: 0, disconnecting: 0
[15:26:50.402][VV][app:515]: logger loop enabled from ISR
[15:26:50.406][VV][esp-idf:000][BTU_TASK]: W (127370) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1

this section shows up when i turn off Bluetooth on my cell and it just loops.

15:26:33.808][D][esp32_ble_client:207]: [0] [44:A6:E5:65:40:68] Found device
[15:26:33.808][D][esp32_ble_tracker:716]: Found device 44:A6:E5:65:40:68 RSSI=-92
[15:26:33.808][D][esp32_ble_tracker:737]:   Address Type: PUBLIC
[15:26:33.808][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 3
[15:26:33.808][D][esp32_ble_tracker:163]: connecting: 0, discovered: 1, disconnecting: 0
[15:26:33.808][D][esp32_ble_tracker:867]: Stopping scan to make connection
[15:26:33.809][D][esp32_ble_tracker:875]: Promoting client to connect
[15:26:33.809][D][esp32_ble_tracker:911]: Setting coexistence to Bluetooth to make connection.
[15:26:33.809][I][esp32_ble_client:125]: [0] [44:A6:E5:65:40:68] 0x00 Connecting
[15:26:33.818][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 4
[15:26:33.824][D][esp32_ble_tracker:826]: Scan stop complete, set scanner state to IDLE.
[15:26:33.824][D][esp32_ble_tracker:163]: connecting: 1, discovered: 0, disconnecting: 0
[15:26:34.630][VV][app:515]: logger loop enabled from ISR
[15:26:34.650][VV][esp-idf:000][BTU_TASK]: W (111623) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:34.746][VV][app:515]: logger loop enabled from ISR
[15:26:34.759][VV][esp-idf:000][BTU_TASK]: W (111729) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:34.834][VV][app:515]: logger loop enabled from ISR
[15:26:34.841][VV][esp-idf:000][BTU_TASK]: W (111834) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.041][VV][app:515]: logger loop enabled from ISR
[15:26:35.054][VV][esp-idf:000][BTU_TASK]: W (112044) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.247][VV][app:515]: logger loop enabled from ISR
[15:26:35.252][VV][esp-idf:000][BTU_TASK]: W (112253) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.346][VV][app:515]: logger loop enabled from ISR
[15:26:35.356][VV][esp-idf:000][BTU_TASK]: W (112358) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.452][VV][app:515]: logger loop enabled from ISR
[15:26:35.461][VV][esp-idf:000][BTU_TASK]: W (112460) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:35.550][VV][app:515]: logger loop enabled from ISR
[15:26:35.561][VV][esp-idf:000][BTU_TASK]: W (112568) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:37.295][VV][app:515]: logger loop enabled from ISR
[15:26:37.299][VV][esp-idf:000][BTU_TASK]: W (114248) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:38.044][VV][app:515]: logger loop enabled from ISR
[15:26:38.047][VV][esp-idf:000][BTU_TASK]: W (115073) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:38.518][VV][app:515]: logger loop enabled from ISR
[15:26:38.519][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=41 gattc_if=3
[15:26:38.519][D][esp32_ble_client:379]: [0] [44:A6:E5:65:40:68] ESP_GATTC_DISCONNECT_EVT, reason 0x3e
[15:26:38.519][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 1
[15:26:38.520][V][fluval_ble_led:226]: GOT GATTC EVENT: 41
[15:26:38.520][W][fluval_ble_led:229]: Disconnected from Fluval LED. Resetting handshake.
[15:26:38.520][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=2 gattc_if=3
[15:26:38.521][D][esp32_ble_client:211]: [0] [44:A6:E5:65:40:68] ESP_GATTC_OPEN_EVT
[15:26:38.521][E][esp32_ble_client:324]: [0] [44:A6:E5:65:40:68] ESP_GATTC_OPEN_EVT in DISCONNECTING state (status=133)
[15:26:38.524][W][esp32_ble_client:223]: [0] [44:A6:E5:65:40:68] Connection open error, status=133
[15:26:38.549][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 2
[15:26:38.549][V][fluval_ble_led:226]: GOT GATTC EVENT: 2
[15:26:38.550][D][esp32_ble_tracker:163]: connecting: 0, discovered: 0, disconnecting: 0
[15:26:38.551][D][esp32_ble_tracker:915]: Setting coexistence preference to balanced.
[15:26:38.551][D][esp32_ble_tracker:246]: Starting scan, set scanner state to STARTING.
[15:26:38.556][VV][esp-idf:000][BTU_TASK]: W (115508) BT_HCI: hcif disc complete: hdl 0x0, rsn 0x3e dev_find 1
[15:26:38.830][D][esp32_ble_client:207]: [0] [44:A6:E5:65:40:68] Found device
[15:26:38.831][D][esp32_ble_tracker:716]: Found device 44:A6:E5:65:40:68 RSSI=-91
[15:26:38.831][D][esp32_ble_tracker:737]:   Address Type: PUBLIC
[15:26:38.831][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 3
[15:26:38.832][D][esp32_ble_tracker:163]: connecting: 0, discovered: 1, disconnecting: 0
[15:26:38.843][D][esp32_ble_tracker:867]: Stopping scan to make connection
[15:26:38.844][D][esp32_ble_tracker:875]: Promoting client to connect
[15:26:38.844][D][esp32_ble_tracker:911]: Setting coexistence to Bluetooth to make connection.
[15:26:38.844][I][esp32_ble_client:125]: [0] [44:A6:E5:65:40:68] 0x00 Connecting
[15:26:38.851][V][esp32_ble_client:045]: [0] [44:A6:E5:65:40:68] Set state 4
[15:26:38.863][D][esp32_ble_tracker:826]: Scan stop complete, set scanner state to IDLE.
[15:26:38.867][D][esp32_ble_tracker:163]: connecting: 1, discovered: 0, disconnecting: 0
[15:26:39.140][VV][app:515]: logger loop enabled from ISR

Hi @11binary00,

ok, this is even stranger. The log from the previous posting, where you said it connected but did not react, it did not really connect at all, not detecting the light.

When you turn your bluetooth off the phone on, the tracker picks up the ble device:

[15:26:33.808][D][esp32_ble_client:207]: [0] [44:A6:E5:65:40:68] Found device
[15:26:33.808][D][esp32_ble_tracker:716]: Found device 44:A6:E5:65:40:68 RSSI=-92

but fails to connect to it.

From that line I can see that RSSI is -92. That’s the signal strength, and -92 is very very low. How far is the esp32 away from the tank? I have mine just below the tank and it’s at -82 which is already barely enough. I guess, the water will shield it quite well…

So try moving it around a bit and watch that RSSI value…

Edit: Higher value means better, so -82 is better than -92, etc.

best regards
mrzottel

i moved the esp to right on top of where the power cable goes into the light bar and it started to work. thank you so much for the help troubleshooting. should i delete the fluval app? are the pro mode and auto mode settings saved to the light it self? or will it loose those setting if i delete the app.

now to work on automations.
thanks so much again.

[16:36:45.844][C][mdns:194]:   Hostname: fluvalble
[16:36:45.853][V][mdns:199]:   Services:
[16:36:45.853][V][mdns:201]:   - _esphomelib, _tcp, 6053
[16:36:45.857][V][mdns:204]:     TXT: friendly_name = fluvalble
[16:36:45.860][V][mdns:204]:     TXT: version = 2026.3.3
[16:36:45.866][V][mdns:204]:     TXT: mac = 10061cb4eed0
[16:36:45.871][V][mdns:204]:     TXT: platform = ESP32
[16:36:45.874][V][mdns:204]:     TXT: board = esp32dev
[16:36:45.878][V][mdns:204]:     TXT: network = wifi
[16:37:05.702][D][switch:025]: 'bigtank LED Switch' Turning OFF.
[16:37:05.704][D][fluval_ble_led:193]: Turning LED off
[16:37:05.705][V][fluval_ble_led:120]: Writing packet original: 68 03 00  
[16:37:05.710][V][fluval_ble_led:122]: Writing packet original + CRC: 68 03 00 6b  
[16:37:05.713][V][fluval_ble_led:124]: Writing packet encoded: 54 51 5a 66 0d 0e 65  to handle 21
[16:37:05.714][V][fluval_ble_led:129]: Writing packet result: ESP_OK
[16:37:05.716][D][switch:064]: 'bigtank LED Switch' >> OFF
[16:37:05.793][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=4 gattc_if=3
[16:37:05.793][V][esp32_ble_client:219]: [0] [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT
[16:37:05.794][V][fluval_ble_led:226]: GOT GATTC EVENT: 4
[16:37:05.794][D][fluval_ble_led:323]: [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT (Write confirmed)
[16:37:08.260][D][switch:021]: 'bigtank LED Switch' Turning ON.
[16:37:08.265][D][fluval_ble_led:189]: Turning LED on
[16:37:08.266][V][fluval_ble_led:120]: Writing packet original: 68 03 01  
[16:37:08.266][V][fluval_ble_led:122]: Writing packet original + CRC: 68 03 01 6a  
[16:37:08.269][V][fluval_ble_led:124]: Writing packet encoded: 54 51 5a 66 0d 0f 64  to handle 21
[16:37:08.274][V][fluval_ble_led:129]: Writing packet result: ESP_OK
[16:37:08.279][D][switch:064]: 'bigtank LED Switch' >> ON
[16:37:08.352][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=4 gattc_if=3
[16:37:08.361][V][esp32_ble_client:219]: [0] [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT
[16:37:08.361][V][fluval_ble_led:226]: GOT GATTC EVENT: 4
[16:37:08.361][D][fluval_ble_led:323]: [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT (Write confirmed)
[16:37:09.795][D][switch:025]: 'bigtank LED Switch' Turning OFF.
[16:37:09.799][D][fluval_ble_led:193]: Turning LED off
[16:37:09.808][V][fluval_ble_led:120]: Writing packet original: 68 03 00  
[16:37:09.808][V][fluval_ble_led:122]: Writing packet original + CRC: 68 03 00 6b  
[16:37:09.816][V][fluval_ble_led:124]: Writing packet encoded: 54 51 5a 66 0d 0e 65  to handle 21
[16:37:09.817][V][fluval_ble_led:129]: Writing packet result: ESP_OK
[16:37:09.817][D][switch:064]: 'bigtank LED Switch' >> OFF
[16:37:09.890][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=4 gattc_if=3
[16:37:09.900][V][esp32_ble_client:219]: [0] [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT
[16:37:09.900][V][fluval_ble_led:226]: GOT GATTC EVENT: 4
[16:37:09.900][D][fluval_ble_led:323]: [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT (Write confirmed)
[16:37:48.413][D][number:064]: 'bigtank Channel Green': Setting value
[16:37:48.413][D][number:123]:   New value: 1000.000000
[16:37:48.414][D][fluval_ble_led_channel_number:014]: CHANNEL MODIFIED: 1000.000000
[16:37:48.414][D][number:025]: 'bigtank Channel Green' >> 0.00
[16:37:48.431][V][fluval_ble_led:120]: Writing packet original: 68 04 00 00 03 e8 00 00 00 00  
[16:37:48.432][V][fluval_ble_led:122]: Writing packet original + CRC: 68 04 00 00 03 e8 00 00 00 00 87  
[16:37:48.432][V][fluval_ble_led:124]: Writing packet encoded: 54 58 5a 66 0a 0e 0e 0d e6 0e 0e 0e 0e 89  to handle 21
[16:37:48.433][V][fluval_ble_led:129]: Writing packet result: ESP_OK
[16:37:48.440][V][fluval_ble_led:120]: Writing packet original: 68 05  
[16:37:48.441][V][fluval_ble_led:122]: Writing packet original + CRC: 68 05 6d  
[16:37:48.495][V][fluval_ble_led:124]: Writing packet encoded: 54 50 5a 66 0b 63  to handle 21
[16:37:48.495][V][fluval_ble_led:129]: Writing packet result: ESP_OK
[16:37:48.496][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=4 gattc_if=3
[16:37:48.496][V][esp32_ble_client:219]: [0] [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT
[16:37:48.496][V][fluval_ble_led:226]: GOT GATTC EVENT: 4
[16:37:48.497][D][fluval_ble_led:323]: [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT (Write confirmed)
[16:37:48.602][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=4 gattc_if=3
[16:37:48.603][V][esp32_ble_client:219]: [0] [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT
[16:37:48.603][V][fluval_ble_led:226]: GOT GATTC EVENT: 4
[16:37:48.604][D][fluval_ble_led:323]: [44:A6:E5:65:40:68] ESP_GATTC_WRITE_CHAR_EVT (Write confirmed)
[16:37:48.650][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=10 gattc_if=3
[16:37:48.702][V][esp32_ble_client:219]: [0] [44:A6:E5:65:40:68] ESP_GATTC_NOTIFY_EVT
[16:37:48.703][V][fluval_ble_led:226]: GOT GATTC EVENT: 10
[16:37:48.703][VV][fluval_ble_led:353]: [44:A6:E5:65:40:68] ESP_GATTC_NOTIFY_EVT: handle=0x24, value=0x54, len=20
[16:37:48.703][VV][fluval_ble_led:356]: Data Encrypted: \xb4\x96\xfe?< 
[16:37:48.707][VV][fluval_ble_led:366]: Data Ecrypted: <\xa1\xfe?9 
[16:37:48.707][V][fluval_ble_led:050]: Found decyption key: 0xfb
[16:37:48.708][VV][fluval_ble_led:374]: GOT START PACKET
[16:37:48.708][VV][fluval_ble_led:378]: New Vector contents: 68 05 01 06 00 09 00 64 64 64 64 10 00 14 00 1d 00  
[16:37:48.709][V][esp32_ble_client:288]: [0] [44:A6:E5:65:40:68] gattc_event_handler: event=10 gattc_if=3
[16:37:48.709][V][esp32_ble_client:219]: [0] [44:A6:E5:65:40:68] ESP_GATTC_NOTIFY_EVT
[16:37:48.709][V][fluval_ble_led:226]: GOT GATTC EVENT: 10

Hi @11binary00,

great to hear! Sometimes something as simple as “too far away” causes the strangest issues… :slight_smile:

I would not delete the app. The pro and auto modes are quite complex to put into a component, especialy if they would require some weird UI stuff I have no idea about. (Custom card or something…)

So my usual use case is, that I configured pro mode with the light profile I want for one tank, and use the component to switch between pro (following the light profile) and manual (lights on if I need to work on the tank when it’s dark).

On the other tank, I had it on manual only and switch the light based on sun up / sun down times, with a bit of a ramp up. So more control by HA itself than just switching modes.

If you use the app on a light, the light most likely will loose connection to the ESP32, and possibly the ESP32 will steal the connection back, so only having one active at a time is best. But as long as the app is not connected to a light, you can of course keep the app and also bluetooth enabled on your phone.

edit: Aaaaand I completely forgot to answer your question: Pro/Auto mode settings are saved on the light itself. So it’s perfectly fine to create a light profile in the app, save it to the light, and then never open the app again and just switch modes =)

Best regards
mrzottel

awesome suggestions…

heres what me and A.I. came up with.

my automation

alias: "Aquarium Solar Cycle Final"
description: "Syncs Fluval BLE with Solar/Mode templates, handles maintenance and storms."
trigger:
  - platform: time_pattern
    seconds: "/30"
  - platform: state
    entity_id: 
      - button.aquarium_manual_storm
      - input_boolean.aquarium_maintenance_mode
      - input_select.aquarium_mode # Instant response when you change modes
action:
  - choose:
      # 1. MAINTENANCE MODE
      - conditions:
          - condition: state
            entity_id: input_boolean.aquarium_maintenance_mode
            state: "on"
        sequence:
          - service: switch.turn_off
            target:
              entity_id: switch.kitchentank
          - service: switch.turn_on
            target:
              entity_id: switch.fluvalble_bigtank_led_switch
          - service: number.set_value
            target:
              entity_id:
                - number.fluvalble_bigtank_channel_white
                - number.fluvalble_bigtank_channel_green
                - number.fluvalble_bigtank_red
                - number.fluvalble_bigtank_channel_blue
            data:
              value: 1000

      # 2. POWER OFF AT MIDNIGHT
      - conditions:
          - condition: time
            after: "23:59:45"
            before: "00:00:15"
        sequence:
          - service: switch.turn_off
            target:
              entity_id: switch.fluvalble_bigtank_led_switch

      # 3. POWER ON DURING DAYLIGHT
      - conditions:
          - condition: sun
            after: sunrise
          - condition: time
            before: "23:59:00"
          - condition: state
            entity_id: switch.fluvalble_bigtank_led_switch
            state: "off"
        sequence:
          - service: switch.turn_on
            target:
              entity_id: 
                - switch.fluvalble_bigtank_led_switch
                - switch.kitchentank

      # 4. STORM MODE
      - conditions:
          - condition: state
            entity_id: binary_sensor.aquarium_storm_active
            state: "on"
        sequence:
          - service: number.set_value
            target:
              entity_id: 
                - number.fluvalble_bigtank_red
                - number.fluvalble_bigtank_channel_green
            data:
              value: 10
          - repeat:
              count: "{{ range(4, 10) | random }}"
              sequence:
                - service: number.set_value
                  target:
                    entity_id: 
                      - number.fluvalble_bigtank_channel_white
                      - number.fluvalble_bigtank_channel_blue
                  data:
                    value: 1000
                - delay: "00:00:00.2"
                - service: number.set_value
                  target:
                    entity_id: 
                      - number.fluvalble_bigtank_channel_white
                      - number.fluvalble_bigtank_channel_blue
                  data:
                    value: 30
                - delay: "00:00:{{ range(1, 3) | random }}"

    # 5. DEFAULT (Solar Ramps with Bluetooth Delays)
    default:
      - service: number.set_value
        target:
          entity_id: number.fluvalble_bigtank_red
        data:
          value: "{{ states('sensor.aquarium_red_intensity') | float(0) }}"
      - delay: "00:00:01"
      
      - service: number.set_value
        target:
          entity_id: number.fluvalble_bigtank_channel_green
        data:
          value: "{{ states('sensor.aquarium_daylight_intensity') | float(0) }}"
      - delay: "00:00:01"
      
      - service: number.set_value
        target:
          entity_id: number.fluvalble_bigtank_channel_white
        data:
          value: "{{ states('sensor.aquarium_daylight_intensity') | float(0) }}"
      - delay: "00:00:01"
      
      - service: number.set_value
        target:
          entity_id: number.fluvalble_bigtank_channel_blue
        data:
          value: "{{ states('sensor.aquarium_moonlight_intensity') | float(0) }}"
      
      # Safety Check for Filter
      - if:
          - condition: state
            entity_id: switch.kitchentank
            state: "off"
          - condition: state
            entity_id: input_boolean.aquarium_maintenance_mode
            state: "off"
        then:
          - service: switch.turn_on
            target:
              entity_id: switch.kitchentank
mode: restart

my template.

template:
  - sensor:
      - name: "Aquarium Daylight Intensity"
        unique_id: aquarium_daylight_intensity
        state: >
          {% set mode = states('input_select.aquarium_mode') %}
          {% set now_ts = now().timestamp() %}
          {% set noon = today_at("12:00").timestamp() %}
          {% set sunrise = state_attr('sun.sun', 'next_rising') | as_timestamp if state_attr('sun.sun', 'next_rising') else today_at("06:00").timestamp() %}
          {% set sunset = state_attr('sun.sun', 'next_setting') | as_timestamp if state_attr('sun.sun', 'next_setting') else today_at("18:00").timestamp() %}
          
          {# Handle Sunrise/Sunset being tomorrow or yesterday #}
          {% if sunrise > now_ts + 43200 %}{% set sunrise = sunrise - 86400 %}{% endif %}
          {% if sunset < now_ts - 43200 %}{% set sunset = sunset + 86400 %}{% endif %}

          {# 1. Set Peak based on Mode #}
          {% if mode == 'Blackwater' %} {% set peak = 600 %}
          {% elif mode == 'Deep Blue' %} {% set peak = 400 %}
          {% elif mode == 'Golden Hour' %} {% set peak = 700 %}
          {% else %} {% set peak = 1000 %}
          {% endif %}

          {# 2. Apply Cloud Reduction (30%) if weather is gloomy #}
          {% set weather = states('weather.home') %}
          {% if weather in ['cloudy', 'rainy', 'lightning-rainy', 'pouring', 'fog'] %}
            {% set peak = (peak * 0.7) %}
          {% endif %}

          {# 3. Calculate Base Solar Curve #}
          {% if sunrise <= now_ts <= noon %}
            {% set base = ((now_ts - sunrise) / (noon - sunrise) * peak) %}
          {% elif noon < now_ts <= sunset %}
            {% set base = (peak - ((now_ts - noon) / (sunset - noon) * peak)) %}
          {% else %}
            {% set base = 0 %}
          {% endif %}

          {{ base | round(0) | clamp(0, 1000) }}

      - name: "Aquarium Red Intensity"
        unique_id: aquarium_red_intensity
        state: >
          {% set mode = states('input_select.aquarium_mode') %}
          {% set now_ts = now().timestamp() %}
          {% set noon = today_at("12:00").timestamp() %}
          {% set sunset = state_attr('sun.sun', 'next_setting') | as_timestamp if state_attr('sun.sun', 'next_setting') else today_at("18:00").timestamp() %}
          {% set midnight = today_at("23:59").timestamp() %}
          {% if sunset < now_ts - 43200 %}{% set sunset = sunset + 86400 %}{% endif %}

          {# MODE PRIORITY CHECK #}
          {% if mode == 'Deep Blue' %}
             0
          {% elif mode == 'Viewing' %}
             {{ (states('sensor.aquarium_daylight_intensity') | float(0) * 0.15) | round(0) }}
          {% elif mode == 'Plant Growth' %}
             800
          
          {# AFTERNOON PEAK CHECK (Standard, Blackwater, Golden Hour) #}
          {% elif noon <= now_ts < sunset %}
             1000

          {# MORNING RAMP #}
          {% elif now_ts < noon %}
             {{ states('sensor.aquarium_daylight_intensity') | float(0) }}

          {# NIGHT RAMP DOWN #}
          {% elif now_ts >= sunset %}
             {{ (1000 - ((now_ts - sunset) / (midnight - sunset) * 1000)) | round(0) | clamp(0, 1000) }}
          {% else %}
             0
          {% endif %}

      - name: "Aquarium Moonlight Intensity"
        unique_id: aquarium_moonlight_intensity
        state: >
          {% set mode = states('input_select.aquarium_mode') %}
          {% set now_ts = now().timestamp() %}
          {% set sunset = state_attr('sun.sun', 'next_setting') | as_timestamp if state_attr('sun.sun', 'next_setting') else today_at("18:00").timestamp() %}
          {% set midnight = today_at("23:59").timestamp() %}
          {% if sunset < now_ts - 43200 %}{% set sunset = sunset + 86400 %}{% endif %}

          {% if mode == 'Deep Blue' %}
             {% if now_ts < sunset %} 800
             {% else %} {{ (800 - ((now_ts - sunset) / (midnight - sunset) * 800)) | round(0) | clamp(0, 800) }}
             {% endif %}
          {% elif mode == 'Viewing' %}
             {{ (states('sensor.aquarium_daylight_intensity') | float(0) * 0.4) | round(0) }}
          {% else %}
             {% if now_ts < sunset %}
               {{ (states('sensor.aquarium_daylight_intensity') | float(0) * 0.5) | round(0) }}
             {% else %}
               {{ (500 - ((now_ts - sunset) / (midnight - sunset) * 500)) | round(0) | clamp(0, 500) }}
             {% endif %}
          {% endif %}

Hi @11binary00,

that looks great! I might “steal” a bit of that, since I never got around to implement a “storm” mode :).
AI has come a long way I have to admit.

I’m glad it works for you now! The coimponent also keeps the internal clock of the fluval lights updated, so even the auto/pro profiles are somewhat ok to use and won’t turn on the light at midnight if there was a power outage…

Also, if you are controling the light via HA automations, I suggest you add an RSSI sensor to monitor signal strength, just in case you want to move that ESP32 somewhere else:

sensor:
  - platform: ble_client
    type: rssi
    ble_client_id: bigtankClient
    name: "RSSI Big Tank"

Ideally, you want to keep RSSI above -80, with -50 to -70 being a good connection, -70 to -80 being “ok, but on the edge” and anything above -50 being excellent.

best regards
mrzottel

the formatting got weird so i delete my last post and made my own thread about the controller i updated it with biomes and animations

heres the link link to code