I made a Custom Component for my Sec-Touch Ventilation Central controller

Hello everyone!

I have a decentralized ventilation central controller SEC-Touch in my house and have been looking for a long time for a way to integrate it with the home assistant.

The company itself sells a “gateway” that can be used to control the fans, but it NEEDS internet to work. Something I really don’t like for a +200 euro device.

So I’ve been working on my first external ESPHome component for a few months to be able to control the device, and now I have the first working version.

Right now it can only control the speed of the fans, or put them in special “speed states” like “time” or “storm”, but if you integrate it into the home assistant, all the other functions aren’t really needed.

Here is how I mounted it:

This is how I managed to show it on HA:

And the native ESPHome web server:

Hope it helps someone!

2 Likes

Hi @distante,

thank you so much for publishing this project. Getting my dumb SEVi 160 integrated into Home Assistant has been on top of my smart home wish list for long time.

I have already contacted the manufacturer and asked them if they would be willing to add an integration to Home Assistant. Unsurprisingly there hasn’t been any positive feedback and they recommended buying their overpriced cloud-brick :man_shrugging:

Right after seeing your post I got really excited and ordered the ESP you linked in your GitHub repo through AZdelivery.

I’m now facing two problems.

  1. The first being, when I install the program using ESPHome the webserver on the device is correctly installed and I can visit the UI using my browser. But as soon as I reboot the device, the program is wiped from the ESP. Well, for the time being I worked around it simply wiring up the ESP with the SEC Touch and then installing the program OTA.

  2. The bigger problem I’m facing is, the program simply doesn’t seem to do anything. I can alter the settings in the UI as much as I like, the fans of my ventilation system just stay on the same level and also the SEC Touch UI won’t show any changed values.

Here is the some of the output of my log:

[15:41:33][C][api:140]: API Server:
[15:41:33][C][api:141]:   Address: wroom32.local:6053
[15:41:33][C][api:143]:   Using noise encryption: YES
[15:41:35][D][sec-touch:041]: SEC-Touch update
[15:41:35][D][sec-touch:307]: No property ids are registered for recursive tasks
[15:41:35][D][sec-touch:277]: process_get_queue "data-get-queue" with size 30
[15:41:35][D][sec-touch:283]: Task targetType "LABEL" and property_id "78"
[15:41:35][D][sec-touch-uart:357]: send_get_message
[15:41:35][D][sec-touch-uart:366]:   buffer 32800	78	35235

[15:41:40][D][sec-touch:041]: SEC-Touch update
[15:41:40][D][sec-touch:307]: No property ids are registered for recursive tasks
[15:41:40][D][sec-touch:277]: process_get_queue "data-get-queue" with size 36
[15:41:40][D][sec-touch:283]: Task targetType "LABEL" and property_id "78"
[15:41:40][D][sec-touch-uart:357]: send_get_message
[15:41:40][D][sec-touch-uart:366]:   buffer 32800	78	35235

[15:41:45][D][sec-touch:041]: SEC-Touch update
[15:41:45][D][sec-touch:307]: No property ids are registered for recursive tasks
[15:41:45][D][sec-touch:277]: process_get_queue "data-get-queue" with size 42
[15:41:45][D][sec-touch:283]: Task targetType "LABEL" and property_id "78"
[15:41:45][D][sec-touch-uart:357]: send_get_message
[15:41:45][D][sec-touch-uart:366]:   buffer 32800	78	35235

[15:41:50][D][sec-touch:041]: SEC-Touch update
[15:41:50][D][sec-touch:307]: No property ids are registered for recursive tasks
[15:41:50][D][sec-touch:277]: process_get_queue "data-get-queue" with size 48
[15:41:50][D][sec-touch:283]: Task targetType "LABEL" and property_id "78"
[15:41:50][D][sec-touch-uart:357]: send_get_message
[15:41:50][D][sec-touch-uart:366]:   buffer 32800	78	35235

[15:41:55][D][sec-touch:041]: SEC-Touch update
[15:41:55][D][sec-touch:307]: No property ids are registered for recursive tasks
[15:41:55][D][sec-touch:277]: process_get_queue "data-get-queue" with size 54
[15:41:55][D][sec-touch:283]: Task targetType "LABEL" and property_id "78"
[15:41:55][D][sec-touch-uart:357]: send_get_message
[15:41:55][D][sec-touch-uart:366]:   buffer 32800	78	35235

[15:42:00][D][sec-touch:041]: SEC-Touch update
[15:42:00][D][sec-touch:307]: No property ids are registered for recursive tasks
[15:42:00][D][sec-touch:277]: process_get_queue "data-get-queue" with size 60
[15:42:00][D][sec-touch:283]: Task targetType "LABEL" and property_id "78"
[15:42:00][D][sec-touch-uart:357]: send_get_message
[15:42:00][D][sec-touch-uart:366]:   buffer 32800	78	35235

[15:42:05][D][fan:021]: 'Fan 6' - Setting:
[15:42:05][D][fan:024]:   State: ON
[15:42:05][D][fan:030]:   Speed: 11
[15:42:05][D][SecTouchFan:107]: Control called
[15:42:05][D][SecTouchFan:121]: New state to 1
[15:42:05][D][SecTouchFan:126]: Setting speed to 11
[15:42:05][I][SecTouchFan:149]: [Update for 178] - [] speed: 11
[15:42:05][D][sec-touch:352]: add_set_task
[15:42:05][I][SecTouchFan:153]: Publishing state of FAN
[15:42:05][D][fan:120]: 'Fan 6' - Sending state:
[15:42:05][D][fan:121]:   State: ON
[15:42:05][D][fan:123]:   Speed: 11
[15:42:05][D][text_sensor:064]: 'Mode Fan 6': Sending state 'Unknown'
[15:42:05][W][component:237]: Component web_server took a long time for an operation (79 ms).
[15:42:05][W][component:238]: Components should block for at most 30 ms.
[15:42:08][D][fan:021]: 'Fan 6' - Setting:
[15:42:08][D][fan:024]:   State: ON
[15:42:08][D][fan:030]:   Speed: 1
[15:42:08][D][SecTouchFan:107]: Control called
[15:42:08][D][SecTouchFan:121]: New state to 1
[15:42:08][D][SecTouchFan:126]: Setting speed to 1
[15:42:08][I][SecTouchFan:149]: [Update for 178] - [] speed: 1
[15:42:08][D][sec-touch:352]: add_set_task
[15:42:08][I][SecTouchFan:153]: Publishing state of FAN
[15:42:08][D][fan:120]: 'Fan 6' - Sending state:
[15:42:08][D][fan:121]:   State: ON
[15:42:08][D][fan:123]:   Speed: 1
[15:42:08][D][text_sensor:064]: 'Mode Fan 6': Sending state 'Unknown'
[15:42:08][W][component:237]: Component web_server took a long time for an operation (82 ms).
[15:42:08][W][component:238]: Components should block for at most 30 ms.
[15:42:27][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[15:42:27][D][esp32.preferences:114]: Saving 1 preferences to flash...
[15:42:27][D][esp32.preferences:142]: Saving 1 preferences to flash: 0 cached, 1 written, 0 failed
[15:42:32][D][api:103]: Accepted 192.168.178.84
[15:42:32][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11
[15:42:52][D][fan:021]: 'Fan 1' - Setting:
[15:42:52][D][fan:024]:   State: ON
[15:42:52][D][fan:030]:   Speed: 11
[15:42:52][D][SecTouchFan:107]: Control called
[15:42:52][D][SecTouchFan:121]: New state to 1
[15:42:52][D][SecTouchFan:126]: Setting speed to 11
[15:42:52][I][SecTouchFan:149]: [Update for 173] - [] speed: 11
[15:42:52][D][sec-touch:352]: add_set_task
[15:42:52][I][SecTouchFan:153]: Publishing state of FAN
[15:42:52][D][fan:120]: 'Fan 1' - Sending state:
[15:42:52][D][fan:121]:   State: ON
[15:42:52][D][fan:123]:   Speed: 11
[15:42:52][D][text_sensor:064]: 'Mode Fan 1': Sending state 'Unknown'
[15:42:52][W][component:237]: Component web_server took a long time for an operation (77 ms).
[15:42:52][W][component:238]: Components should block for at most 30 ms.
[15:42:54][D][fan:021]: 'Fan 1' - Setting:
[15:42:54][D][fan:024]:   State: ON
[15:42:54][D][fan:030]:   Speed: 1
[15:42:54][D][SecTouchFan:107]: Control called
[15:42:54][D][SecTouchFan:121]: New state to 1
[15:42:54][D][SecTouchFan:126]: Setting speed to 1
[15:42:54][I][SecTouchFan:149]: [Update for 173] - [] speed: 1
[15:42:54][D][sec-touch:352]: add_set_task
[15:42:54][I][SecTouchFan:153]: Publishing state of FAN
[15:42:54][D][fan:120]: 'Fan 1' - Sending state:
[15:42:54][D][fan:121]:   State: ON
[15:42:54][D][fan:123]:   Speed: 1
[15:42:54][D][text_sensor:064]: 'Mode Fan 1': Sending state 'Unknown'
[15:42:54][W][component:237]: Component web_server took a long time for an operation (74 ms).
[15:42:54][W][component:238]: Components should block for at most 30 ms.

And this is what the UI in the browser shows:

Can you give me any advice on what I can do to get this thing to work?
The SEC Touch device you own (judging from the image in your repo) and the the one I have have the exact same model type number - so hardware differences shouldn’t be much of an issue here.

Edit - here’s my wiring:

Is it correct to use the RXD / TXD pins? Sorry, I’m a n00b when it comes to Microcontrollers.

Thanks again and cheers,
Lorenz

Have you changed the GPIO pins? RX is 3 and TX is 1, which is different than the OPs GitHub page as you have an ESP32 rather than an 8266 used in the GitHub page.

Hi,
yes I have also tried that - it doesnt change anything unfortunately.
Here’s my current config:

esphome:
  name: wroom32
  friendly_name: Wroom32

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "XXX"

ota:
  - platform: esphome
    password: "XXX"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Wroom32 Fallback Hotspot"
    password: "XXX"

captive_portal:
    

################################ SEC-Touch ################################

external_components:
  - source:
      type: git
      url: https://github.com/distante/esphome-components
      ref: main

web_server:
  port: 80
  local: true
  log: false
  version: 3
  sorting_groups:
    - id: group_1
      name: Fan Group 1
      sorting_weight: -100
    - id: group_2
      name: Fan Group 2
      sorting_weight: -99
    - id: group_3
      name: Fan Group 3
      sorting_weight: -98
    - id: group_4
      name: Fan Group 4
      sorting_weight: -97
    - id: group_5
      name: Fan Group 5
      sorting_weight: -96
    - id: group_6
      name: Fan Group 6
      sorting_weight: -95
    - id: group_settings
      name: Configuration
      sorting_weight: -94
  
uart:
  id: sec_touch_uart
  tx_pin: 
    number: GPIO1
  rx_pin:
    number: GPIO3
  baud_rate: 28800

sec_touch:
  uart_id: sec_touch_uart
  update_interval: 5s # 5s is the default

fan:
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 1
    name: "Fan 1"
    web_server:
      sorting_group_id: group_1
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 2
    name: "Fan 2"
    web_server:
      sorting_group_id: group_2
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 3
    name: "Fan 3"
    web_server:
      sorting_group_id: group_3
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 4
    name: "Fan 4"
    web_server:
      sorting_group_id: group_4
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 5
    name: "Fan 5"
    web_server:
      sorting_group_id: group_5
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 6
    name: "Fan 6"
    web_server:
      sorting_group_id: group_6

button:
  - platform: sec_touch
    program_text_update:
      name: "Program Labels Update"
      icon: "mdi:book-refresh"
  - platform: restart
    name: "Restart"
    
text_sensor:
  - platform: sec_touch
    fan_number: 1
    label_text:
      name: "Label Fan 1"
      web_server:
        sorting_group_id: group_1
    mode_text:
      name: "Mode Fan 1"
      web_server:
        sorting_group_id: group_1
  - platform: sec_touch
    fan_number: 2
    label_text:
      name: "Label Fan 2"
      web_server:
        sorting_group_id: group_2
    mode_text:
      name: "Mode Fan 2"
      web_server:
        sorting_group_id: group_2
  - platform: sec_touch
    fan_number: 3
    label_text:
      name: "Label Fan 3"
      web_server:
        sorting_group_id: group_3
    mode_text:
      name: "Mode Fan 3"
      web_server:
        sorting_group_id: group_3
  - platform: sec_touch
    fan_number: 4
    label_text:
      name: "Label Fan 4"
      web_server:
        sorting_group_id: group_4
    mode_text:
      name: "Mode Fan 4"
      web_server:
        sorting_group_id: group_4
  - platform: sec_touch
    fan_number: 5
    label_text:
      name: "Label Fan 5"
      web_server:
        sorting_group_id: group_5
    mode_text:
      name: "Mode Fan 5"
      web_server:
        sorting_group_id: group_5
  - platform: sec_touch
    fan_number: 6
    label_text:
      name: "Label Fan 6"
      web_server:
        sorting_group_id: group_6
    mode_text:
      name: "Mode Fan 6"
      web_server:
        sorting_group_id: group_6

And just to make sure it’s not a software discrepancy:
The software version of my SEC-Touch is SWZ0021E21E

Your logger component may be interfering with the serial comms, if you set the logger baud to zero it may help.


logger:
  baud_rate: 0

Can you post your full yaml file? changing anything anything private to xxxx.

The example uses (and I) use GPIO17 and GPIO16. The other one is for the serial logger (AFAIK). This the config I use (I load the component from a local folder):

esphome:
  name: esp-ventilation-controller
  friendly_name: Ventilation Controller
    
external_components:
  - source:
      type: local
      path: ../../../esphome-components/components

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:
  level: INFO
  logs:
    esp-idf: WARN
    sec-touch-uart: info

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxxxxxxxxxxxx"

ota:
  - platform: esphome
    password: "yyyyyyyyyy"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Ventilation-Controller"
    password: "xxxxsssdasdasdsa"

captive_portal:

web_server:
  port: 80
  local: true
  log: false
  version: 3
  sorting_groups:
    - id: group_1
      name: Fan Group 1
      sorting_weight: -100
    - id: group_2
      name: Fan Group 2
      sorting_weight: -99
    - id: group_3
      name: Fan Group 3
      sorting_weight: -98
    - id: group_4
      name: Fan Group 4
      sorting_weight: -97
    - id: group_5
      name: Fan Group 5
      sorting_weight: -96
    - id: group_6
      name: Fan Group 6
      sorting_weight: -95
    - id: group_settings
      name: Configuration
      sorting_weight: -94
  
uart:
  id: sec_touch_uart
  tx_pin: 
    number: GPIO17
  rx_pin:
    number: GPIO16
  baud_rate: 28800

sec_touch:
  uart_id: sec_touch_uart
  update_interval: 5s # 5s is the default

fan:
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 1
    name: "Fan 1"
    web_server:
      sorting_group_id: group_1
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 2
    name: "Fan 2"
    web_server:
      sorting_group_id: group_2
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 3
    name: "Fan 3"
    web_server:
      sorting_group_id: group_3
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 4
    name: "Fan 4"
    web_server:
      sorting_group_id: group_4
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 5
    name: "Fan 5"
    web_server:
      sorting_group_id: group_5
  # - platform: sec_touch
  #   icon: "mdi:fan"
  #   fan_number: 6
  #   name: "Fan 6"
  #   web_server:
  #     sorting_group_id: group_6


button:
  - platform: sec_touch
    program_text_update:
      name: "Program Labels Update"
      icon: "mdi:book-refresh"
  - platform: restart
    name: "Restart"
    
debug:
  update_interval: 30s

text_sensor:
  - platform: sec_touch
    fan_number: 1
    label_text:
      name: "Label Fan 1"
      web_server:
        sorting_group_id: group_1
    mode_text:
      name: "Mode Fan 1"
      web_server:
        sorting_group_id: group_1
  - platform: sec_touch
    fan_number: 2
    label_text:
      name: "Label Fan 2"
      web_server:
        sorting_group_id: group_2
    mode_text:
      name: "Mode Fan 2"
      web_server:
        sorting_group_id: group_2
  - platform: sec_touch
    fan_number: 3
    label_text:
      name: "Label Fan 3"
      web_server:
        sorting_group_id: group_3
    mode_text:
      name: "Mode Fan 3"
      web_server:
        sorting_group_id: group_3
  - platform: sec_touch
    fan_number: 4
    label_text:
      name: "Label Fan 4"
      web_server:
        sorting_group_id: group_4
    mode_text:
      name: "Mode Fan 4"
      web_server:
        sorting_group_id: group_4
  - platform: sec_touch
    fan_number: 5
    label_text:
      name: "Label Fan 5"
      web_server:
        sorting_group_id: group_5
    mode_text:
      name: "Mode Fan 5"
      web_server:
        sorting_group_id: group_5
  # - platform: sec_touch
  #   fan_number: 6
  #   label_text:
  #     name: "Label Fan 6"
  #     web_server:
  #       sorting_group_id: group_6
  #   mode_text:
  #     name: "Mode Fan 6"
  #     web_server:
  #       sorting_group_id: group_6
  - platform: debug
    device:
      name: "Device Info"
    reset_reason:
      name: "Reset Reason"

sensor:
  - platform: debug
    free:
      name: "Heap Free"
    block:
      name: "Heap Max Block"
    loop_time:
      name: "Loop Time"

Be sure to use the correct TX and RX connection. it does not need to be crossed.

Thank both of you so far, @distante & @EBME2!

Here’s my current full YAML config - I updated it with the hints you gave (without any success so far - see below):

esphome:
  name: wroom32
  friendly_name: Wroom32

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable Home Assistant API
api:
  encryption:
    key: "XXX"

ota:
  - platform: esphome
    password: "XXX"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Wroom32 Fallback Hotspot"
    password: "XXX"

captive_portal:
    

################################ SEC-Touch ################################

logger:
  baud_rate: 0
  level: INFO
  logs:
    esp-idf: WARN
    sec-touch-uart: info

external_components:
  - source:
      type: git
      url: https://github.com/distante/esphome-components
      ref: main

web_server:
  port: 80
  local: true
  log: false
  version: 3
  sorting_groups:
    - id: group_1
      name: Fan Group 1
      sorting_weight: -100
    - id: group_2
      name: Fan Group 2
      sorting_weight: -99
    - id: group_3
      name: Fan Group 3
      sorting_weight: -98
    - id: group_4
      name: Fan Group 4
      sorting_weight: -97
    - id: group_5
      name: Fan Group 5
      sorting_weight: -96
    - id: group_6
      name: Fan Group 6
      sorting_weight: -95
    - id: group_settings
      name: Configuration
      sorting_weight: -94
  
uart:
  id: sec_touch_uart
  tx_pin: 
    number: GPIO17
  rx_pin:
    number: GPIO16
  baud_rate: 28800

sec_touch:
  uart_id: sec_touch_uart
  update_interval: 5s # 5s is the default

fan:
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 1
    name: "Fan 1"
    web_server:
      sorting_group_id: group_1
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 2
    name: "Fan 2"
    web_server:
      sorting_group_id: group_2
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 3
    name: "Fan 3"
    web_server:
      sorting_group_id: group_3
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 4
    name: "Fan 4"
    web_server:
      sorting_group_id: group_4
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 5
    name: "Fan 5"
    web_server:
      sorting_group_id: group_5
  - platform: sec_touch
    icon: "mdi:fan"
    fan_number: 6
    name: "Fan 6"
    web_server:
      sorting_group_id: group_6

button:
  - platform: sec_touch
    program_text_update:
      name: "Program Labels Update"
      icon: "mdi:book-refresh"
  - platform: restart
    name: "Restart"
    
text_sensor:
  - platform: sec_touch
    fan_number: 1
    label_text:
      name: "Label Fan 1"
      web_server:
        sorting_group_id: group_1
    mode_text:
      name: "Mode Fan 1"
      web_server:
        sorting_group_id: group_1
  - platform: sec_touch
    fan_number: 2
    label_text:
      name: "Label Fan 2"
      web_server:
        sorting_group_id: group_2
    mode_text:
      name: "Mode Fan 2"
      web_server:
        sorting_group_id: group_2
  - platform: sec_touch
    fan_number: 3
    label_text:
      name: "Label Fan 3"
      web_server:
        sorting_group_id: group_3
    mode_text:
      name: "Mode Fan 3"
      web_server:
        sorting_group_id: group_3
  - platform: sec_touch
    fan_number: 4
    label_text:
      name: "Label Fan 4"
      web_server:
        sorting_group_id: group_4
    mode_text:
      name: "Mode Fan 4"
      web_server:
        sorting_group_id: group_4
  - platform: sec_touch
    fan_number: 5
    label_text:
      name: "Label Fan 5"
      web_server:
        sorting_group_id: group_5
    mode_text:
      name: "Mode Fan 5"
      web_server:
        sorting_group_id: group_5
  - platform: sec_touch
    fan_number: 6
    label_text:
      name: "Label Fan 6"
      web_server:
        sorting_group_id: group_6
    mode_text:
      name: "Mode Fan 6"
      web_server:
        sorting_group_id: group_6

I changed the wiring to:

ESP32
(pin name as printed on the board)
SEC-Touch
GND - (1st from the left)
TXD RX (2nd from the left)
RXD TX (3rd from the left)

Output I get when connecting:

[08:34:28][I][app:100]: ESPHome version 2025.2.2 compiled on Mar 17 2025, 08:33:02
[08:34:35][I][SecTouchFan:149]: [Update for 178] - [] speed: 11
[08:34:35][I][SecTouchFan:153]: Publishing state of FAN
[08:34:38][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11
[08:34:39][I][SecTouchFan:149]: [Update for 178] - [] speed: 1
[08:34:39][I][SecTouchFan:153]: Publishing state of FAN
[08:34:52][I][SecTouchFan:149]: [Update for 177] - [] speed: 1
[08:34:52][I][SecTouchFan:153]: Publishing state of FAN
[08:34:55][I][SecTouchFan:149]: [Update for 176] - [] speed: 1
[08:34:55][I][SecTouchFan:153]: Publishing state of FAN
[08:34:57][I][SecTouchFan:149]: [Update for 175] - [] speed: 1
[08:34:57][I][SecTouchFan:153]: Publishing state of FAN
[08:35:00][I][SecTouchFan:149]: [Update for 174] - [] speed: 1
[08:35:00][I][SecTouchFan:153]: Publishing state of FAN
[08:35:02][I][SecTouchFan:149]: [Update for 173] - [] speed: 1
[08:35:02][I][SecTouchFan:153]: Publishing state of FAN
[08:35:03][I][SecTouchFan:149]: [Update for 173] - [] speed: 1
[08:35:03][I][SecTouchFan:153]: Publishing state of FAN
[08:35:06][I][SecTouchFan:149]: [Update for 174] - [] speed: 1
[08:35:06][I][SecTouchFan:153]: Publishing state of FAN
[08:35:08][I][SecTouchFan:149]: [Update for 175] - [] speed: 1
[08:35:08][I][SecTouchFan:153]: Publishing state of FAN
[08:35:09][I][SecTouchFan:149]: [Update for 176] - [] speed: 1
[08:35:09][I][SecTouchFan:153]: Publishing state of FAN
[08:35:16][I][SecTouchFan:149]: [Update for 177] - [] speed: 1
[08:35:16][I][SecTouchFan:153]: Publishing state of FAN
[08:35:23][I][safe_mode:041]: Boot seems successful; resetting boot loop counter
[08:35:38][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11
[08:36:39][W][api.connection:107]: : Reading failed: BAD_INDICATOR errno=11
[08:37:39][W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11

I think this is your problem. the TXD and RXD are not the pins you need to use. Try:

ESP32
(pin name as printed on the board)
SEC-Touch
GND - (1st from the left)
G17 RX (2nd from the left)
G16 TX (3rd from the left)

Hi @distante,

I tried that - didn’t change anything :disappointed:
Is your software version the same as mine?

Is there anything I can do to cancel out any potential errors? I measured the voltage of the PC interface of the SEC Touch. It’s around 3,2V. The RX and TX jump around in intervals so the board is not dead or anything.

I also tried using my D1 mini altering the ESPHome platform accordingly. Same results :man_shrugging:

The jumper cables shouldn’t be the problem, right?! As a power source I’m using an old 5V/1A iPhone charger.

My device SW versions ends with G instead of E like yours. But to be honest I do not think that is the problem. I am not at me computer right now. Can you put everything on debug and see if you get UART data?

I am not using jumper cables but a connector my friend gifted to me, but I am not sure of the name of it.

You could also try another GND pin. I have had esp32 boards where a GND pin was not connected to the rest.

You could also swap the rx/tx pins, just in case they are swap on your device. I think it will not break anything (I Think)

I also bought a connector for the SEC-Touch PC interface and screwed in the male jumper cables.

Tried another GND pin → no luck

Tried switching the RX/TX (YOLO :wink:) and the debug data went crazy:

[00:19:09][D][sec-touch:061]: SEC-Touch loop Data available
[00:19:09][D][sec-touch:163]: [handle_uart_input_for_get_queue]--------
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][D][sec-touch-uart:211]:     saving into buffer without id or value
[00:19:09][D][sec-touch-uart:176]:   Byte received: 224
[00:19:09][W][sec-touch:191]: Starting to store message but the data is not ACK. Discarding data: 224
[00:19:09][D][sec-touch-uart:176]:   Byte received: 28
[00:19:09][W][sec-touch:182]: Starting to store message but the data is not ACK in the second attempt. Discarding all data: 28
[00:19:09][D][sec-touch:061]: SEC-Touch loop Data available
[00:19:09][D][sec-touch:163]: [handle_uart_input_for_get_queue]--------
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][D][sec-touch-uart:211]:     saving into buffer without id or value
[00:19:09][D][sec-touch-uart:176]:   Byte received: 28
[00:19:09][W][sec-touch:191]: Starting to store message but the data is not ACK. Discarding data: 28
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:182]: Starting to store message but the data is not ACK in the second attempt. Discarding all data: 0
[00:19:09][D][sec-touch:061]: SEC-Touch loop Data available
[00:19:09][D][sec-touch:163]: [handle_uart_input_for_get_queue]--------
[00:19:09][D][sec-touch-uart:176]:   Byte received: 28
[00:19:09][D][sec-touch-uart:211]:     saving into buffer without id or value
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:191]: Starting to store message but the data is not ACK. Discarding data: 0
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:182]: Starting to store message but the data is not ACK in the second attempt. Discarding all data: 0
[00:19:09][D][sec-touch:061]: SEC-Touch loop Data available
[00:19:09][D][sec-touch:163]: [handle_uart_input_for_get_queue]--------
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][D][sec-touch-uart:211]:     saving into buffer without id or value
[00:19:09][D][sec-touch-uart:176]:   Byte received: 28
[00:19:09][W][sec-touch:191]: Starting to store message but the data is not ACK. Discarding data: 28
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:182]: Starting to store message but the data is not ACK in the second attempt. Discarding all data: 0
[00:19:09][D][sec-touch:061]: SEC-Touch loop Data available
[00:19:09][D][sec-touch:163]: [handle_uart_input_for_get_queue]--------
[00:19:09][D][sec-touch-uart:176]:   Byte received: 224
[00:19:09][D][sec-touch-uart:211]:     saving into buffer without id or value
[00:19:09][D][sec-touch-uart:176]:   Byte received: 28
[00:19:09][W][sec-touch:191]: Starting to store message but the data is not ACK. Discarding data: 28
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:182]: Starting to store message but the data is not ACK in the second attempt. Discarding all data: 0
[00:19:09][D][sec-touch:061]: SEC-Touch loop Data available
[00:19:09][D][sec-touch:163]: [handle_uart_input_for_get_queue]--------
[00:19:09][D][sec-touch-uart:176]:   Byte received: 28
[00:19:09][D][sec-touch-uart:211]:     saving into buffer without id or value
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:191]: Starting to store message but the data is not ACK. Discarding data: 0
[00:19:09][D][sec-touch-uart:176]:   Byte received: 28
[00:19:09][W][sec-touch:182]: Starting to store message but the data is not ACK in the second attempt. Discarding all data: 28
[00:19:09][D][sec-touch:061]: SEC-Touch loop Data available
[00:19:09][D][sec-touch:163]: [handle_uart_input_for_get_queue]--------
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][D][sec-touch-uart:211]:     saving into buffer without id or value
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:191]: Starting to store message but the data is not ACK. Discarding data: 0
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:182]: Starting to store message but the data is not ACK in the second attempt. Discarding all data: 0
[00:19:09][C][restart.button:017]: Restart Button 'Restart'
[00:19:09][C][restart.button:017]:   Icon: 'mdi:restart'
[00:19:09][D][sec-touch:061]: SEC-Touch loop Data available
[00:19:09][D][sec-touch:163]: [handle_uart_input_for_get_queue]--------
[00:19:09][D][sec-touch-uart:176]:   Byte received: 28
[00:19:09][D][sec-touch-uart:211]:     saving into buffer without id or value
[00:19:09][D][sec-touch-uart:176]:   Byte received: 0
[00:19:09][W][sec-touch:191]: Starting to store message but the data is not ACK. Discarding data: 0
[00:19:09][D][sec-touch-uart:176]:   Byte received: 224

I guess that is nothing to get excited about. The web interface still shows Unknown as a state for all fans.

While searching around a bit I found this post right here:

Turns out that board has its own identifier az-delivery-devkit-v4 - well, at least that solved my first problem that the program wasn’t persistent.

esp32:
  board: az-delivery-devkit-v4
  framework:
    type: esp-idf

Still struggeling with the UART part…

Ah yes, those logs indicate that the data send is not valid.

This is new to me. I used an old one from two I purchased a couple of years ago. I just revised and the other one I have also uses esp32dev, I use it connected to an led strip with bluetooth and a temp sensor.

Do you maybe have another board to test? any Wroom should work AFAIK. I do not like that comment that said that the baud rate needed to be changed. Although maybe the comment talks about the external hardware.

Can you check what you get in the logs with the regular UART connection?

I am also no professional with the hardware part (:grimacing:) but if I had that problem I would try to connect the board to my laptop instead of the charger and try to get logs since boot. While I was doing the component I did that applying OTA updates while having the device connected to my laptop. There are serial comm apps that help with that.