esphome / issues

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

Grow fingerprint sensor loses communication #5608

Open Nadav-K opened 6 months ago

Nadav-K commented 6 months ago

The problem

I have a "Grow" fingerprint sensor (R307/AS608/FPM10A) which is coupled with an ESP32-C3 Super Mini. It's wired so that T-out goes to GPIO10, works fine most of the time.

Once every few hours/days the fingerprint sensor will stop responding to the ESP board. Setting VV logging I see that once I place my finger the board prints "No response received from reader". snipper below. any idea why this could happen?

I wanted to suggest adding an automation trigger in such a case, so that a recovery flow can be initiated from HomeAssistant or even the board itself..


[19:44:30][C][logger:447]: Logger:
[19:44:30][C][logger:448]:   Level: VERY_VERBOSE
[19:44:30][C][logger:449]:   Log Baud Rate: 115200
[19:44:30][C][logger:451]:   Hardware UART: USB_SERIAL_JTAG
[19:44:30][C][uart.idf:139]: UART Bus 0:
[19:44:30][C][uart.idf:140]:   TX Pin: GPIO21
[19:44:30][C][uart.idf:141]:   RX Pin: GPIO20
[19:44:30][C][uart.idf:143]:   RX Buffer Size: 256
[19:44:30][C][uart.idf:145]:   Baud Rate: 57600 baud
[19:44:30][C][uart.idf:146]:   Data Bits: 8
[19:44:30][C][uart.idf:147]:   Parity: NONE
[19:44:30][C][uart.idf:148]:   Stop bits: 1
[19:44:30][C][template.text_sensor:020]: Template Sensor 'Fingerprint State'
[19:44:30][C][status:034]: Status Binary Sensor '${friendly_name} Status'
[19:44:30][C][status:034]:   Device Class: 'connectivity'
[19:44:30][C][fingerprint_grow:537]: GROW_FINGERPRINT_READER:
[19:44:30][C][fingerprint_grow:538]:   System Identifier Code: 0x0000
[19:44:30][C][fingerprint_grow:540]:   Touch Sensing Pin: GPIO10
[19:44:30][C][fingerprint_grow:542]:   Sensor Power Pin: None
[19:44:30][C][fingerprint_grow:546]:   Idle Period to Sleep: Never
[19:44:30][C][fingerprint_grow:548]:   Update Interval: 0.8s
[19:44:30][C][fingerprint_grow:550]:   Fingerprint Count 'Fingerprint Count'
[19:44:30][C][fingerprint_grow:550]:     State Class: ''
[19:44:30][C][fingerprint_grow:550]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:550]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:550]:     Icon: 'mdi:fingerprint'
[19:44:30][C][fingerprint_grow:551]:     Current Value: 4
[19:44:30][C][fingerprint_grow:554]:   Status 'Fingerprint Status'
[19:44:30][C][fingerprint_grow:554]:     State Class: ''
[19:44:30][C][fingerprint_grow:554]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:554]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:555]:     Current Value: 0
[19:44:30][C][fingerprint_grow:558]:   Capacity 'Fingerprint Capacity'
[19:44:30][C][fingerprint_grow:558]:     State Class: ''
[19:44:30][C][fingerprint_grow:558]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:558]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:558]:     Icon: 'mdi:database'
[19:44:30][C][fingerprint_grow:559]:     Current Value: 150
[19:44:30][C][fingerprint_grow:562]:   Security Level 'Fingerprint Security Level'
[19:44:30][C][fingerprint_grow:562]:     State Class: ''
[19:44:30][C][fingerprint_grow:562]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:562]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:562]:     Icon: 'mdi:security'
[19:44:30][C][fingerprint_grow:563]:     Current Value: 3
[19:44:30][C][fingerprint_grow:566]:   Last Finger ID 'Fingerprint Last Finger ID'
[19:44:30][C][fingerprint_grow:566]:     State Class: ''
[19:44:30][C][fingerprint_grow:566]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:566]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:566]:     Icon: 'mdi:account'
[19:44:30][C][fingerprint_grow:567]:     Current Value: 1
[19:44:30][C][fingerprint_grow:570]:   Last Confidence 'Fingerprint Last Confidence'
[19:44:30][C][fingerprint_grow:570]:     State Class: ''
[19:44:30][C][fingerprint_grow:570]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:570]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:570]:     Icon: 'mdi:account-check'
[19:44:30][C][fingerprint_grow:571]:     Current Value: 226
[19:44:30][C][mdns:115]: mDNS:
[19:44:30][C][mdns:116]:   Hostname: esp32newc3
[19:44:30][V][mdns:117]:   Services:
[19:44:30][V][mdns:119]:   - _esphomelib, _tcp, 6053
[19:44:30][V][mdns:121]:     TXT: version = 2024.2.2
[19:44:30][V][mdns:121]:     TXT: mac = ecda3bbf63fc
[19:44:30][V][mdns:121]:     TXT: platform = ESP32
[19:44:30][V][mdns:121]:     TXT: board = esp32-c3-devkitm-1
[19:44:30][V][mdns:121]:     TXT: network = wifi
[19:44:30][V][mdns:121]:     TXT: api_encryption = Noise_NNpsk0_25519_ChaChaPoly_SHA256
[19:44:30][C][ota:096]: Over-The-Air Updates:
[19:44:30][C][ota:097]:   Address: esp32newc3.local:3232
[19:44:30][C][ota:100]:   Using Password.
[19:44:30][C][ota:103]:   OTA version: 2.
[19:44:30][C][api:139]: API Server:
[19:44:30][C][api:140]:   Address: esp32newc3.local:6053
[19:44:30][C][api:142]:   Using noise encryption: YES
[19:44:31][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86929240 (now=86929991)
[19:44:31][V][fingerprint_grow:021]: No touch sensing
[19:44:31][VV][scheduler:226]: Running interval '' with interval=5000 last_execution=86925275 (now=86930277)
[19:44:31][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86929990 (now=86930740)
[19:44:31][V][fingerprint_grow:021]: No touch sensing
[19:44:32][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86930740 (now=86931492)
[19:44:32][V][fingerprint_grow:021]: No touch sensing
[19:44:33][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86931490 (now=86932244)
[19:44:33][V][fingerprint_grow:021]: No touch sensing
[19:44:34][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86932240 (now=86932990)
[19:44:34][V][fingerprint_grow:021]: No touch sensing
[19:44:34][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86932990 (now=86933742)
[19:44:34][D][main:615]: on_finger_scan_start
[19:44:34][D][fingerprint_grow:323]: Setting LED
[19:44:35][E][fingerprint_grow:467]: No response received from reader
[19:44:35][D][fingerprint_grow:125]: Scan and match
[19:44:35][D][fingerprint_grow:156]: Getting image 1
[19:44:36][E][fingerprint_grow:467]: No response received from reader
[19:44:36][D][fingerprint_grow:179]: Unknown Scan Error: 255
[19:44:36][W][component:214]: Component fingerprint_grow took a long time for an operation (2.02 s).
[19:44:36][W][component:215]: Components should block for at most 20-30ms.

Which version of ESPHome has the issue?

2024.2.2

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.3

What platform are you using?

ESP32-IDF

Board

ESP32-C3 Super Mini with idf framework

Component causing the issue

No response

Example YAML snippet

esphome:
  name: esp32newc3
  friendly_name: Fingerprint Sensor
  platformio_options:
    board_build.flash_mode: dio

esp32:
  board: esp32-c3-devkitm-1
  variant: ESP32C3
  framework:
    type: esp-idf

preferences:
    flash_write_interval: 5s

# Enable logging
logger:
#  level: VERY_VERBOSE

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  output_power: "8.5"  # sometimes results in a bootloop without it

# Enable OTA updates
ota:
  password: !secret ota_password

# Example configuration entry
uart:
  rx_pin: GPIO20
  tx_pin: GPIO21
  baud_rate: 57600

external_components:
  - source: github://alexborro/esphome@Sleep_mode_rebase
    refresh: 0s
    components: [ fingerprint_grow ]

# Sensors
sensor:
  - platform: fingerprint_grow
    fingerprint_count:
      name: "Fingerprint Count"
    last_finger_id:
      name: "Fingerprint Last Finger ID"
    last_confidence:
      name: "Fingerprint Last Confidence"
    status:
      name: "Fingerprint Status"
    capacity:
      name: "Fingerprint Capacity"
    security_level:
      name: "Fingerprint Security Level"

text_sensor:
  - platform: template
    id: fingerprint_state
    name: "Fingerprint State"

binary_sensor:
  - platform: status
    name: "${friendly_name} Status"

# Declare Grow Fingerprint Reader
fingerprint_grow:
  sensing_pin: GPIO10
  update_interval: 0.75s

  on_finger_scan_start:
    - logger.log: "on_finger_scan_start"
    - fingerprint_grow.led_control: ON

  on_finger_scan_invalid:
    - logger.log: "Inside on_finger_scan_invalid"
    - fingerprint_grow.led_control: ON
    - homeassistant.event:
        event: esphome.test_node_finger_scan_invalid

  on_finger_scan_matched:
    - logger.log: "Inside on_finger_scan_matched"
    - fingerprint_grow.led_control: OFF
    - homeassistant.event:
        event: esphome.test_node_finger_scan_matched
        data:
          finger_id: !lambda 'return finger_id;'
          confidence: !lambda 'return confidence;'

  on_finger_scan_unmatched:
    - logger.log: "Inside on_finger_scan_unmatched"
    - fingerprint_grow.led_control: OFF
    - homeassistant.event:
        event: esphome.test_node_finger_scan_unmatched

  on_finger_scan_misplaced:
    - logger.log: "Inside on_finger_scan_misplaced"
    - fingerprint_grow.led_control: OFF
    - homeassistant.event:
        event: esphome.frontdoor_finger_scan_misplaced

  on_enrollment_scan:
    - logger.log: "Inside on_enrollment_scan"
    - fingerprint_grow.led_control: ON
    - homeassistant.event:
        event: esphome.test_node_enrollment_scan
        data:
          finger_id: !lambda 'return finger_id;'
          scan_num: !lambda 'return scan_num;'

  on_enrollment_done:
    - logger.log: "Inside on_enrollment_done"
    - fingerprint_grow.led_control: OFF
    - homeassistant.event:
        event: esphome.test_node_enrollment_done
        data:
          finger_id: !lambda 'return finger_id;'

  on_enrollment_failed:
    - logger.log: "Inside on_enrollment_failed"
    - fingerprint_grow.led_control: OFF
    - homeassistant.event:
        event: esphome.test_node_enrollment_failed
        data:
          finger_id: !lambda 'return finger_id;'

# Enable Home Assistant API
api:
  encryption:
    key: "sU0nbvprsMNaYDk1q1x5cJw5a1Qcu29oiuvLWgnL/MI="

  services:
  - service: enroll
    variables:
      finger_id: int
      num_scans: int
    then:
      - fingerprint_grow.enroll:
          finger_id: !lambda 'return finger_id;'
          num_scans: !lambda 'return num_scans;'
  - service: cancel_enroll
    then:
      - fingerprint_grow.cancel_enroll:
  - service: delete
    variables:
      finger_id: int
    then:
      - fingerprint_grow.delete:
          finger_id: !lambda 'return finger_id;'
  - service: delete_all
    then:
      - fingerprint_grow.delete_all:
  - service: turn_off_led
    then:
      - fingerprint_grow.led_control: OFF
  - service: turn_on_led
    then:
      - fingerprint_grow.led_control: ON

Anything in the logs that might be useful for us?

INFO ESPHome 2024.2.2
INFO Reading configuration /config/esphome/esp32c3sensor.yaml...
INFO Updating https://github.com/alexborro/esphome.git@Sleep_mode_rebase
INFO Starting log output from ----------------- using esphome API
INFO Successfully connected to esp32newc3 @ --------------- in 0.123s
INFO Successful handshake with esp32newc3 @ ------------- in 0.066s
[19:44:30][I][app:102]: ESPHome version 2024.2.2 compiled on Mar 16 2024, 17:27:07
[19:44:30][C][wifi:577]: WiFi:
[19:44:30][C][wifi:409]:   Local MAC: ----------------
[19:44:30][C][wifi:414]:   SSID: 'NoT'[redacted]
[19:44:30][C][wifi:415]:   IP Address: -------------------
[19:44:30][C][wifi:417]:   BSSID: -----------------
[19:44:30][C][wifi:418]:   Hostname: 'esp32newc3'
[19:44:30][C][wifi:420]:   Signal strength: -59 dB ▂▄▆█
[19:44:30][V][wifi:422]:   Priority: 0.0
[19:44:30][C][wifi:424]:   Channel: 9
[19:44:30][C][wifi:425]:   Subnet: 255.255.255.0
[19:44:30][C][wifi:426]:   Gateway: -------------------
[19:44:30][C][wifi:427]:   DNS1: --------------
[19:44:30][C][wifi:428]:   DNS2: 0.0.0.0
[19:44:30][C][logger:447]: Logger:
[19:44:30][C][logger:448]:   Level: VERY_VERBOSE
[19:44:30][C][logger:449]:   Log Baud Rate: 115200
[19:44:30][C][logger:451]:   Hardware UART: USB_SERIAL_JTAG
[19:44:30][C][uart.idf:139]: UART Bus 0:
[19:44:30][C][uart.idf:140]:   TX Pin: GPIO21
[19:44:30][C][uart.idf:141]:   RX Pin: GPIO20
[19:44:30][C][uart.idf:143]:   RX Buffer Size: 256
[19:44:30][C][uart.idf:145]:   Baud Rate: 57600 baud
[19:44:30][C][uart.idf:146]:   Data Bits: 8
[19:44:30][C][uart.idf:147]:   Parity: NONE
[19:44:30][C][uart.idf:148]:   Stop bits: 1
[19:44:30][C][template.text_sensor:020]: Template Sensor 'Fingerprint State'
[19:44:30][C][status:034]: Status Binary Sensor '${friendly_name} Status'
[19:44:30][C][status:034]:   Device Class: 'connectivity'
[19:44:30][C][fingerprint_grow:537]: GROW_FINGERPRINT_READER:
[19:44:30][C][fingerprint_grow:538]:   System Identifier Code: 0x0000
[19:44:30][C][fingerprint_grow:540]:   Touch Sensing Pin: GPIO10
[19:44:30][C][fingerprint_grow:542]:   Sensor Power Pin: None
[19:44:30][C][fingerprint_grow:546]:   Idle Period to Sleep: Never
[19:44:30][C][fingerprint_grow:548]:   Update Interval: 0.8s
[19:44:30][C][fingerprint_grow:550]:   Fingerprint Count 'Fingerprint Count'
[19:44:30][C][fingerprint_grow:550]:     State Class: ''
[19:44:30][C][fingerprint_grow:550]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:550]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:550]:     Icon: 'mdi:fingerprint'
[19:44:30][C][fingerprint_grow:551]:     Current Value: 4
[19:44:30][C][fingerprint_grow:554]:   Status 'Fingerprint Status'
[19:44:30][C][fingerprint_grow:554]:     State Class: ''
[19:44:30][C][fingerprint_grow:554]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:554]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:555]:     Current Value: 0
[19:44:30][C][fingerprint_grow:558]:   Capacity 'Fingerprint Capacity'
[19:44:30][C][fingerprint_grow:558]:     State Class: ''
[19:44:30][C][fingerprint_grow:558]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:558]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:558]:     Icon: 'mdi:database'
[19:44:30][C][fingerprint_grow:559]:     Current Value: 150
[19:44:30][C][fingerprint_grow:562]:   Security Level 'Fingerprint Security Level'
[19:44:30][C][fingerprint_grow:562]:     State Class: ''
[19:44:30][C][fingerprint_grow:562]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:562]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:562]:     Icon: 'mdi:security'
[19:44:30][C][fingerprint_grow:563]:     Current Value: 3
[19:44:30][C][fingerprint_grow:566]:   Last Finger ID 'Fingerprint Last Finger ID'
[19:44:30][C][fingerprint_grow:566]:     State Class: ''
[19:44:30][C][fingerprint_grow:566]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:566]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:566]:     Icon: 'mdi:account'
[19:44:30][C][fingerprint_grow:567]:     Current Value: 1
[19:44:30][C][fingerprint_grow:570]:   Last Confidence 'Fingerprint Last Confidence'
[19:44:30][C][fingerprint_grow:570]:     State Class: ''
[19:44:30][C][fingerprint_grow:570]:     Unit of Measurement: ''
[19:44:30][C][fingerprint_grow:570]:     Accuracy Decimals: 0
[19:44:30][C][fingerprint_grow:570]:     Icon: 'mdi:account-check'
[19:44:30][C][fingerprint_grow:571]:     Current Value: 226
[19:44:30][C][mdns:115]: mDNS:
[19:44:30][C][mdns:116]:   Hostname: esp32newc3
[19:44:30][V][mdns:117]:   Services:
[19:44:30][V][mdns:119]:   - _esphomelib, _tcp, 6053
[19:44:30][V][mdns:121]:     TXT: version = 2024.2.2
[19:44:30][V][mdns:121]:     TXT: mac = ---------------
[19:44:30][V][mdns:121]:     TXT: platform = ESP32
[19:44:30][V][mdns:121]:     TXT: board = esp32-c3-devkitm-1
[19:44:30][V][mdns:121]:     TXT: network = wifi
[19:44:30][V][mdns:121]:     TXT: api_encryption = Noise_NNpsk0_25519_ChaChaPoly_SHA256
[19:44:30][C][ota:096]: Over-The-Air Updates:
[19:44:30][C][ota:097]:   Address: esp32newc3.local:3232
[19:44:30][C][ota:100]:   Using Password.
[19:44:30][C][ota:103]:   OTA version: 2.
[19:44:30][C][api:139]: API Server:
[19:44:30][C][api:140]:   Address: esp32newc3.local:6053
[19:44:30][C][api:142]:   Using noise encryption: YES
[19:44:31][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86929240 (now=86929991)
[19:44:31][V][fingerprint_grow:021]: No touch sensing
[19:44:31][VV][scheduler:226]: Running interval '' with interval=5000 last_execution=86925275 (now=86930277)
[19:44:31][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86929990 (now=86930740)
[19:44:31][V][fingerprint_grow:021]: No touch sensing
[19:44:32][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86930740 (now=86931492)
[19:44:32][V][fingerprint_grow:021]: No touch sensing
[19:44:33][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86931490 (now=86932244)
[19:44:33][V][fingerprint_grow:021]: No touch sensing
[19:44:34][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86932240 (now=86932990)
[19:44:34][V][fingerprint_grow:021]: No touch sensing
[19:44:34][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86932990 (now=86933742)
[19:44:34][D][main:615]: on_finger_scan_start
[19:44:34][D][fingerprint_grow:323]: Setting LED
[19:44:35][E][fingerprint_grow:467]: No response received from reader
[19:44:35][D][fingerprint_grow:125]: Scan and match
[19:44:35][D][fingerprint_grow:156]: Getting image 1
[19:44:36][E][fingerprint_grow:467]: No response received from reader
[19:44:36][D][fingerprint_grow:179]: Unknown Scan Error: 255
[19:44:36][W][component:214]: Component fingerprint_grow took a long time for an operation (2.02 s).
[19:44:36][W][component:215]: Components should block for at most 20-30ms.
[19:44:36][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86933740 (now=86935778)
[19:44:36][V][fingerprint_grow:021]: No touch sensing
[19:44:36][VV][scheduler:226]: Running interval '' with interval=5000 last_execution=86930275 (now=86935778)
[19:44:37][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86935240 (now=86935990)
[19:44:37][V][fingerprint_grow:021]: No touch sensing
[19:44:37][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86935990 (now=86936740)
[19:44:37][V][fingerprint_grow:021]: No touch sensing
[19:44:38][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86936740 (now=86937491)
[19:44:38][V][fingerprint_grow:021]: No touch sensing
[19:44:39][VV][api.service:558]: on_ping_request: PingRequest {}
[19:44:39][VV][api.service:043]: send_ping_response: PingResponse {}
[19:44:39][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86937490 (now=86938240)
[19:44:39][V][fingerprint_grow:021]: No touch sensing
[19:44:40][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86938240 (now=86938991)
[19:44:40][V][fingerprint_grow:021]: No touch sensing
[19:44:40][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86938990 (now=86939743)
[19:44:40][V][fingerprint_grow:021]: No touch sensing
[19:44:41][VV][scheduler:226]: Running interval '' with interval=5000 last_execution=86935275 (now=86940275)
[19:44:41][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86939740 (now=86940495)
[19:44:41][V][fingerprint_grow:021]: No touch sensing
[19:44:42][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86940490 (now=86941240)
[19:44:42][V][fingerprint_grow:021]: No touch sensing
[19:44:43][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86941240 (now=86941993)
[19:44:43][V][fingerprint_grow:021]: No touch sensing
[19:44:43][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86941990 (now=86942740)
[19:44:43][V][fingerprint_grow:021]: No touch sensing
[19:44:44][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86942740 (now=86943493)
[19:44:44][V][fingerprint_grow:021]: No touch sensing
[19:44:45][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86943490 (now=86944245)
[19:44:45][D][main:615]: on_finger_scan_start
[19:44:45][D][fingerprint_grow:323]: Setting LED
[19:44:46][E][fingerprint_grow:467]: No response received from reader
[19:44:46][D][fingerprint_grow:125]: Scan and match
[19:44:46][D][fingerprint_grow:156]: Getting image 1
[19:44:47][E][fingerprint_grow:467]: No response received from reader
[19:44:47][D][fingerprint_grow:179]: Unknown Scan Error: 255
[19:44:47][W][component:214]: Component fingerprint_grow took a long time for an operation (2.02 s).
[19:44:47][W][component:215]: Components should block for at most 20-30ms.
[19:44:47][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86944240 (now=86946281)
[19:44:47][D][main:615]: on_finger_scan_start
[19:44:47][D][fingerprint_grow:323]: Setting LED
[19:44:48][E][fingerprint_grow:467]: No response received from reader
[19:44:48][D][fingerprint_grow:125]: Scan and match
[19:44:48][D][fingerprint_grow:156]: Getting image 1
[19:44:49][E][fingerprint_grow:467]: No response received from reader
[19:44:49][D][fingerprint_grow:179]: Unknown Scan Error: 255
[19:44:49][W][component:214]: Component fingerprint_grow took a long time for an operation (2.02 s).
[19:44:49][W][component:215]: Components should block for at most 20-30ms.
[19:44:49][VV][scheduler:226]: Running interval '' with interval=5000 last_execution=86940275 (now=86946281)
[19:44:49][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86945740 (now=86948319)
[19:44:49][D][main:615]: on_finger_scan_start
[19:44:49][D][fingerprint_grow:323]: Setting LED
[19:44:50][E][fingerprint_grow:467]: No response received from reader
[19:44:50][D][fingerprint_grow:125]: Scan and match
[19:44:50][D][fingerprint_grow:156]: Getting image 1
[19:44:51][E][fingerprint_grow:467]: No response received from reader
[19:44:51][D][fingerprint_grow:179]: Unknown Scan Error: 255
[19:44:51][W][component:214]: Component fingerprint_grow took a long time for an operation (2.02 s).
[19:44:51][W][component:215]: Components should block for at most 20-30ms.
[19:44:51][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86947990 (now=86950354)
[19:44:51][V][fingerprint_grow:021]: No touch sensing
[19:44:51][VV][scheduler:226]: Running interval '' with interval=5000 last_execution=86945275 (now=86950354)
[19:44:52][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86950240 (now=86950995)
[19:44:52][V][fingerprint_grow:021]: No touch sensing
[19:44:52][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86950990 (now=86951746)
[19:44:52][V][fingerprint_grow:021]: No touch sensing
[19:44:53][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86951740 (now=86952490)
[19:44:53][V][fingerprint_grow:021]: No touch sensing
[19:44:54][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86952490 (now=86953240)
[19:44:54][D][main:615]: on_finger_scan_start
[19:44:54][D][fingerprint_grow:323]: Setting LED
[19:44:55][E][fingerprint_grow:467]: No response received from reader
[19:44:55][D][fingerprint_grow:125]: Scan and match
[19:44:55][D][fingerprint_grow:156]: Getting image 1
[19:44:56][E][fingerprint_grow:467]: No response received from reader
[19:44:56][D][fingerprint_grow:179]: Unknown Scan Error: 255
[19:44:56][W][component:214]: Component fingerprint_grow took a long time for an operation (2.02 s).
[19:44:56][W][component:215]: Components should block for at most 20-30ms.
[19:44:56][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86953240 (now=86955276)
[19:44:56][D][main:615]: on_finger_scan_start
[19:44:56][D][fingerprint_grow:323]: Setting LED
[19:44:57][E][fingerprint_grow:467]: No response received from reader
[19:44:57][D][fingerprint_grow:125]: Scan and match
[19:44:57][D][fingerprint_grow:156]: Getting image 1
[19:44:58][E][fingerprint_grow:467]: No response received from reader
[19:44:58][D][fingerprint_grow:179]: Unknown Scan Error: 255
[19:44:58][W][component:214]: Component fingerprint_grow took a long time for an operation (2.02 s).
[19:44:58][W][component:215]: Components should block for at most 20-30ms.
[19:44:58][VV][scheduler:226]: Running interval '' with interval=5000 last_execution=86950275 (now=86955276)
[19:44:58][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86954740 (now=86957315)
[19:44:58][V][fingerprint_grow:021]: No touch sensing
[19:44:58][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86956990 (now=86957745)
[19:44:58][V][fingerprint_grow:021]: No touch sensing
[19:44:59][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86957740 (now=86958490)
[19:44:59][V][fingerprint_grow:021]: No touch sensing
[19:45:00][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86958490 (now=86959243)
[19:45:00][V][fingerprint_grow:021]: No touch sensing
[19:45:01][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86959240 (now=86959990)
[19:45:01][V][fingerprint_grow:021]: No touch sensing
[19:45:01][VV][scheduler:226]: Running interval '' with interval=5000 last_execution=86955275 (now=86960278)
[19:45:01][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86959990 (now=86960741)
[19:45:01][V][fingerprint_grow:021]: No touch sensing
[19:45:02][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86960740 (now=86961493)
[19:45:02][V][fingerprint_grow:021]: No touch sensing
[19:45:03][VV][scheduler:226]: Running interval 'update' with interval=750 last_execution=86961490 (now=86962240)
[19:45:03][V][fingerprint_grow:021]: No touch sensing

Additional information

No response

alexborro commented 6 months ago

Hi @Nadav-K , That is an interesting issue. First I will ask you to update the esphome version to the latest one (2024.3.0 was just released a few hours ago). Remove the external_components session from your yaml file - you no longer need to take it from my branch.

Second, this board you are using has only one pair of UART, I'm not sure if there could by any conflict with the esphome internal logger. So this would be my next recommendation, to use another board if possible. I tested this component with a ESP32-WROOM based board and it works fine.

A third tip is to use the new Sleep Mode integrated in this latest version. It basically powers off the sensor when not being used. That forces a reset in the fingerprint device when you touch its sensor - might help getting rid of the serial comm problem.

Let me know if I can help you with some further debugging.

tlissak commented 4 months ago

Hi

I found the solution The problem is the pin wiring issue Change the wiring as bellow :

.... uart: tx_pin: GPIO16 #Purple Green (GPIO16=D0) rx_pin: GPIO5 #Yellow (GPIO5=D1) baud_rate: 57600 .... status_led: pin: GPIO2 #D4 Empty No pin .... fingerprint_grow: sensing_pin: GPIO4 #Blue (GPIO4=D2)