Philipp Wo 5b5f3b4f09 | ||
---|---|---|
doc | ||
includes | ||
.gitignore | ||
Readme.md | ||
fingerprintdoor.yaml |
Readme.md
ESP Fingerprint for FHEM
ESPHome firmware for ESP32 or ESP8266 to manage and use a R503-RGB Fingerprint Reader over MQTT.
Supported features of my code:
- Control R503 LED
- LED colors: RED, BLUE, PURPLE, GREEN, YELLOW, CYAN and WHITE
- LED effects: BREATHING, FLASHING, ALWAYS_ON, ALWAYS_OFF, GRADUAL_ON and GRADUAL_OFF
- enroll a fingerprint to the reader
- delete fingerprint
Getting started
Config pins and effects
Set correct GPIO Pins in fingerprintdoor.yaml
# -----------------------------
# Config
# -----------------------------
devicename: fingerprintdoor
reader_rx_pin: GPIO16
reader_tx_pin: GPIO17
reader_sensor_pin: GPIO5
speed_flash: "100"
count_flash: "4"
speed_breath: "75"
count_breath: "7"
speed_gradual_off: "200"
speed_gradual_on: "35"
Wifi and MQTT
Create a secrets.yaml
file in your project folder
wifi_ssid: "YourSSID"
wifi_password: "YourPASS"
ota_password: "OtaPass"
mqtt_ip: "192.168.1.1"
mqtt_user: ""
mqtt_password: ""
Flash to ESP
Follow this GUIDE to install ESPHome and flash it to your device with:
esphome run fingerprintdoor.yaml --device COM4
Note: COM Port may differ, change it to your COM port
FHEM MQTT2 device
defmod myFingerprint MQTT2_DEVICE fingerprintdoor
attr myFingerprint event-on-change-reading .*
attr myFingerprint room MQTT2_DEVICE
attr myFingerprint setList GREEN:on,off,breathe,flash fingerprintdoor/led green_$EVTPART1\
BLUE:on,off,breathe,flash fingerprintdoor/led blue_$EVTPART1\
RED:on,off,breathe,flash fingerprintdoor/led red_$EVTPART1\
PURPLE:on,off,breathe,flash fingerprintdoor/led purple_$EVTPART1\
WHITE:on,off,breathe,flash fingerprintdoor/led white_$EVTPART1\
CYAN:on,off,breathe,flash fingerprintdoor/led cyan_$EVTPART1\
YELLOW:on,off,breathe,flash fingerprintdoor/led yellow_$EVTPART1\
cancel:noArg fingerprintdoor/cancel_enroll\
enroll fingerprintdoor/enroll $EVTPART1\
delete fingerprintdoor/delete $EVTPART1\
\
Usage in FHEM
Enroll new finger
Syntax:
set <fhem device name> enroll <finger ID>
Example:
set myFingerprint enroll 1
Note: Enrollment cancel ist possible with:
set myFingerprint cancel
Delete finger
Syntax:
set <fhem device name> delete <finger ID>
Example:
set myFingerprint delete 1
Set Led color and effect
Syntax:
set <fhem device name> <COLOR> <effect>
Example:
set myFingerprint BLUE flash