🚘 Garage Fingerprint Sensor

Yes, it is possible to install any older version.
Take a look here

1 Like

Hello, I am turning to you because I have been looking for several days and I cannot find the solution.
in HA I have the IDs which are displayed but I cannot see the names which correspond to the ID, they are however registered in my yaml file
What am I doing wrong
THANKS

esphome:
  name: capteur-emprunte-digital
  friendly_name: capteur emprunte digital

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret api_password
  encryption:
    key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  
  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;'
      - fingerprint_grow.aura_led_control:
          state: ALWAYS_ON
          speed: 0
          color: PURPLE
          count: 0
  - 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:

ota:
  password: "xxxxxxxxxxxxxxxxxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  power_save_mode: NONE
  reboot_timeout: 5 min

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Capteur-Emprunte-Digital"
    password: "xxxxxxxxxxxxxxxxxx"

captive_portal:

uart:
  rx_pin: GPIO19
  tx_pin: GPIO21
  baud_rate: 57600

fingerprint_grow:
   # sécurisez votre systÚme !ATTENTION à ne jamais perdre le mot de passe
  password: xxxxxxxxxxxxxxxxxxx      # Mot de passe existant, peut ĂȘtre omis s'il s'agit de la valeur par dĂ©faut 0x00
  #new_password: xxxxxxxxxxxxxxxx  # Nouveau mot de passe ensuite mettre Ă  jour le mot de passe existant avec le nouveau.
  sensing_pin: GPIO4 #GPIO32
  on_finger_scan_matched:

    - homeassistant.event:
        event: esphome.test_node_finger_scan_matched
        data:
          finger_id: !lambda 'return finger_id;'
          confidence: !lambda 'return confidence;'  
    #- switch.turn_on: trigger_relay
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 200
        color: BLUE
        count: 1
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "doigt autorisé"
    - delay: 2s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Scan your finger"
        
# Pousser un événement tag_scanned basé sur finger_id uniquement si la confiance est supérieure à 50
# Créer une balise avec nom d'utilisateur pour chaque numéro d'identifiaction
    - if:
        condition:
          lambda: 'return confidence > 50;'
        then:
          - homeassistant.tag_scanned: !lambda |-
              switch (finger_id) {
                case 0:
                  return "Seba";
                case 1:
                  return "person_1";
                case 2:
                  return "person_2";
                case 3:
                  return "person_3";                  
                default:
                  return "person_inconnu";
              }   
        
  on_finger_scan_unmatched:
    - homeassistant.event:
        event: esphome.test_node_finger_scan_unmatched
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 2
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "doigt refusé"
    - delay: 2s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Scan your finger"
  on_enrollment_scan:
    - homeassistant.event:
        event: esphome.test_node_enrollment_scan
        data:
          finger_id: !lambda 'return finger_id;'
          scan_num: !lambda 'return scan_num;'
    - 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: "Finger scanné"
    - delay: 2s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Scan your finger"
  on_enrollment_done:
    - homeassistant.event:
        event: esphome.test_node_enrollment_done
        data:
          finger_id: !lambda 'return finger_id;'
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 100
        color: BLUE
        count: 2
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "emprunte enrgistée"
    - delay: 2s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Scan your finger"
  on_enrollment_failed:
    - homeassistant.event:
        event: esphome.test_node_enrollment_failed
        data:
          finger_id: !lambda 'return finger_id;'
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 4
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Failed to enroll into slot " + to_string(finger_id);'
    - delay: 3s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Retrying enrollment into slot " + to_string(finger_id) + " in 3 seconds...";'
    - delay: 3s
    - fingerprint_grow.enroll: !lambda 'return finger_id;'
text_sensor:
  - platform: template
    id: fingerprint_state
    name: "Fingerprint State"
  - platform: wifi_info
    ip_address:
      name: ${entity_name} ESP IP Address
      entity_category: "diagnostic"
      disabled_by_default: True
      icon: mdi:ip-network
    mac_address:
      name: ${entity_name} ESP MAC
      entity_category: "diagnostic"
      icon: mdi:ip-network
      disabled_by_default: True
# Intégration des entités capteur pour Lovelace
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"
  - platform: uptime
    name: ${entity_name} ESP Uptime
    id: sys_uptime
    update_interval: 60s
    disabled_by_default: True
  - platform: wifi_signal 
    name: ${entity_name} RSSI
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"
button:
  - platform: restart
    icon: mdi:power-cycle
    name: ${entity_name} ESP Reboot
    entity_category: diagnostic

Hi diagus, did you solve the problem of installing the new sensor in a button? If so, could you tell me which components you used?

Ive been eyeing one of these for a while but, was unsure about how well it worked. Now that its been a while, can you do an update on it? Any malfunctions? Any weathering? No problems at all?

No problems for me. It’s installed under a cover, but outside. No rust or anything like that. Still works fine since the day I installed it.

Does anyone else have problems with R307 sensor? Says “finger misplaced” 99 times out of 100. Totally unusable.

Bought it from aliexpress so it may be cheap copy.

Never used it, but generally speaking optical sensors are inferior to capacitive ones, so I wouldn’t put too much faith in the R307.

I need help, every time I scan my finger I get this:
[03:30:47][W][component:237]: Component fingerprint_grow took a long time for an operation (61 ms).
[03:30:47][W][component:238]: Components should block for at most 30 ms.

esphome:
  name: door-controller
  friendly_name: Door Controller 

esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino

# Enable logging
logger:
  baud_rate: 9600

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

  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
    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:    

ota:
  password: "secretpasswordhere"
  platform: esphome  

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

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Door-Controller Fallback Hotspot"
    password: "6VJ7TXB4f3Z6"


captive_portal:

uart:
  rx_pin: GPIO21 #Blue
  tx_pin: GPIO20 #Green
  baud_rate: 57600
  id: biometrics

binary_sensor:
  - platform: gpio
    pin: GPIO4 #Light Green
    name: "Touch Top"
    id: touch1

  - platform: gpio
    pin: GPIO3 #Dark Brown
    name: "Touch Bottom" 
    id: touch2

  - platform: gpio
    pin:
      number: GPIO2 #Dark Blue
      inverted: False
    name: "Lock Sensor"
    device_class: lock
    id: locksensor

  - platform: gpio
    pin:
      number: GPIO1 #Pale Purple
      inverted: False
    name: "Door Sensor"
    filters:
      - delayed_on: 50ms    
    device_class: door
    id: doorsensor

  - platform: fingerprint_grow
    name: "Fingerprint Scanner"
    id: fingerprintscanner

  - platform: fingerprint_grow
    id: fingerprint_enrolling
    name: "Fingerprint Enrolling"    

lock:
  - platform: template
    name: "Door Lock"
    lambda: |-
      if (id(locksensor).state) {
        return LOCK_STATE_UNLOCKED;
      } else {
        return LOCK_STATE_LOCKED;
      }
    lock_action:
      then:
      - if:
          condition:
            and:
              - binary_sensor.is_off: doorsensor
          then:
            - switch.turn_on: lockclose
          else:
            - text_sensor.template.publish:
                id: door_state
                state: "Door is Open"         
    unlock_action:
      - switch.turn_on: lockopen
    open_action:
      - switch.turn_on: lockopen
    on_lock:
    - text_sensor.template.publish:
        id: door_state
        state: "Door Locked"
    on_unlock:
    - text_sensor.template.publish:
        id: door_state
        state: "Door Unlocked" 

switch:
  - platform: gpio
    name: "Lock"
    pin:
      number: GPIO8 #Yellow
      inverted: true
    id: lockclose
    internal: True
    on_turn_on:
    - delay: 500ms
    - switch.turn_off: lockclose    

  - platform: gpio
    name: "Unlock"
    pin:
      number: GPIO9 #Grey
      inverted: true
    id: lockopen
    internal: True    
    on_turn_on:
    - delay: 500ms
    - switch.turn_off: lockopen

  - platform: restart
    name: "Restart"

light:
  - platform: esp32_rmt_led_strip
    rgb_order: GRB
    pin: GPIO7 #White
    num_leds: 10
    rmt_channel: 0
    chipset: ws2812
    name: "Status Lights"
    id: statuslights
    internal: True

  - platform: partition
    name: "Lock Status"
    id: lockstatus
    internal: false
    restore_mode: RESTORE_DEFAULT_OFF
    segments:
      - id: statuslights
        from: 0
        to: 0                     
    effects:
      - strobe:
          name: Door Locked
          colors:
            - state: true
              brightness: 50%
              red: 0%
              green: 100%
              blue: 0%
              duration: 1s
            - state: false
              duration: 500ms
      - strobe:
          name: Door Closed
          colors:
            - state: true
              brightness: 50%
              red: 0%
              green: 0%
              blue: 100%
              duration: 1s
            - state: false
              duration: 500ms
      - strobe:
          name: Door Open
          colors:
            - state: true
              brightness: 50%
              red: 100%
              green: 0%
              blue: 0%
              duration: 1s
            - state: false
              duration: 500ms

  - platform: partition
    name: "Ring Light"
    id: ringlight
    internal: false
    restore_mode: RESTORE_DEFAULT_OFF
    segments:
      - id: statuslights
        from: 1
        to: 9    
    effects:
      - strobe:
          name: Proximity
          colors:
            - state: true
              brightness: 50%
              red: 100%
              green: 100%
              blue: 100%
              duration: 2s
              transition_length: 1s
            - state: false
              duration: 1s
              transition_length: 500ms                  
      - addressable_color_wipe:
          name: Lock Effect
          colors:
            - red: 0%
              green: 0%
              blue: 0%
              num_leds: 8
              gradient: False
            - red: 25%
              green: 25%
              blue: 75%
              num_leds: 5
              gradient: True        
          add_led_interval: 50ms
          reverse: True
      - addressable_color_wipe:
          name: Unlock Effect
          colors:
            - red: 0%
              green: 0%
              blue: 0%
              num_leds: 8
              gradient: False
            - red: 25%
              green: 25%
              blue: 75%
              num_leds: 5
              gradient: True              
          add_led_interval: 50ms
          reverse: False


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

  - platform: template
    name: "Door State"
    id: door_state    

fingerprint_grow:
  uart_id: biometrics
  id: fingerprint
  sensing_pin: GPIO10 #Purple
  password: !secret fingerprint_password
   
  on_finger_scan_start:
  - fingerprint_grow.aura_led_control:
      state: ALWAYS_ON
      color: GREEN
      speed: 0
      count: 0
  
  on_finger_scan_invalid:
    - homeassistant.event:
        event: esphome.test_node_finger_scan_invalid
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Invalid Finger"        
  
  on_finger_scan_matched:
    - homeassistant.event:
        event: esphome.test_node_finger_scan_matched
        data:
          finger_id: !lambda 'return finger_id;'
          confidence: !lambda 'return confidence;'
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 200
        color: BLUE
        count: 1
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 2

  on_finger_scan_unmatched:
    - homeassistant.event:
        event: esphome.test_node_finger_scan_unmatched
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Unauthorized Finger"        
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 2

  on_finger_scan_misplaced:
    - homeassistant.event:
        event: esphome.frontdoor_finger_scan_misplaced
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Misplaced finger"
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: PURPLE
        count: 2

  on_enrollment_scan:
    - homeassistant.event:
        event: esphome.test_node_enrollment_scan
        data:
          finger_id: !lambda 'return finger_id;'
          scan_num: !lambda 'return scan_num;'
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Enrolling into slot " + to_string(finger_id) + ", scanned " + to_string(scan_num) + " time(s)";'          
    - 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

  on_enrollment_done:
    - homeassistant.event:
        event: esphome.test_node_enrollment_done
        data:
          finger_id: !lambda 'return finger_id;'
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Enrolled into slot " + to_string(finger_id);'          
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 100
        color: BLUE
        count: 2

  on_enrollment_failed:
    - homeassistant.event:
        event: esphome.test_node_enrollment_failed
        data:
          finger_id: !lambda 'return finger_id;'
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Failed to enroll into slot " + to_string(finger_id);'
    # Retry enrollment into the same slot
    - delay: 3s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: !lambda 'return "Retrying enrollment into slot " + to_string(finger_id) + " in 3 seconds...";'
    - delay: 3s
    - fingerprint_grow.enroll: !lambda 'return finger_id;'
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 4

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


It’s just a warning, does the sensor work fine?

The sensor seems to work fine, when I test the reader I get a Misplaced finger message, and I can’t enroll any fingerprints.

I disabled the sensing pin in esphome, now the reader works fine. Does the pin send an hi/low signal or does it send data?

this is a great post. thanks for all the great info and inspiration to make (trying to make) this fingerprint sensor. I keep getting this error when I compile.

[19:23:14][E][component:082]:   Component fingerprint_grow is marked FAILED

still pretty new to esphome, would love some input to what I may have wrong. sorry for so much info, my yaml file is below.

========================= [SUCCESS] Took 3.56 seconds =========================
INFO Successfully compiled program.
INFO Connecting to 192.168.10.197
INFO Uploading /data/build/fingerprint/.pioenvs/fingerprint/firmware.bin (983680 bytes)
Uploading: [============================================================] 100% Done...

INFO Upload took 11.93 seconds, waiting for result...
INFO OTA successful
INFO Successfully uploaded program.
INFO Starting log output from 192.168.10.197 using esphome API
INFO Successfully connected to fingerprint @ 192.168.10.197 in 11.260s
INFO Successful handshake with fingerprint @ 192.168.10.197 in 0.081s
[19:23:13][I][app:100]: ESPHome version 2024.7.3 compiled on Aug 20 2024, 16:13:56
[19:23:13][C][wifi:599]: WiFi:
[19:23:13][C][wifi:427]:   Local MAC: FC:E8:C0:7E:60:D8
[19:23:13][C][wifi:432]:   SSID: [redacted]
[19:23:13][C][wifi:435]:   IP Address: 192.168.10.197
[19:23:13][C][wifi:439]:   BSSID: [redacted]
[19:23:13][C][wifi:440]:   Hostname: 'fingerprint'
[19:23:13][C][wifi:442]:   Signal strength: -57 dB ▂▄▆█
[19:23:13][C][wifi:446]:   Channel: 11
[19:23:13][C][wifi:447]:   Subnet: 255.255.255.0
[19:23:13][C][wifi:448]:   Gateway: 192.168.10.1
[19:23:13][C][wifi:449]:   DNS1: 208.67.222.222
[19:23:13][C][wifi:450]:   DNS2: 208.67.220.220
[19:23:13][C][logger:185]: Logger:
[19:23:13][C][logger:186]:   Level: DEBUG
[19:23:13][C][logger:188]:   Log Baud Rate: 115200
[19:23:13][C][logger:189]:   Hardware UART: UART0
[19:23:13][C][uart.arduino_esp32:151]: UART Bus 1:
[19:23:13][C][uart.arduino_esp32:152]:   TX Pin: GPIO17
[19:23:13][C][uart.arduino_esp32:153]:   RX Pin: GPIO16
[19:23:13][C][uart.arduino_esp32:155]:   RX Buffer Size: 256
[19:23:13][C][uart.arduino_esp32:157]:   Baud Rate: 57600 baud
[19:23:13][C][uart.arduino_esp32:158]:   Data Bits: 8
[19:23:13][C][uart.arduino_esp32:159]:   Parity: NONE
[19:23:13][C][uart.arduino_esp32:160]:   Stop bits: 1
[19:23:13][C][template.text_sensor:020]: Template Sensor 'Mud Fingerprint State'
[19:23:13][C][uptime.sensor:033]: Uptime Sensor 'fingerprint_sensor Uptime'
[19:23:13][C][uptime.sensor:033]:   Device Class: 'duration'
[19:23:13][C][uptime.sensor:033]:   State Class: 'total_increasing'
[19:23:13][C][uptime.sensor:033]:   Unit of Measurement: 's'
[19:23:13][C][uptime.sensor:033]:   Accuracy Decimals: 0
[19:23:13][C][uptime.sensor:033]:   Icon: 'mdi:timer-outline'
[19:23:13][C][uptime.sensor:034]:   Type: Seconds
[19:23:13][C][template.switch:068]: Template Switch 'Fingerprint matched'
[19:23:13][C][template.switch:091]:   Restore Mode: always OFF
[19:23:13][C][template.switch:057]:   Optimistic: YES
[19:23:13][C][homeassistant.time:010]: Home Assistant Time:
[19:23:13][C][homeassistant.time:011]:   Timezone: 'MST7MDT,M3.2.0,M11.1.0'
[19:23:13][C][version.text_sensor:021]: Version Text Sensor 'fingerprint_sensor ESPHome Version'
[19:23:13][C][version.text_sensor:021]:   Icon: 'mdi:new-box'
[19:23:13][C][restart:068]: Restart Switch 'fingerprint_sensor Restart'
[19:23:13][C][restart:070]:   Icon: 'mdi:restart'
[19:23:13][C][restart:091]:   Restore Mode: always OFF
[19:23:13][C][fingerprint_grow:537]: GROW_FINGERPRINT_READER:
[19:23:13][C][fingerprint_grow:538]:   System Identifier Code: 0x0000
[19:23:13][C][fingerprint_grow:540]:   Touch Sensing Pin: GPIO5
[19:23:13][C][fingerprint_grow:542]:   Sensor Power Pin: None
[19:23:13][C][fingerprint_grow:546]:   Idle Period to Sleep: Never
[19:23:14][C][fingerprint_grow:548]:   Update Interval: 0.5s
[19:23:14][C][fingerprint_grow:550]:   Fingerprint Count 'Mud Fingerprint Count'
[19:23:14][C][fingerprint_grow:550]:     State Class: ''
[19:23:14][C][fingerprint_grow:550]:     Unit of Measurement: ''
[19:23:14][C][fingerprint_grow:550]:     Accuracy Decimals: 0
[19:23:14][C][fingerprint_grow:550]:     Icon: 'mdi:fingerprint'
[19:23:14][C][fingerprint_grow:551]:     Current Value: 65535
[19:23:14][C][fingerprint_grow:554]:   Status 'Mud Fingerprint Status'
[19:23:14][C][fingerprint_grow:554]:     State Class: ''
[19:23:14][C][fingerprint_grow:554]:     Unit of Measurement: ''
[19:23:14][C][fingerprint_grow:554]:     Accuracy Decimals: 0
[19:23:14][C][fingerprint_grow:555]:     Current Value: 255
[19:23:14][C][fingerprint_grow:558]:   Capacity 'Mud Fingerprint Capacity'
[19:23:14][C][fingerprint_grow:558]:     State Class: ''
[19:23:14][C][fingerprint_grow:558]:     Unit of Measurement: ''
[19:23:14][C][fingerprint_grow:558]:     Accuracy Decimals: 0
[19:23:14][C][fingerprint_grow:558]:     Icon: 'mdi:database'
[19:23:14][C][fingerprint_grow:559]:     Current Value: 65535
[19:23:14][C][fingerprint_grow:562]:   Security Level 'Mud Fingerprint Security Level'
[19:23:14][C][fingerprint_grow:562]:     State Class: ''
[19:23:14][C][fingerprint_grow:562]:     Unit of Measurement: ''
[19:23:14][C][fingerprint_grow:562]:     Accuracy Decimals: 0
[19:23:14][C][fingerprint_grow:562]:     Icon: 'mdi:security'
[19:23:14][C][fingerprint_grow:563]:     Current Value: 255
[19:23:14][C][fingerprint_grow:566]:   Last Finger ID 'Mud Fingerprint Last Finger ID'
[19:23:14][C][fingerprint_grow:566]:     State Class: ''
[19:23:14][C][fingerprint_grow:566]:     Unit of Measurement: ''
[19:23:14][C][fingerprint_grow:566]:     Accuracy Decimals: 0
[19:23:14][C][fingerprint_grow:566]:     Icon: 'mdi:account'
[19:23:14][C][fingerprint_grow:567]:     Current Value: 4294967295
[19:23:14][C][fingerprint_grow:570]:   Last Confidence 'Mud Fingerprint Last Confidence'
[19:23:14][C][fingerprint_grow:570]:     State Class: ''
[19:23:14][C][fingerprint_grow:570]:     Unit of Measurement: ''
[19:23:14][C][fingerprint_grow:570]:     Accuracy Decimals: 0
[19:23:14][C][fingerprint_grow:570]:     Icon: 'mdi:account-check'
[19:23:14][C][fingerprint_grow:571]:     Current Value: 4294967295
[19:23:14][E][component:082]:   Component fingerprint_grow is marked FAILED
[19:23:14][C][captive_portal:088]: Captive Portal:
[19:23:14][C][mdns:116]: mDNS:
[19:23:14][C][mdns:117]:   Hostname: fingerprint
[19:23:14][C][esphome.ota:073]: Over-The-Air updates:
[19:23:14][C][esphome.ota:074]:   Address: fingerprint.local:3232
[19:23:14][C][esphome.ota:075]:   Version: 2
[19:23:14][C][esphome.ota:078]:   Password configured
[19:23:14][C][safe_mode:018]: Safe Mode:
[19:23:14][C][safe_mode:020]:   Boot considered successful after 60 seconds
[19:23:14][C][safe_mode:021]:   Invoke after 10 boot attempts
[19:23:14][C][safe_mode:023]:   Remain in safe mode for 300 seconds
[19:23:14][C][api:139]: API Server:
[19:23:14][C][api:140]:   Address: fingerprint.local:6053
[19:23:14][C][api:142]:   Using noise encryption: YES
[19:23:14][C][wifi_info:011]: WifiInfo SSID 'fingerprint_sensor SSID'
[19:23:14][C][wifi_info:012]: WifiInfo BSSID 'fingerprint_sensor BSSID'
[19:23:14][C][wifi_info:009]: WifiInfo IPAddress 'fingerprint_sensor IP'
[19:23:14][C][wifi_signal.sensor:009]: WiFi Signal 'fingerprint_sensor WiFi Signal'
[19:23:14][C][wifi_signal.sensor:009]:   Device Class: 'signal_strength'
[19:23:14][C][wifi_signal.sensor:009]:   State Class: 'measurement'
[19:23:14][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dBm'
[19:23:14][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0



esphome:
  name: fingerprint
  friendly_name: FingerPrint

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

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

  #finger print specific
  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: 

ota:
  - platform: esphome
    password: "abc"

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

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

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

captive_portal:

# Text sensors with general information.
text_sensor:
  # Expose ESPHome version as sensor.
  - platform: version
    name: fingerprint_sensor ESPHome Version

  # Expose WiFi information as sensors.
  - platform: wifi_info
    ip_address:
      name: fingerprint_sensor IP
    ssid:
      name: fingerprint_sensor SSID
    bssid:
      name: fingerprint_sensor BSSID

  # Finger Print Specific
  - platform: template
    id: fingerprint_state
    name: "Mud Fingerprint State"      

# Exposed switches.
# Switch to restart the salt_level_sensor.   
switch:
  - platform: restart
    name: "fingerprint_sensor Restart"
  - platform: template
    name: "Fingerprint matched"
    id: fingerprint_matched
    optimistic: True
    on_turn_on:
    - delay: 2000ms
    - switch.turn_off: fingerprint_matched  

sensor:
  # Uptime sensor.
  - platform: uptime
    name: fingerprint_sensor Uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: fingerprint_sensor WiFi Signal
    update_interval: 60s 

  # Finger Print Specific
  - platform: fingerprint_grow
    fingerprint_count:
      name: "Mud Fingerprint Count"
      id: fingerprint_count
    last_finger_id:
      name: "Mud Fingerprint Last Finger ID"
    last_confidence:
      name: "Mud Fingerprint Last Confidence"
    status:
      name: "Mud Fingerprint Status"
    capacity:
      name: "Mud Fingerprint Capacity"
    security_level:
      name: "Mud Fingerprint Security Level"    

#specific for finger print sensor
uart:
  tx_pin: GPIO17 
  rx_pin: GPIO16 
  baud_rate: 57600

fingerprint_grow:
  sensing_pin:  GPIO05 
  on_finger_scan_matched:
    - homeassistant.event:
        event: esphome.test_node_finger_scan_matched
        data:
          finger_id: !lambda 'return finger_id;'
          confidence: !lambda 'return confidence;'
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 200
        color: BLUE
        count: 1
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Authorized finger"
    - switch.turn_on: fingerprint_matched
    - delay: 500ms
    - switch.turn_off: fingerprint_matched

  on_finger_scan_unmatched:
    - homeassistant.event:
        event: esphome.test_node_finger_scan_unmatched
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 2
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Unauthorized finger"
    - delay: 3s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Scan your finger"    

  on_enrollment_scan:
    - homeassistant.event:
        event: esphome.test_node_enrollment_scan
        data:
          finger_id: !lambda 'return finger_id;'
          scan_num: !lambda 'return scan_num;'
    - 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: "Finger scanned"

  on_enrollment_done:
    - homeassistant.event:
        event: esphome.test_node_enrollment_done
        data:
          finger_id: !lambda 'return finger_id;'
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 100
        color: BLUE
        count: 2
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Enrolled fingerprint"
        
  on_enrollment_failed:
    - homeassistant.event:
        event: esphome.test_node_enrollment_failed
        data:
          finger_id: !lambda 'return finger_id;'
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 25
        color: RED
        count: 4
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Failed to enroll fingerprint"
  
   
    ```

I do not see anything strange from the logs. Try to enable debug logs in ESPHome. And make sure there is no password on the fingerprint scanner. Also verify if you connected TX of the sensor to RX of the ESP and visa versa.

Thanks for the input. I started to examine the pins on the ESP32 I was using and realized I was using the wrong pins for tx, rx and sensing, I was using a wrong pinout document. It is all working now.

1 Like

Thanks for sharing all the information on this great project. I have just received my R503 en will start testing with a ESP 32S.
I wondered if any of you used the sleep mode as described here:

[Grow Fingerprint Reader — ESPHome]

Is it wise to use this option?

First to say - awesome project with the R503 @parrel :slight_smile:

Reading the thread top to button raised some questions.
Would it be possible to pair the R503 with an PoE powered ESP32 WROOM32 like the M5Stack U138 - mainly referring to the sense pin GPIO and the pin connected to the transistor like described in the ESP Home documentation.


This shows the bottom part of the U138 - there is an additional board connected on top with the pins to gain poe power and a breakout for for GPIO 16 and 17 for TX and RX as well as GND and 5V.

Refering to their documentation and pcb wiring the GPIO 5, which is mainly used by you all for the sensing pin, is on the U138 already used, resulting in not available for the R503 → see spec or diagram below

Would it be possible to connect the sensing pin and transistor pin to IO4 or IO32 to IO35?

The idea was to solder some extra AWG30 wires directly on the chip connectors and align them out of the housing with an extra connector or create a new housing with an embedded connector at all.

Since soldering job directly to the ESP32 die would probably be a little tricky I’m curios if this all would theoretically work out or if I have missed something in consideration.

Any input from you would be helpful. :slight_smile:

To be honest, I have no idea if that will work. But you could buy a esp32 devboard to see it it works, before soldering to the chip itself :slight_smile:

For the TX and RX pins:

The ESP32 has three UARTs. ESP32 lite variant chips (ESP32-S3, ESP32-C3, ESP32-S2, etc) may have fewer UARTs (usually two). Any pair of GPIO pins can be used, as long as they support the proper output/input modes.

from UART Bus — ESPHome.

For the sensing pin, any pin that’s a suitable input pin should work (and it’s optional to begin with).

As mentioned above, I would recommend trying it out before soldering.

Possibly dumb question, but does anyone know if it’s possible to centrally manage fingerprints/access with multiple ESP32 and sensors? I’d love to mount these at each door, without having to walk each person around to each sensor. Can the hashed fingerprint info be synchronized somehow?

I don’t think that’s possible unfortunately. The fingerprints are stored on the sensor itself. One of the reasons that it might also not be possible, is that each sensor is different, and one sensor’s hash might not validate on another sensor. But that’s just a thought.

Edit: on the datasheet there is functionality listed for uploading and downloading fingerprints.