esphome / issues

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

GROW R503 fingerprint reader can't recognize fingeprints after waking up with error Timed out waiting for sensor wake-up #6128

Open Paclanc opened 1 month ago

Paclanc commented 1 month ago

The problem

I've started using the R503 grow fingerprint sensor on a ESP32-ETH01 board, alongside some binary sensor for the door, the doorbell and the door lock.

I starded noticing that sometimes, when I touch the sensor, it doesn't recognize my fingerprint, not until it goes to sleep and then wakes up again.

[16:05:44][E][fingerprint_grow:509]: Timed out waiting for sensor wake-up
[16:05:45][E][fingerprint_grow:467]: No response received from reader
[16:05:45][E][fingerprint_grow:522]: Wrong password
[16:05:45][E][fingerprint_grow:457]: Unknown response received from reader: 0x21
[16:05:45][D][fingerprint_grow:179]: Unknown Scan Error: 33
[16:05:45][W][component:237]: Component fingerprint_grow took a long time for an operation (1032 ms).
[16:05:45][W][component:238]: Components should block for at most 30 ms.

I have configured the sensor as the doc says in order to use sleep mode. (However, I couldn't find a BC327 transistor, so I used a BC558)

These are the full logs: On these, the fingerprints recognizes my finger. Then, after going to sleep it does not. Afther another wake up, it works again.

INFO ESPHome 2024.7.3
INFO Reading configuration /config/esphome/esp32-casa-puerta-eth.yaml...
WARNING GPIO2 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Starting log output from 192.168.31.185 using esphome API
INFO Successfully connected to esp32-casa-puerta-eth @ 192.168.31.185 in 0.124s
INFO Successful handshake with esp32-casa-puerta-eth @ 192.168.31.185 in 0.070s
[16:05:36][I][app:100]: ESPHome version 2024.7.3 compiled on Aug  1 2024, 09:11:43
[16:05:36][C][wifi:599]: WiFi:
[16:05:36][C][wifi:427]:   Local MAC: BC:DD:C2:CC:6B:E0
[16:05:36][C][wifi:432]:   SSID: [redacted]
[16:05:36][C][wifi:435]:   IP Address: 192.168.31.185
[16:05:36][C][wifi:439]:   BSSID: [redacted]
[16:05:36][C][wifi:440]:   Hostname: 'esp32-casa-puerta-eth'
[16:05:36][C][wifi:442]:   Signal strength: -75 dB ▂▄▆█
[16:05:36][C][wifi:446]:   Channel: 1
[16:05:36][C][wifi:447]:   Subnet: 255.255.255.0
[16:05:36][C][wifi:448]:   Gateway: 192.168.31.1
[16:05:36][C][wifi:449]:   DNS1: 192.168.31.1
[16:05:36][C][wifi:450]:   DNS2: 0.0.0.0
[16:05:36][C][logger:185]: Logger:
[16:05:36][C][logger:186]:   Level: DEBUG
[16:05:36][C][logger:188]:   Log Baud Rate: 115200
[16:05:36][C][logger:189]:   Hardware UART: UART0
[16:05:36][C][uart.arduino_esp32:151]: UART Bus 1:
[16:05:36][C][uart.arduino_esp32:152]:   TX Pin: GPIO17
[16:05:36][C][uart.arduino_esp32:153]:   RX Pin: GPIO5
[16:05:36][C][uart.arduino_esp32:155]:   RX Buffer Size: 256
[16:05:36][C][uart.arduino_esp32:157]:   Baud Rate: 57600 baud
[16:05:36][C][uart.arduino_esp32:158]:   Data Bits: 8
[16:05:36][C][uart.arduino_esp32:159]:   Parity: NONE
[16:05:36][C][uart.arduino_esp32:160]:   Stop bits: 1
[16:05:36][C][gpio.output:010]: GPIO Binary Output:
[16:05:36][C][gpio.output:011]:   Pin: GPIO2
[16:05:36][C][gpio.output:012]:   Inverted: YES
[16:05:36][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Puerta de casa'
[16:05:36][C][gpio.binary_sensor:015]:   Device Class: 'door'
[16:05:36][C][gpio.binary_sensor:016]:   Pin: GPIO33
[16:05:36][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Timbre de casa'
[16:05:36][C][gpio.binary_sensor:016]:   Pin: GPIO32
[16:05:36][C][template.text_sensor:020]: Template Sensor 'Estado del lector de huellas'
[16:05:36][C][template.text_sensor:020]: Template Sensor 'Modo del lector de huellas'
[16:05:36][C][template.number:050]: Template Number 'ID seleccionado'
[16:05:36][C][template.number:051]:   Optimistic: YES
[16:05:36][C][template.number:052]:   Update Interval: 60.0s
[16:05:36][C][fingerprint_grow:537]: GROW_FINGERPRINT_READER:
[16:05:36][C][fingerprint_grow:538]:   System Identifier Code: 0x0000
[16:05:36][C][fingerprint_grow:540]:   Touch Sensing Pin: GPIO4
[16:05:36][C][fingerprint_grow:542]:   Sensor Power Pin: GPIO14
[16:05:36][C][fingerprint_grow:544]:   Idle Period to Sleep: 1000 ms
[16:05:36][C][fingerprint_grow:548]:   Update Interval: 0.5s
[16:05:36][C][fingerprint_grow:550]:   Fingerprint Count 'Fingerprint Count'
[16:05:36][C][fingerprint_grow:550]:     State Class: ''
[16:05:36][C][fingerprint_grow:550]:     Unit of Measurement: ''
[16:05:36][C][fingerprint_grow:550]:     Accuracy Decimals: 0
[16:05:36][C][fingerprint_grow:550]:     Icon: 'mdi:fingerprint'
[16:05:36][C][fingerprint_grow:551]:     Current Value: 15
[16:05:36][C][fingerprint_grow:554]:   Status 'Fingerprint Status'
[16:05:36][C][fingerprint_grow:554]:     State Class: ''
[16:05:36][C][fingerprint_grow:554]:     Unit of Measurement: ''
[16:05:36][C][fingerprint_grow:554]:     Accuracy Decimals: 0
[16:05:36][C][fingerprint_grow:555]:     Current Value: 4
[16:05:36][C][fingerprint_grow:558]:   Capacity 'Fingerprint Capacity'
[16:05:36][C][fingerprint_grow:558]:     State Class: ''
[16:05:36][C][fingerprint_grow:558]:     Unit of Measurement: ''
[16:05:36][C][fingerprint_grow:558]:     Accuracy Decimals: 0
[16:05:36][C][fingerprint_grow:558]:     Icon: 'mdi:database'
[16:05:36][C][fingerprint_grow:559]:     Current Value: 200
[16:05:36][C][fingerprint_grow:562]:   Security Level 'Fingerprint Security Level'
[16:05:36][C][fingerprint_grow:562]:     State Class: ''
[16:05:36][C][fingerprint_grow:562]:     Unit of Measurement: ''
[16:05:36][C][fingerprint_grow:562]:     Accuracy Decimals: 0
[16:05:36][C][fingerprint_grow:562]:     Icon: 'mdi:security'
[16:05:36][C][fingerprint_grow:563]:     Current Value: 3
[16:05:36][C][fingerprint_grow:566]:   Last Finger ID 'Fingerprint Last Finger ID'
[16:05:36][C][fingerprint_grow:566]:     State Class: ''
[16:05:36][C][fingerprint_grow:566]:     Unit of Measurement: ''
[16:05:36][C][fingerprint_grow:566]:     Accuracy Decimals: 0
[16:05:36][C][fingerprint_grow:566]:     Icon: 'mdi:account'
[16:05:36][C][fingerprint_grow:567]:     Current Value: 2
[16:05:36][C][fingerprint_grow:570]:   Last Confidence 'Fingerprint Last Confidence'
[16:05:36][C][fingerprint_grow:570]:     State Class: ''
[16:05:36][C][fingerprint_grow:570]:     Unit of Measurement: ''
[16:05:36][C][fingerprint_grow:570]:     Accuracy Decimals: 0
[16:05:36][C][fingerprint_grow:570]:     Icon: 'mdi:account-check'
[16:05:36][C][fingerprint_grow:571]:     Current Value: 188
[16:05:36][C][captive_portal:088]: Captive Portal:
[16:05:36][C][mdns:116]: mDNS:
[16:05:36][C][mdns:117]:   Hostname: esp32-casa-puerta-eth
[16:05:36][C][esphome.ota:073]: Over-The-Air updates:
[16:05:36][C][esphome.ota:074]:   Address: esp32-casa-puerta-eth.local:3232
[16:05:36][C][esphome.ota:075]:   Version: 2
[16:05:36][C][esphome.ota:078]:   Password configured
[16:05:36][C][safe_mode:018]: Safe Mode:
[16:05:36][C][safe_mode:020]:   Boot considered successful after 60 seconds
[16:05:36][C][safe_mode:021]:   Invoke after 10 boot attempts
[16:05:36][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[16:05:36][C][api:139]: API Server:
[16:05:36][C][api:140]:   Address: esp32-casa-puerta-eth.local:6053
[16:05:36][C][api:142]:   Using noise encryption: YES
[16:05:38][D][fingerprint_grow:125]: Scan and match
[16:05:38][D][fingerprint_grow:156]: Getting image 1
[16:05:38][D][fingerprint_grow:507]: Sensor has woken up!
[16:05:39][D][fingerprint_grow:183]: Processing image 1
[16:05:39][I][fingerprint_grow:188]: Processed image 1
[16:05:39][D][fingerprint_grow:134]: Fingerprint matched
[16:05:39][D][sensor:094]: 'Fingerprint Last Finger ID': Sending state 2.00000  with 0 decimals of accuracy
[16:05:39][D][sensor:094]: 'Fingerprint Last Confidence': Sending state 176.00000  with 0 decimals of accuracy
[16:05:39][D][fingerprint_grow:348]: Setting Aura LED
[16:05:39][D][fingerprint_grow:352]: Aura LED set
[16:05:39][D][text_sensor:064]: 'Estado del lector de huellas': Sending state 'Huella reconocida 2, confidencia 176'
[16:05:39][D][button:010]: 'Abrir puerta casa' Pressed.
[16:05:39][D][main:578]: Se abrió la puerta de casa
[16:05:39][W][component:237]: Component fingerprint_grow took a long time for an operation (1001 ms).
[16:05:39][W][component:238]: Components should block for at most 30 ms.
[16:05:40][D][fingerprint_grow:533]: Fingerprint sensor is now in sleep mode.
[16:05:44][D][fingerprint_grow:125]: Scan and match
[16:05:44][D][fingerprint_grow:156]: Getting image 1
[16:05:44][E][fingerprint_grow:509]: Timed out waiting for sensor wake-up
[16:05:45][E][fingerprint_grow:467]: No response received from reader
[16:05:45][E][fingerprint_grow:522]: Wrong password
[16:05:45][E][fingerprint_grow:457]: Unknown response received from reader: 0x21
[16:05:45][D][fingerprint_grow:179]: Unknown Scan Error: 33
[16:05:45][W][component:237]: Component fingerprint_grow took a long time for an operation (1032 ms).
[16:05:45][W][component:238]: Components should block for at most 30 ms.
[16:05:45][D][fingerprint_grow:125]: Scan and match
[16:05:45][D][fingerprint_grow:156]: Getting image 1
[16:05:45][E][fingerprint_grow:457]: Unknown response received from reader: 0x21
[16:05:45][D][fingerprint_grow:179]: Unknown Scan Error: 33
[16:05:47][D][fingerprint_grow:533]: Fingerprint sensor is now in sleep mode.
[16:05:48][D][fingerprint_grow:125]: Scan and match
[16:05:48][D][fingerprint_grow:156]: Getting image 1
[16:05:48][D][fingerprint_grow:507]: Sensor has woken up!
[16:05:49][D][fingerprint_grow:183]: Processing image 1
[16:05:49][I][fingerprint_grow:188]: Processed image 1
[16:05:49][D][fingerprint_grow:134]: Fingerprint matched
[16:05:49][D][sensor:094]: 'Fingerprint Last Finger ID': Sending state 2.00000  with 0 decimals of accuracy
[16:05:49][D][sensor:094]: 'Fingerprint Last Confidence': Sending state 145.00000  with 0 decimals of accuracy
[16:05:49][D][fingerprint_grow:348]: Setting Aura LED
[16:05:49][D][fingerprint_grow:352]: Aura LED set
[16:05:49][D][text_sensor:064]: 'Estado del lector de huellas': Sending state 'Huella reconocida 2, confidencia 145'
[16:05:49][D][button:010]: 'Abrir puerta casa' Pressed.
[16:05:49][D][main:578]: Se abrió la puerta de casa
[16:05:49][W][component:237]: Component fingerprint_grow took a long time for an operation (945 ms).
[16:05:49][W][component:238]: Components should block for at most 30 ms.
[16:05:50][D][fingerprint_grow:533]: Fingerprint sensor is now in sleep mode.
[16:05:50][D][binary_sensor:036]: 'Puerta de casa': Sending state ON
[16:05:54][D][binary_sensor:036]: 'Puerta de casa': Sending state OFF
[16:19:44][D][binary_sensor:036]: 'Puerta de casa': Sending state ON
[16:19:55][D][binary_sensor:036]: 'Puerta de casa': Sending state OFF
[16:21:03][D][binary_sensor:036]: 'Puerta de casa': Sending state ON
[16:21:07][D][binary_sensor:036]: 'Puerta de casa': Sending state OFF
[16:22:59][D][fingerprint_grow:125]: Scan and match
[16:22:59][D][fingerprint_grow:156]: Getting image 1
[16:22:59][E][fingerprint_grow:511]: Received wrong byte from the sensor during wake-up: 0xFD
[16:23:00][E][fingerprint_grow:467]: No response received from reader
[16:23:00][E][fingerprint_grow:522]: Wrong password
[16:23:00][E][fingerprint_grow:457]: Unknown response received from reader: 0x21
[16:23:00][D][fingerprint_grow:179]: Unknown Scan Error: 33
[16:23:00][W][component:237]: Component fingerprint_grow took a long time for an operation (1040 ms).
[16:23:00][W][component:238]: Components should block for at most 30 ms.
[16:23:00][D][fingerprint_grow:125]: Scan and match
[16:23:00][D][fingerprint_grow:156]: Getting image 1
[16:23:00][E][fingerprint_grow:457]: Unknown response received from reader: 0x21
[16:23:00][D][fingerprint_grow:179]: Unknown Scan Error: 33
[16:23:00][D][fingerprint_grow:125]: Scan and match
[16:23:00][D][fingerprint_grow:156]: Getting image 1
[16:23:00][E][fingerprint_grow:457]: Unknown response received from reader: 0x21
[16:23:00][D][fingerprint_grow:179]: Unknown Scan Error: 33
[16:23:01][D][fingerprint_grow:125]: Scan and match
[16:23:01][D][fingerprint_grow:156]: Getting image 1
[16:23:01][E][fingerprint_grow:457]: Unknown response received from reader: 0x21
[16:23:01][D][fingerprint_grow:179]: Unknown Scan Error: 33
[16:23:02][D][fingerprint_grow:533]: Fingerprint sensor is now in sleep mode.
[16:23:07][D][fingerprint_grow:125]: Scan and match
[16:23:07][D][fingerprint_grow:156]: Getting image 1
[16:23:07][D][fingerprint_grow:507]: Sensor has woken up!
[16:23:08][D][fingerprint_grow:183]: Processing image 1
[16:23:08][I][fingerprint_grow:188]: Processed image 1
[16:23:08][D][fingerprint_grow:134]: Fingerprint matched
[16:23:08][D][sensor:094]: 'Fingerprint Last Finger ID': Sending state 9.00000  with 0 decimals of accuracy
[16:23:08][D][sensor:094]: 'Fingerprint Last Confidence': Sending state 63.00000  with 0 decimals of accuracy
[16:23:08][D][fingerprint_grow:348]: Setting Aura LED
[16:23:08][D][fingerprint_grow:352]: Aura LED set
[16:23:08][D][text_sensor:064]: 'Estado del lector de huellas': Sending state 'Huella reconocida 9, confidencia 63'
[16:23:08][D][button:010]: 'Abrir puerta casa' Pressed.
[16:23:08][D][main:578]: Se abrió la puerta de casa
[16:23:08][W][component:237]: Component fingerprint_grow took a long time for an operation (1018 ms).
[16:23:08][W][component:238]: Components should block for at most 30 ms.
[16:23:10][D][fingerprint_grow:533]: Fingerprint sensor is now in sleep mode.
[16:23:12][D][binary_sensor:036]: 'Puerta de casa': Sending state ON
[16:23:18][D][binary_sensor:036]: 'Puerta de casa': Sending state OFF
[16:27:02][D][binary_sensor:036]: 'Puerta de casa': Sending state ON
[16:27:24][D][binary_sensor:036]: 'Puerta de casa': Sending state OFF

Which version of ESPHome has the issue?

2024.7.3

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2024.7.4

What platform are you using?

ESP32

Board

ESP32-ETH01

Component causing the issue

No response

Example YAML snippet

esphome:
  name: esp32-casa-puerta-eth
  friendly_name: esp32-casa-puerta-eth

esp32:
  board: wt32-eth01
  framework:
    type: arduino

# Enable logging
logger:

ota:
  - platform: esphome
    password: "fc271947aa9cbf4ed9f61e062aa1c4bc"

wifi:
  ssid: !secret wifi_lanc
  password: !secret wifi_lancs

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-Casa-Puerta-Eth"
    password: "XXXXXXXXXX"

captive_portal:

# ethernet:
#   type: LAN8720
#   mdc_pin: GPIO23
#   mdio_pin: GPIO18
#   clk_mode: GPIO0_IN
#   phy_addr: 1
#   power_pin: GPIO16

########## RELAY CONTROLADOR DE PUERTA ##########
#Conectar el relay al 3v3 y GND del ESP32
output:
  - platform: gpio
    id: relay
    inverted: true
    pin: GPIO02 #Usar el 14 causa bootloop

#Sensor de puerta, tiene que estar en pullup
binary_sensor:
  - platform: gpio
    id: sensor_puerta
    name: Puerta de casa
    pin: 
      number: GPIO33
      mode:
        input: true
        pullup: true
        output: false
        open_drain: false
        pulldown: false
    device_class: door
    filters:
      - delayed_on: 10ms   
  - platform: gpio
    id: boton_timbre
    name: Timbre de casa
    pin:
      # Connected to GPIO on the ESP-01S.
      number: GPIO32
      mode: INPUT_PULLUP
      inverted: true
    filters:
      - delayed_off: 1200ms               

################ LECTOR DE HUELLAS ################
text_sensor:
  - platform: template
    name: "Estado del lector de huellas"
    id: fingerprint_state
  - platform: template
    name: "Modo del lector de huellas"
    id: fingerprint_mode

sensor:
  - platform: fingerprint_grow
    fingerprint_count:
      name: "Fingerprint Count"
      id: 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"

number:
  - platform: template
    id: id_selecccionador
    name: "ID seleccionado"
    min_value: 1
    max_value: 200
    step: 1
    initial_value: 1
    optimistic: True
    mode: BOX

button:
  #Boton que abre la puerta
  - platform: template
    id: apertura
    name: Abrir puerta casa
    on_press:
      - logger.log: "Se abrió la puerta de casa"
      - output.turn_on: relay
      - delay: 1000ms
      - output.turn_off: relay
      - delay: 3000ms  
  #Botones para registras una huella nueva    
  - platform: template
    id: aprender_huella
    name: Registrar huella
    on_press:
      - fingerprint_grow.enroll:
          finger_id: !lambda |-
            return id(id_selecccionador).state;
          num_scans: 4    
      - text_sensor.template.publish:
          id: fingerprint_state
          state: "Coloque un dedo en el escaner"
      - text_sensor.template.publish:
          id: fingerprint_mode
          state: "Aprendiendo"
      - homeassistant.service:
          service: script.registrar_nombre_huella                   
      - logger.log: "Nuevo registro de huella comenzado"
  #Boton para cancelar el registro    
  - platform: template
    id: cancelar_aprender
    name: Cancelar registro nuevo
    on_press:
      - fingerprint_grow.cancel_enroll:
      - text_sensor.template.publish:
          id: fingerprint_mode
          state: "Cancelando"  
      - delay: 2s
      - text_sensor.template.publish:
          id: fingerprint_mode
          state: "Leyendo"    
      - homeassistant.service:
          service: script.borrar_nombre_huella   

      - logger.log: "Nuevo registro de huella cancelado"
  #Boton para borrar el registro seleccionado    
  - platform: template
    id: borrar_huella
    name: Borrar huella
    on_press:
      - fingerprint_grow.delete:
          finger_id: !lambda |-
            return id(id_selecccionador).state;
      - homeassistant.service:
          service: script.borrar_nombre_huella             
      - logger.log: "Huella borrada"

uart:
  rx_pin: GPIO05
  tx_pin: GPIO17
  baud_rate: 57600

fingerprint_grow:
  password: 0x2014ADCC  # New password  
  sensing_pin: GPIO04
  #Estos valores solo disponibles con Resistencia y BC327
  sensor_power_pin:
      number: GPIO14
      inverted: true
  idle_period_to_sleep: 1s

  #Cuando se escanea una huella conocida
  on_finger_scan_matched:
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 100
        color: GREEN
        count: 1    
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Huella reconocida " + to_string(finger_id) + ", confidencia " + to_string(confidence);'
    #Pushing a tag_scanned event based on finger_id only if confidence is greater than 50
    # - if:
    #     condition:
    #       lambda: 'return confidence > 50;'
    #     then:
    #       - homeassistant.tag_scanned: !lambda |-
    #           switch (finger_id) {
    #             case 1:
    #               return "Paclanc PD";
    #             case 2:
    #               return "Paclanc ID";                  
    #             case 3:
    #               return "Paclanc PI";
    #             case 4:
    #               return "Ale";                  
    #             default:
    #               return "person_unknown";
    #           }

    - homeassistant.event:
        event: esphome.test_node_finger_scan_matched
        data:
          finger_id: !lambda 'return finger_id;'
          confidence: !lambda 'return confidence;'
    - button.press: 
        id: apertura      

  #Cuando  se escanea una huella desconocida
  on_finger_scan_unmatched:
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 2
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Huella desconocida"
    - homeassistant.event:
        event: esphome.test_node_finger_scan_unmatched

  #Cuando se prepara el escaneo para agregar una nueva huella a la base de datos
  on_enrollment_scan:
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: BLUE
        count: 2
    - fingerprint_grow.aura_led_control:
        state: ALWAYS_ON
        speed: 0
        color: PURPLE
        count: 0
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Registrando en slot " + to_string(finger_id) + ", escaneado " + to_string(scan_num) + " vez(veces)";'
    - text_sensor.template.publish:
        id: fingerprint_mode
        state: "Aprendiendo"   
    - homeassistant.event:
        event: esphome.test_node_enrollment_scan
        data:
          finger_id: !lambda 'return finger_id;'
          scan_num: !lambda 'return scan_num;'        

  #Cuando se ha agregado una nueva huella a la base de datos
  on_enrollment_done:
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 100
        color: BLUE
        count: 2
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Huella guardada en slot " + to_string(finger_id);'
    - text_sensor.template.publish:
        id: fingerprint_mode
        state: "Leyendo"          
    - homeassistant.event:
        event: esphome.test_node_enrollment_done
        data:
          finger_id: !lambda 'return finger_id;'

  #Cuando no se pudo agregar una huella nueva o algo fallo
  on_enrollment_failed:
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 4
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "No se pudo guardar la huella en el slot " + to_string(finger_id);'       
    # - delay: 3s
    # - text_sensor.template.publish:
    #     id: fingerprint_state
    #     state: !lambda 'return "Reintentando registro en slot " + to_string(finger_id) + " en 3 segundos...";'
    # - delay: 3s
    # - fingerprint_grow.enroll:
    #       finger_id: !lambda 'return finger_id;'           
    #       num_scans: 4    
    # - text_sensor.template.publish:
    #     id: fingerprint_state
    #     state: "Coloque un dedo en el escaner"          
    - homeassistant.event:
        event: esphome.test_node_enrollment_failed
        data:
          finger_id: !lambda 'return finger_id;'

# Enable Home Assistant API
api:
  encryption:
    key: "6vC3G0OUMuwMHouT8CGU7h0i+7f5crIt+0j5rJ6xzYc="
  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: enroll_next # Idea by Ralf Klüber (thanks!)
    variables:
      num_scans: int
    then:
      - fingerprint_grow.enroll:
          finger_id: !lambda 'return id(fingerprint_count).state;'
          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:

Anything in the logs that might be useful for us?

No response

Additional information

No response

Paclanc commented 4 weeks ago

Any comments?

nguyenquangduc commented 2 weeks ago

Have you solved this problem? How to solve it? I have the same problem

Paclanc commented 2 weeks ago

No, I haven't solved it yet. I don't know if it is software related or hardware related.

Are you using the BC327 transistor? Or extending your reader with Ethernet cable?