frickelzeugs / FingerprintDoorbell

An MQTT enabled combined fingerprint reader and doorbell based on the ESP32 MCU and the R503 fingerprint sensor called "FingerprintDoorbell".
https://frickelzeugs.github.io/FingerprintDoorbell/
308 stars 47 forks source link

No match found (Code 2) and no ringing #58

Open henfri opened 1 year ago

henfri commented 1 year ago

Hello,

for some reason, I sometimes get No match found (Code 2) and the bell does not ring. I think, this must be due to this line: https://github.com/frickelzeugs/FingerprintDoorbell/blob/53833b0e63b1cade13cd01f803c3ba38670a11e2/src/main.cpp#L564

But I do not understand the reason for this line - and also not, why my bell is not ringing... The family is getting a bit annoyed :-(

What I also do not undertand: Even if I ensure that lastMatch is different, as it was my known finger rather than an unknown one, I get this message. I.e.: unknown finger -- No match found (Code 2) known finger -- door opens unknown finger -- No match found (Code 2)

It was working well for some weeks though...

Greetings, Hendrik

frickelzeugs commented 1 year ago

Hi,

the line you mentioned is to block duplicate or multiple ring events in a row e.g. if somebody holds the finger on a sensor for a long time (or a water drop is on the sensor). The ring event then will only be raised again after a scanResult ="no Finger" case was detected first.

How is your bell triggered? By wire through one of the GPIOs or by mqtt messages? Maybe the problem for your missing ring events is located there? I had a similar problem in past caused by a defective optocoupler wired on the GPIO.

henfri commented 1 year ago

Hello,

thanks for your reply. The Bell is triggered by GPIO.

This may be part of the issue. I have now logged the mqtt events while pressing several times with known and unknown fingers:

Jan 13 18:26:20 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:26:48 fingerprintDoorbell/lastLogMessage FingerprintDoorbell disconnected unexpectedly
Jan 13 18:27:24 fingerprintDoorbell/lastLogMessage FingerprintDoorbell disconnected unexpectedly
Jan 13 18:27:33 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:27:34 fingerprintDoorbell/ring off
Jan 13 18:27:34 fingerprintDoorbell/matchId -1
Jan 13 18:27:34 fingerprintDoorbell/matchName (null)
Jan 13 18:27:34 fingerprintDoorbell/matchConfidence -1
Jan 13 18:27:36 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:27:36 fingerprintDoorbell/ring on
Jan 13 18:27:36 fingerprintDoorbell/matchId -1
Jan 13 18:27:36 fingerprintDoorbell/matchName (null)
Jan 13 18:27:36 fingerprintDoorbell/matchConfidence -1
Jan 13 18:27:37 fingerprintDoorbell/ring off
Jan 13 18:27:37 fingerprintDoorbell/matchId -1
Jan 13 18:27:37 fingerprintDoorbell/matchName (null)
Jan 13 18:27:37 fingerprintDoorbell/matchConfidence -1
Jan 13 18:27:52 fingerprintDoorbell/lastLogMessage Match Found: 1 - HendrikZeigeRechtsLock with confidence of 58
Jan 13 18:27:52 fingerprintDoorbell/ring off
Jan 13 18:27:52 fingerprintDoorbell/matchId 1
Jan 13 18:27:52 fingerprintDoorbell/matchName HendrikZeigeRechtsLock
Jan 13 18:27:52 fingerprintDoorbell/matchConfidence 58
Jan 13 18:27:56 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:27:56 fingerprintDoorbell/ring on
Jan 13 18:27:56 fingerprintDoorbell/matchId -1
Jan 13 18:27:56 fingerprintDoorbell/matchName (null)
Jan 13 18:27:56 fingerprintDoorbell/matchConfidence -1
Jan 13 18:27:58 fingerprintDoorbell/ring off
Jan 13 18:27:58 fingerprintDoorbell/matchId -1
Jan 13 18:27:58 fingerprintDoorbell/matchName (null)
Jan 13 18:27:58 fingerprintDoorbell/matchConfidence -1
Jan 13 18:27:59 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:27:59 fingerprintDoorbell/ring on
Jan 13 18:27:59 fingerprintDoorbell/matchId -1
Jan 13 18:27:59 fingerprintDoorbell/matchName (null)
Jan 13 18:27:59 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:00 fingerprintDoorbell/ring off
Jan 13 18:28:00 fingerprintDoorbell/matchId -1
Jan 13 18:28:00 fingerprintDoorbell/matchName (null)
Jan 13 18:28:00 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:02 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:02 fingerprintDoorbell/ring on
Jan 13 18:28:02 fingerprintDoorbell/matchId -1
Jan 13 18:28:02 fingerprintDoorbell/matchName (null)
Jan 13 18:28:02 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:03 fingerprintDoorbell/ring off
Jan 13 18:28:03 fingerprintDoorbell/matchId -1
Jan 13 18:28:03 fingerprintDoorbell/matchName (null)
Jan 13 18:28:03 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:05 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:05 fingerprintDoorbell/ring on
Jan 13 18:28:05 fingerprintDoorbell/matchId -1
Jan 13 18:28:05 fingerprintDoorbell/matchName (null)
Jan 13 18:28:05 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:08 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:10 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:11 fingerprintDoorbell/ring off
Jan 13 18:28:11 fingerprintDoorbell/matchId -1
Jan 13 18:28:11 fingerprintDoorbell/matchName (null)
Jan 13 18:28:11 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:12 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:12 fingerprintDoorbell/ring on
Jan 13 18:28:12 fingerprintDoorbell/matchId -1
Jan 13 18:28:12 fingerprintDoorbell/matchName (null)
Jan 13 18:28:12 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:13 fingerprintDoorbell/ring off
Jan 13 18:28:13 fingerprintDoorbell/matchId -1
Jan 13 18:28:13 fingerprintDoorbell/matchName (null)
Jan 13 18:28:13 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:15 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:15 fingerprintDoorbell/ring on
Jan 13 18:28:15 fingerprintDoorbell/matchId -1
Jan 13 18:28:15 fingerprintDoorbell/matchName (null)
Jan 13 18:28:15 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:16 fingerprintDoorbell/ring off
Jan 13 18:28:16 fingerprintDoorbell/matchId -1
Jan 13 18:28:16 fingerprintDoorbell/matchName (null)
Jan 13 18:28:16 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:18 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:18 fingerprintDoorbell/ring on
Jan 13 18:28:18 fingerprintDoorbell/matchId -1
Jan 13 18:28:18 fingerprintDoorbell/matchName (null)
Jan 13 18:28:18 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:20 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:21 fingerprintDoorbell/ring off
Jan 13 18:28:21 fingerprintDoorbell/matchId -1
Jan 13 18:28:21 fingerprintDoorbell/matchName (null)
Jan 13 18:28:21 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:23 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:23 fingerprintDoorbell/ring on
Jan 13 18:28:23 fingerprintDoorbell/matchId -1
Jan 13 18:28:23 fingerprintDoorbell/matchName (null)
Jan 13 18:28:23 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:25 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:27 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:29 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:30 fingerprintDoorbell/ring off
Jan 13 18:28:30 fingerprintDoorbell/matchId -1
Jan 13 18:28:30 fingerprintDoorbell/matchName (null)
Jan 13 18:28:30 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:33 fingerprintDoorbell/lastLogMessage No Match Found (Code 2)
Jan 13 18:28:33 fingerprintDoorbell/ring on
Jan 13 18:28:33 fingerprintDoorbell/matchId -1
Jan 13 18:28:33 fingerprintDoorbell/matchName (null)
Jan 13 18:28:33 fingerprintDoorbell/matchConfidence -1
Jan 13 18:28:34 fingerprintDoorbell/ring off
Jan 13 18:28:34 fingerprintDoorbell/matchId -1
Jan 13 18:28:34 fingerprintDoorbell/matchName (null)
Jan 13 18:28:34 fingerprintDoorbell/matchConfidence -1

The Bell did never ring. In some cases via mqtt there was a ring message. But in some cases there was not.

The distance between ESP and Relay is 8m... Do you think, this may be part of the reason?

Greetings, Hendrik