fingerprint-mqtt
fingerprint-mqtt copied to clipboard
Support for R503 FPS and watchdog
The adafruit fingerprint library supports FPM10A (optical) and R30x/R50x (Capacitive) Fingerprint sensors. However, the Capacitive fingerprint sensors (FPS) do not support the following function:
finger.fingerFastSearch();
The above line throws "Unknown Error" on Serial Monitor via switch-case logic. but instead use
finger.fingerSearch();
The R-series FPS have an LED ring around the sensor that can be used to indicate various states via
finger.LEDcontrol(uint8_t control, uint8_t speed, uint8_t coloridx, uint8_t count=0)
I have also noticed that certain microcontrollers (ESP32xx family) get stuck and do not publish mqtt messages, even though broker and wifi are available. I am yet to ascertain the issue via logs as this bug appears only when microcontroller is on power (for an extended period of time - days) and not connected to a system for serial monitor. Currently using a watchdog to raise a hardware interrupt and reboot the device on such a scenario.
#19 Pull request created.
#20 Pull request created (Updated an if condition).
Turns out when the WiFi access point switches channels or the microcontroller loses connection to the AP, there isn't a reconnection strategy in the code for WiFi. Only MQTT reconnect is implemented. The current watchdog solution works as a reconnection strategy but can be done using the native WiFi library. Will take a look into this.
Reference: https://github.com/knolleary/pubsubclient/issues/629
https://user-images.githubusercontent.com/56648438/204137989-b1632940-75c9-49b1-ab0c-8f52e61a050d.mp4
Been stable for the last month. Closing this issue.