🚘 Garage Fingerprint Sensor

Sensor works and automation as well, but there is one think I can’t solve.

The automation is set on trigger “last fingerprint ID 6” and if I scan the next time the same finger (ID6) the automation won’t trigger beacuse there is alreadly last fingerprint ID 6 in state of sensor. If I want to trigger automation I have to scan any other finger (successfully) and then again finger ID6. Is there any other solution possible - apart from changing dedicated finger ID for lock and other for unlock?

After any scan add the last 4 lines starting from delay. This will clear the last scan

  on_finger_scan_unmatched:
    - fingerprint_grow.aura_led_control:
        state: FLASHING
        speed: 20
        color: RED
        count: 3
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Unauthorized finger"
    - delay: 3s
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Scan your finger"
2 Likes

Thank you very very much! It works now!!!

Thank you for the response. I got the second error fixed, but I am still confused about the first error.
I use a sonoff basic to control the garage door it uses an entity_id called cover.garage_door.
Is that what I need in the id field?
Thanks

No, in that case you can remove that line of code. Instead you should create an automation in HA itself, that toggles cover.garage_door when one of the fingerprint sensors changes state.

Great, got the bin file uploaded and all seems well.
My next problem is how to do the following…

When that’s done, you can enroll your fingerprint in the sensor by calling the service esphome.X_enroll where X is the device name, with the parameters finger_id and num_scans.

Where/how do I do this.
Again thank you for being patient.

In developer tools under the services tab enter esphome.(your.nodes.name)_enroll then in data add

{ "finger_id": 0, "num_scans": 2 }

Where finger_id is the slot it’s saved in.

Then call the service. Its helpful to go split screen to lovelace to see what the sensor is doing.

1 Like

Thank you worked perfectly.
I did not think to look in services at esphome.(your.nodes.name)_enroll.
I was looking for the sensor itself.
Appreciated very much

Ever the troublesome frog, I’m trying to do this with a Wemos D1 mini (clone) and an AS608 optical fingerprint reader from DIYmall through Amazon.com.

Wire/signal descriptions from DIYmall are:

Communication Interface: USB /UART
Baud rate: 57600(default)
Storage capacity: 300

Interface:
Red Wire: VCC (Power 3.3V, can't connect 5V, it will be burned)
Yellow Wire: TXD (Connect RXD of the AVR or TTL converter board)
White Wire: RXD (Connect TXD of the AVR or TTL converter board)
Black Wire: GND

Yaml is shown here:

esphome:
  name: fingerprint-reader
  platform: ESP8266
  board: d1_mini

# Enable logging
logger:
  baud_rate: 0
  level: DEBUG

# Enable Home Assistant API
api:
  password: "password"

# Enable over-the-air updates
ota:
  password: "password"

wifi:
  fast_connect: false
  power_save_mode: NONE
  domain:          .local
  use_address:     fingerprint_reader.local
  reboot_timeout:  5min
  networks:
    ssid: "NoNoNo"
    password: "topsecretpw"

uart:
  baud_rate: 57600
  rx_pin: D1
  tx_pin: D2

# Declare Grow Fingerprint Reader
fingerprint_grow:
  new_password: 0x12345678
  sensing_pin: D0
  
  on_finger_scan_matched:
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Authorized finger"
    - switch.turn_on: gate
    - delay: 500ms
    - switch.turn_off: gate
    
  on_finger_scan_unmatched:
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Unauthorized finger"
        
  on_enrollment_scan:
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Finger scanned"
        
  on_enrollment_done:
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Enrolled fingerprint"
        
  on_enrollment_failed:
    - text_sensor.template.publish:
        id: fingerprint_state
        state: "Failed to enroll fingerprint"

#
# Optional template text sensor for visual feedback
#
text_sensor:
  - platform: template
    id: fingerprint_state
    name: "Fingerprint State"

#
# Optional component (GPIO switch, lock etc.) to control in on_finger_scan_matched trigger
#
switch:
  - platform: gpio
    pin: GPIO14
    id: gate

#
# Optional sensors
#
binary_sensor:
  - platform: fingerprint_grow
    id: fingerprint_enrolling
    name: "Fingerprint Enrolling"

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"

Despite many attempts, it fails to initialize the sensor properly.
Log files showing the connection failure are here:

Showing logs:
[20:23:22][I][app:029]: Running through setup()...
[20:23:22][C][uart_esp8266:046]: Setting up UART bus...
[20:23:22][C][switch.gpio:011]: Setting up GPIO Switch 'gate'...
[20:23:22][D][switch:025]: 'gate' Turning OFF.
[20:23:22][D][switch:045]: 'gate': Sending state OFF
[20:23:22][D][switch:025]: 'gate' Turning OFF.
[20:23:22][C][fingerprint_grow:052]: Setting up Grow Fingerprint Reader...
[20:23:22][D][fingerprint_grow:190]: Checking password
[20:23:23][E][fingerprint_grow:418]: No response received from reader
[20:23:23][E][component:094]: Component was marked as failed.
[20:23:23][C][wifi:037]: Setting up WiFi...
[20:23:23][D][wifi:365]: Starting scan...

Change new_password to password, recomplile and upload.

Maybe that’s not a Grow fingerprint sensor. Here is a list of supported devices I think.

I tried several variations of password, including leaving out password (for the default initial value of 0x00) or explicitly saying password: 0x00. I wanted to be extra careful not to set any password until I had things operational. None of them seemed to work. :frowning: I suspect the password check requirements for this sensor may be different, somehow?

That’s beginning to be my thought. I have the R503 coming from AliExpress in a few weeks, just wanted to try this similar model in the interim, to get code and wiring figured out. Will review that list later this morning. I tried checking the chip on this reader, but even with a magnifying glass the etching was far too small to read. :frowning:

new_password is a run once command. After changing the password, you switch to password.

Yup, got that. Thank you. The device never initialized at all, nor made it to any of the password set/validation code. I was looking at the source code on Github this morning, precisely to see what I should expect if it validates/initializes correctly.

Passwords are optional. If you believe you’ve never set one, just leave out password all together and see if it will initialize.

Actually, DIYMall finally updated their AS608 Amazon page with better documentation. It’s too late to give it a try tonight, but I will definitely work on it again tomorrow. For now, the pinout on this particular variation:

Pin Color   In/Out    Signal    Description
--- ------  ------    ------    -------------------------
1   Blue    Input     Vtouch    Touch sensor power input
2   Yellow  Output    Sout      Touch sensor output
3   Red     Input     Vin       +3.3VDC 
4   Green   Output    TXD       Transmit Data
5   White   Input     RXD       Receive Data
6   Black   Ground    GND       Signal and power ground

And this morning, she’s up and running. Got the chip connected, password initialized, and ready to rock and roll. The issue was the erroneous information originally provided by DIYmall (in my initial post above). With RXD and TXD properly connected, it’s now flashing as expected and reading fingerprints. :smiley:

Spoke too soon. Apparently, this AS608 from DIYmalls.com is defective. While it WAS working, the very next firmware flash, it refuses to communicate again. :frowning:

Re-checked my soldering and connections with the ESP8266, no issues there. Switched to a LOLIN D32 ESP32 board, which would not load firmware when the reader was connected. Disconnected reader, loaded firmware, reconnected reader, rebooted ESP32, errors galore on boot loop. If I had to guess, I’d say this reader is sucking down a LOT of current and causing issues with the ESP32 board.

After reading reviews of other non-brand-name AS608 sensors on Amazon and other sites, they pretty much ALL complained of dead shorts and non-functional units. I can say, for that one single boot cycle when the reader lit up, it was working just as it should. So the AS608 is compatible with the ESPHome driver.

All the documentation I’ve found says the AS608 only draws 60mA maximum. But I think another issue is most D1 mini clones supply only 150mA through their 3v3 port, due to using a lower capacity LDO/regulator. I’d guess this design shortfall, plus a higher than stated current draw is causing the issue I’ve observed. The solution is to hack a higher-current AMS1117 LDO/regulator onto the D1 mini clone board.

Hey there, i’m a super beginner and am trying to figure out how to connect the sensor to the esp8266. Do you have any pictures where the UTP connects to your esp8266? Did you just solder the stripped wires directly to the board? Or did you use a breadboard?

Also, do you know which exact model of esp8266 you grabbed?

I strongly suggest you obtain a genuine LOLIN D1 Mini.
It’s guaranteed to have the AMS1117 LDO voltage regulator.

My R503 fingerprint sensor arrived today. I soldered connectors onto each wire, for slipping over pins soldered into the ESP8266 board.

If you’re not familiar with soldering start with breadboards and push in cables. You use a hot glue gun to hold things in place. You can always go back when you’re sure everything works and solder.

The connections will be made according to your hardware. Always follow wiring diagrams supplied with the hardware.

@FredTheFrog I was originally going to ask if the AS608 was an actual grow reader since it’s not listed on their site, then I saw you ordered a 503.