-
Notifications
You must be signed in to change notification settings - Fork 0
/
esphome-fingerprints.yaml
129 lines (117 loc) · 2.92 KB
/
esphome-fingerprints.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
esphome:
name: lab
platform: ESP32
board: nodemcu-32s
wifi:
ssid: "mia_wifi"
password: "password_wifi"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Finger Reader Fallback"
password: "password_fallback"
captive_portal:
# Enable logging
logger:
ota:
password: "password_ota"
uart:
rx_pin: GPIO14
tx_pin: GPIO13
baud_rate: 57600
fingerprint_grow:
sensing_pin: GPIO12
on_finger_scan_matched:
- text_sensor.template.publish:
id: fingerprint_state
state: "Impronta autorizzata"
- delay: 3000ms
- text_sensor.template.publish:
id: fingerprint_state
state: "Attesa"
- fingerprint_grow.aura_led_control:
state: BREATHING
speed: 200
color: BLUE
count: 1
on_finger_scan_unmatched:
- text_sensor.template.publish:
id: fingerprint_state
state: "Impronta non autorizzata"
- fingerprint_grow.aura_led_control:
state: FLASHING
speed: 25
color: RED
count: 2
on_enrollment_scan:
- text_sensor.template.publish:
id: fingerprint_state
state: "Impronta acquisita"
- text_sensor.template.publish:
id: fingerprint_state
state: "Impronta acquisita"
- 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_failed:
- text_sensor.template.publish:
id: fingerprint_state
state: "Acquisizione impronta fallita"
- fingerprint_grow.aura_led_control:
state: FLASHING
speed: 25
color: RED
count: 4
api:
password: "password_di_integrazione_esphome"
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:
# Optional template text sensor for visual feedback
text_sensor:
- platform: template
id: fingerprint_state
name: "Stato impronta"
# Optional sensors
binary_sensor:
- platform: fingerprint_grow
id: fingerprint_enrolling
name: "Acquisendo impronta"
sensor:
- platform: fingerprint_grow
fingerprint_count:
name: "Conta impronte"
last_finger_id:
name: "Ultimo ID impronta"
last_confidence:
name: "Affidabilità ultima impronta"
status:
name: "Stato impronta"
capacity:
name: "Capacità impronta"
security_level:
name: "Livello di sicurezza"