The reader can be powered by the 3.3V output of an NodeMCU. As the communication with the reader is done using UART (default baud rate is 57600), you need to have an :ref:`UART bus <uart>` in your configuration with the ``rx_pin`` connected to the reader's ``TX`` and the ``tx_pin`` connected to the reader's ``RX``.
If available on your reader model, it's recommended to connect 3.3VT (touch induction power supply) & 3.3V to 3.3V; WAKEUP (finger detection signal) to a free GPIO pin and define it with the ``sensing_pin`` option to allow the polling function to quickly return when there's no finger on the reader.
-**on_finger_scan_matched** (*Optional*, :ref:`Automation <automation>`): An action to be performed when an enrolled fingerprint is scanned. See :ref:`fingerprint_grow-on_finger_scan_matched`.
-**on_finger_scan_unmatched** (*Optional*, :ref:`Automation <automation>`): An action to be performed when an unknown fingerprint is scanned. See :ref:`fingerprint_grow-on_finger_scan_unmatched`.
-**on_finger_scan_invalid** (*Optional*, :ref:`Automation <automation>`): An action to be performed when the scan of a fingerprint failed. See :ref:`fingerprint_grow-on_finger_scan_invalid`.
-**on_enrollment_scan** (*Optional*, :ref:`Automation <automation>`): An action to be performed when a fingerprint is scanned during enrollment. See :ref:`fingerprint_grow-on_enrollment_scan`.
-**on_enrollment_done** (*Optional*, :ref:`Automation <automation>`): An action to be performed when a fingerprint is enrolled. See :ref:`fingerprint_grow-on_enrollment_done`.
-**on_enrollment_failed** (*Optional*, :ref:`Automation <automation>`): An action to be performed when a fingerprint enrollment failed. See :ref:`fingerprint_grow-on_enrollment_failed`.
-**fingerprint_count**: The number of enrolled fingerprints stored on the reader.
-**name** (**Required**, string): The name for the sensor.
-**id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
-**last_finger_id**: The last matched enrolled fingerprint as set by :ref:`fingerprint_grow-on_finger_scan_matched`.
-**name** (**Required**, string): The name for the sensor.
-**id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
-**last_confidence**: The last matched confidence as set by :ref:`fingerprint_grow-on_finger_scan_matched`.
-**name** (**Required**, string): The name for the sensor.
-**id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
-**status**: The integer representation of the internal status register of the reader.
-**name** (**Required**, string): The name for the sensor.
-**id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
-**capacity**: The fingerprint storage capacity of the reader.
-**name** (**Required**, string): The name for the sensor.
-**id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
-**security_level**: The integer representation of the currently configured security level of the reader. Higher security levels reduce the false acceptance rate (FAR) at the expense of increasing the false rejection rate (FRR). Range is 1 (lowest) to 5 (highest).
-**name** (**Required**, string): The name for the sensor.
-**id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- All other options from :ref:`Sensor <config-sensor>`.
.._fingerprint_grow-set_new_password:
Setting a New Password
----------------------
..warning::
Forgetting the password will render your fingerprint reader unusable!
You can set a new password for your fingerprint reader using the ``new_password:`` configuration option. The password is defined as a 32-bit unsigned integer.
The ``new_password:`` configuration option is meant to be compiled, flashed to the ESP device and run once, after which it's removed and the new password is defined in the ``password:`` configuration option to be compiled and flashed again.
With this configuration option you can write complex automations whenever a scan fails, e.g. when the finger is not placed correctly on the reader. This is different from ``on_finger_scan_unmatched`` which is triggered when an unknown fingerprint is scanned. This option works best with the ``sensing_pin`` option defined.
With this configuration option you can write complex automations whenever a finger scan is matched to an enrolled fingerprint.
To use the variables, use a :ref:`lambda <config-lambda>` template, the matched slot number and the confidence are available inside that lambda under the variables named ``finger_id`` and ``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 0:
return "person_a";
case 1:
return "person_b";
...
default:
return "person_unknown";
}
.._fingerprint_grow-on_finger_scan_unmatched:
``on_finger_scan_unmatched`` Trigger
------------------------------------
With this configuration option you can write complex automations whenever an unknown fingerprint is scanned.
..code-block:: yaml
on_finger_scan_unmatched:
- text_sensor.template.publish:
id: fingerprint_state
state: "Unauthorized finger"
.._fingerprint_grow-on_enrollment_scan:
``on_enrollment_scan`` Trigger
------------------------------
With this configuration option you can write complex automations whenever a finger is scanned during enrollment.
To use the variables, use a :ref:`lambda <config-lambda>` template, the scan number and the slot number to be enrolled into are available inside that lambda under the variables named ``scan_num`` and ``finger_id``.
With this configuration option you can write complex automations whenever a finger is successfully enrolled.
To use the variables, use a :ref:`lambda <config-lambda>` template, the slot number enrolled into is available inside that lambda under the variable named ``finger_id``.
..code-block:: yaml
on_enrollment_done:
- text_sensor.template.publish:
id: fingerprint_state
state: !lambda 'return "Enrolled into slot " + to_string(finger_id);'
.._fingerprint_grow-on_enrollment_failed:
``on_enrollment_failed`` Trigger
--------------------------------
With this configuration option you can write complex automations whenever a finger failed to be enrolled.
To use the variables, use a :ref:`lambda <config-lambda>` template, the slot number that failed to be enrolled into is available inside that lambda under the variable named ``finger_id``.
..code-block:: yaml
on_enrollment_failed:
- 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...";'
Starts the fingerprint enrollment process on the slot number defined.
..code-block:: yaml
on_...:
then:
- fingerprint_grow.enroll:
finger_id: 0
num_scans: 2
# Shorthand
- fingerprint_grow.enroll: 0
# Update the template text sensor for visual feedback
- text_sensor.template.publish:
id: fingerprint_state
state: "Place a finger on the reader"
Configuration options:
-**finger_id** (**Required**, int, :ref:`templatable <config-templatable>`): The slot number to enroll the new fingerprint into. Limited to the fingerprint capacity available on the reader.
-**num_scans** (*Optional*, int, :ref:`templatable <config-templatable>`): Number of times to scan the finger to be enrolled. Limited to the number of character buffers available on the reader. Defaults to 2.
``fingerprint_grow.cancel_enroll`` Action
-----------------------------------------
Cancels the current fingerprint enrollment process. Triggers the ``on_enrollment_failed`` trigger.
..code-block:: yaml
on_...:
then:
- fingerprint_grow.cancel_enroll:
``fingerprint_grow.delete`` Action
----------------------------------
Removes the enrolled fingerprint from the slot number defined.
..code-block:: yaml
on_...:
then:
- fingerprint_grow.delete:
finger_id: 0
# Shorthand
- fingerprint_grow.delete: 0
Configuration options:
-**finger_id** (**Required**, int, :ref:`templatable <config-templatable>`): The slot number of the enrolled fingerprint to delete.
Turns on or off the LED on the reader. Only available on select models. If you have the R503 or R503-RGB use :ref:`fingerprint_grow-aura_led_control` instead.
-**state** (**Required**, string, :ref:`templatable <config-templatable>`): The state to set the LED. One of ``BREATHING``, ``FLASHING``, ``ALWAYS_ON``, ``ALWAYS_OFF``, ``GRADUAL_ON`` and ``GRADUAL_OFF``.
-**speed** (**Required**, int, :ref:`templatable <config-templatable>`): The duration each cycle lasts, a factor of 10ms. Only relevant for ``BREATHING``, ``FLASHING``, ``GRADUAL_ON`` and ``GRADUAL_OFF`` states. The total duration is defined by 10ms * speed * count. Range is 0 to 255.
-**color** (**Required**, string, :ref:`templatable <config-templatable>`): The LED color to activate. For R503, one of ``RED``, ``BLUE`` and ``PURPLE``. For R503-RGB, one of ``RED``, ``BLUE``, ``PURPLE``, ``GREEN``, ``YELLOW``, ``CYAN`` and ``WHITE``.
-**count** (**Required**, int, :ref:`templatable <config-templatable>`): How many times to repeat the pattern. Only relevant for ``BREATHING`` and ``FLASHING`` states. 0 for infinite, or 1 to 255.
All actions
-----------
-**id** (*Optional*, :ref:`config-id`): Manually specify the ID of the Grow fingerprint reader if you have multiple components.
Test setup
----------
With the following code you can quickly setup a node and use Home Assistant's service in the developer tools.
E.g. for calling ``fingerprint_grow.enroll`` select the service ``esphome.test_node_enroll`` and in service data enter