🚘 Garage Fingerprint Sensor

Hey, I’m not overly sure what you mean but the scripts can just called from anywhere, just plonk the textbox and number somewhere you can set them and call the script. This is what I use, which creates a veryyyy basic popup via the “browsermod” customer-component with “button-card” too. Enrol and not Enroll as I’m in the UK :smiley:

Could definitely be improved but it’s extremely rare that I need to add/remove a fingerprint now.

type: custom:mushroom-entity-card
entity: script.fingerprint_learning_mode_2
fill_container: true
name: Learn
secondary_info: none
layout: vertical
tap_action:
  action: call-service
  service: browser_mod.popup
  deviceID:
    - THIS
  data:
    title: Enrol a new fingerprint
    left_button: Ok
    right_button: Cancel
    content:
      type: vertical-stack
      cards:
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              icon: mdi:minus
              size: 30px
              tap_action:
                action: call-service
                service: input_number.decrement
                service_data:
                  entity_id: input_number.fingerprint_learning_id
              styles:
                card:
                  - height: 60px
                  - width: 60px
            - type: markdown
              content: |
                {{ states('input_number.fingerprint_learning_id') | string }}
            - type: custom:button-card
              icon: mdi:plus
              size: 30px
              tap_action:
                action: call-service
                service: input_number.increment
                service_data:
                  entity_id: input_number.fingerprint_learning_id
              styles:
                card:
                  - height: 60px
                  - width: 60px
        - type: entities
          entities:
            - entity: input_text.id_name
              icon: mdi:form-textbox
              name: Name
    right_button_action:
      service: browser_mod.close-popup
    left_button_action:
      service: script.fingerprint_learning_mode_2

image

3 Likes

Thank you very much for the example. Can you tell me what you wrote in the script “script.fingerprint_learning_mode_2” ?

Thank you very much. Please can you share the whole project? card, script…and more.

It’s just the learning script from my original post. Nothing much in there.

1 Like

Added an Idle status after each action otherwise you can’t trigger an automation between two identical states after eachother as the state won’t get renewed when the same state is send.

So now after each action the satet changes to Idle after 10 seconds.

Below you can find (the complete) code. In case you want this too.

esphome:
  name: fingerprint

esp8266:
  board: nodemcuv2

# Enable logging
logger:

uart:
  tx_pin: D0
  rx_pin: D1
  baud_rate: 57600

fingerprint_grow:
  sensing_pin: D2
  on_finger_scan_matched:
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 200
        color: BLUE
        count: 1
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Authorized finger"
    - delay: 10s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Idle"
  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: "Unauthorized finger"
    - delay: 10s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Idle"
  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: "Finger scanned"
    - delay: 10s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Idle"
  on_enrollment_done:
    - fingerprint_grow.aura_led_control:
        state: BREATHING
        speed: 100
        color: BLUE
        count: 2
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Enrolled fingerprint"
    - delay: 20s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Idle"
  on_enrollment_failed:
    - 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"
    - delay: 20s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Idle"

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

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"

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

  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:

ota:
  password: "ThisWasAVeryLongPassword"

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

captive_portal:
    

Hi, I bought it, soldered it, programmed it and it works. But I have a problem that when I disconnect my ESP from the power supply, it is visible after reconnecting the ESP, but GROW R503 is not. Nothing is reported. Only uploading .yaml back to ESP helps. What have I missed?

I’m sorry it’s unclear to me what’s going on there.

What happens when you reconnect power supply? The esp is fully operational but the r503 seems to not respond to any finger input?

Perhaps you can play around with you gpio pins? Especially with the sensing pin…

I had some strange issues at first when using other gpio pins…when I exactly followed the TS’s pins it worked like a charm on my setup…

2 Likes

Can you share rename script and rename card? Thank you

It’s the same as the learning card and script above but without the call to the fingerprint reader in the script. All its doing is renaming the name associated with an ID, the reader doesn’t know about the name so doesn’t need to be called.

Love it. Thanks for your great work. I tried to add a service which scnas a finger in the next free slot. Tried this … not working. Any hints?

    - service: enroll_next
      variables:
        num_scans: int
      then:
        - fingerprint_grow.aura_led_control:
            state: BREATHING
            speed: 25
            count: 10
            color: GREEN
        - fingerprint_grow.enroll:
            finger_id: !lambda 'return int(fingerprint_count);'
            num_scans: !lambda 'return num_scans;'
        - fingerprint_grow.aura_led_control:
            state: BREATHING
            speed: 25
            count: 10
            color: GREEN

sensor:
  - platform: fingerprint_grow
    fingerprint_count:
      name: "Fingerprint Count"
      id: fingerprint_count

1 Like

That’s really clever, using fingerprint_count!

What’s the value of this sensor when you call the service?

Hi Trying to create Also

have 2 bords D1 mini and ESP32 and grow R503

  1. The Yaml for D1 and ESP 32 is the same?
  2. On the D1 mini and the ESP32 i have only 1 3v and not (2).

Attached my D1 and ESP32

  1. No they are not the same. You should change the D* pins to GPIO* pins for the ESP32.

  2. Twist the 3v wires together and solder them to the same 3v contact. Or use another way to join multiple 3v wires.

I’ve moved to an ESP32 to unlock bluetooth possibilities, and updated the post with ESP32 pins.

@Danik If you’re still looking for the pins, they are now in the post.

@rak If you’re still looking for the enroll_next solution, I’ve added it to the original post with the working code, and credits to you :wink:

1 Like

Morning,

Is there a chance to make this sensor glow lets say green while waiting for the scan ? It’s installed in a really dark area and it would be helpful.

Thank you,

Yes that’s possible. You should call this when you boot the ESP, and after every other LED change.

    - fingerprint_grow.aura_led_control:
        state: ALWAYS_ON
        speed: 0
        color: GREEN
        count: 0

Thank you , that works after the first scan , where do i put it in the code so it starts at boot like that ?

I’ve put together a simple wall plate for this sensor - hope someone will find it useful,

Hi all
I’m hoping you won’t mind giving me a sanity check on a strange experience I have with my Grow 503 reader (https://www.aliexpress.com/item/33053655412.html). I have connect to GPIO16 and 17 for RX and TX and GPIO25 for SENSING_PIN on a ESP32 WROOM device (https://www.aliexpress.com/item/32866143601.html). And the communication is working well, but every 500ms the sensor is sending “Scan and match” + “Getting image 1” + “No finger”. This happens regardless of if I actually touch the housing of the sensor or lay a finger on the sensor. If I lay a finger on the sensor then this is successfully detected, but the constant flow of false detections continue as you can see in the screenshot below.
Is this normal/expected behavior?


and if not have anyone seen this before and been able to rectify it?