Add a fingerprint to identified person

Tags: #<Tag:0x00007f78066da3a0>

My objective was to detect the person who arrived at home.

Red light: the person is absent - Green light: the person is present.

Until today, a motion sensor was used to detect an arrival, and turn on all my scripts of presence.
The main disadvantage: I can’t discriminate a person who live at home, to an ill-intentioned person.

Several options were possible:

  • A GPS position send by smartphone: My objective since I started in Home Assistant Universe was to be the maximum independant of the smartphone: no 4G/3G network, no battery, etc… and I haven’t always my smartphone when I go out.

  • A RFID badges on house keys: A good option, but when I go out with my wife, we take just 1 key, so when we come back, just one people is detected.

  • A face recognition: The best option to me, with the biggest advantage that people are passive. They don’t need to execute an action at arrival to be reconized. But this technology is not really mature yet, and too much environment conditions must be met to be efficient.

  • A biometric recognition: The second best option to me. It brings all the benefits of RFID badge, but normally, we always go out with our fingers contrary to our keys…

After reflexion (and a big fail with facial recognition), I choose:
1 fingerprint scanner
1 RFID reader (for redondancy, and for guest who come feed Sushie (our cat) in case if we are absent too much time).

To be WAF, this project required to be:

  • efficient: if we need to touch 5 times the reader to detect a presence, we’ll never use it…
  • fast: avoid to wait for 10 seconds before scripts turn on
  • visual: see if the presence order is taken in account
  • wireless communication: It must be inside the house and near the entry door

Nota: Several technologies of fingerprint exist:

  • Optical fingerprint Like This
    I tested it. They are pretty easy to use with a lot of documentation and examples on internet. But they take a lot a place, they are very bright, and unidirectional. If your finger is just a little turned, it won’t work.
  • Capacitive fingerprint: Like This. They are less easy to use than optical sensor and no example is available on internet. But they are faster, not bright, pretty small, and omni-directional. It’s like to unlock a smartphone !

Moreover for all these models, all fingerprints are conserved in the component, nothing in the cloud !! The component reads, analyses, and compares the fingerprint to give directly the results !

Equipment used:
x2 NodeMCU8266: like this
x1 Fingerprint Scanner: Like This
x1 RFID Reader and badges RC522: Like This
x2 Green LED: Like This
x2 Red LED (number of led depend of number of people you want to detect. You can also use a screen).

I’m actually using 2 NodeMCU8266, because not enough input/output pins are available in one card. I’m looking for how to solve this.
On the first nodemcu are connected the RFID RC522 and the 4 led: 9 pins used
On the second is connected the Fingerprint Scanner, and probably later a sensor DHT22 for hum/temp…: 2 pins used for the moment

[EDIT]
The steps are the following:

  1. Record his fingerprints & Verify his fingerprints are well reconized:
  • Download the following files: https://github.com/Will711990/Manage_Capacitive_Fingerprint (I put the code to play with Arduino, because it’s not available on the internet, I dealed directly with construtor to have the arduino code!)
  • put the code on your 8266 equiped with fingerprint sensor [To develop]
  • follow the intructions on serial monitor
  1. Link the results given by fingerprint scanner to Hassio with MQTT:

The same protocol is applied with RC522.
I will complete step to step all along the time.

Don’t look at the box, I just took one received by Amazon. I’m designing one with wood !

IMG_4762

7 Likes

Very nice!
Is the fingerprint reader mounted outside?
Looking forward to the end result.

It’s inside, because I use it like an alarm. When you enter at home you have to log with your fingerprint or your badge. If not, an an emergency script is launch.
And outside means, have an hermetic box with more power constraint… but may be later :slight_smile:

Love it! I am in the process of making something similar for our doorway to act as an alarm panel.
I am using Nextion display and RFID reader, but I really like the idea of fingerprint reader, didn’t realise they were so easily available for ESP boards.
May look into swapping my RFID for fingerprint now :grinning:

I still don’t get it. If you and your wife go out, only one of you needs to set/unset the alarm. How does it know you are both out/home?

Hi,
the fingerprint and NFC are like switches.
When I put my finger (or RFID) on the sensor, my presence toggles to out/home and a led becomes green or red to significate the state of switch.
Same thing for each person at home.

Example:
I’m leaving home -> I put my finger -> My switch turns off
My wife goes out 10 minutes later -> She puts his finger -> His switch turns off

As everybody left home, the alarm turn on.

To desactivate alarm, one of our fingerprint is required, and the presence switch of person arrived turn on.

It’s exactly the same thing if we left home together or not.
Thank you for your question and sorry the the late answer !
I hope the answer is pertinent ! :slight_smile:

It seems unnatural for everyone in the household to have to swipe of scan when coming and going.

Picture my wife and I leaving the house. She has the two dogs, one lead in each hand. I turn on the alarm, she manages the dogs (or the grocery bags, or whatever.

OK, my point is that this falls down on human nature, not technology. IMHO.

I think it depends, although this could be improved. Don’t think of this necessarily as the method to arm/disarm the alarm. Think of it as manual presence detection, which just happens to be used to arm / disarm the alarm in a secondary step in the background. And this system is 100% accurate at detecting if someone is at home, provided all people actually “log in” with their fingerprint. I have something similar here, although in my case it’s a tablet where everybody has his own PIN.

I do see the problem you’re talking about though, because that’s exactly what’s happening here as well. For the logout-process I decided to just add an extra button in the UI that does not require the PIN. So while 1 person checks out, he just taps the logout-buttons for all people that are leaving.
The remaining problem still is upon arrival. If multiple persons arrive, it’s not always the case that everybody really walks through the login-process. So at times there are even more people in the house than the system is aware of. But that also falls back to the others not realizing that it’s not about arming / disarming the alarm, it’s manual presence detection. And I do understand, that it’s not the most elegant solution to require all arriving people to log in properly. For that I have (actually had it’s not active anymore) a Netatmo Welcome camera deeper inside the house that also sets known people to be at home even when they did not log in with their PIN. The obvious downside is a regression in terms of security. I have never tried it, but I assume those cameras can be fooled without too much effort.

So long story short: the design mentioned here could be improved by allowing a single person to log out multiple persons, requiring the fingerprint only to set the presence to at home.

Come to think of it, someone who is entering with verification (fingerprint) should also be able to log people in.

FP detected

System: Hi Nick, who has arrived home with you?

Nick: [Wife]

optional:

Nick: and four guests

System: Hi Nick, [Wife] and four guests. I assume you’ll be using the lounge so I’ll put the heating and lights on there, but let me know if you’re going to watch a movie or have a meal.

I am deliberately being comms agnostic, this could be speech, a panel by the door etc.

1 Like

Of course it need improvement !!

I made this, to corresponds to my way of life, and I’m conscient it would not be the same as other ! Everyone can adapt the HA automations to his own idea !

One of a goal of this topic was the adaptation of the fingerprint scanner In HA ! After the results of FPS you can make the automation you want !

Moreover, it’s not an alarm, just know people at home, to have adapted scenarios at arrival.

Believe me no criticism intended. The post is valuable.

I am just not sure the way you describe using it matches human nature :slight_smile:

@Will711990 - Have you tried getting the waveshare sensor to work with ESPHome at all ?

My sensor arrived this week (round one same as your link) and I have it working using the code from your github, but I have been attempting to port that to a CustomUARTComponent for ESPHome… without much luck.
I’ve spent the best part of today trying to get up to speed with how to do it and attempting, but the TxAndRxCmd function crashes the ESP as it blocks for too long.

Hi,

I didn’t try with ESPHome… it could be possible it works !
Did you plugged the sensor on the pins 4 (= D2) and 5 (= D1) of your Nodemcu8266 ?

If it cannot connect, try to inverse D2 and D1 !

Yes, for the most part it’s working. However when in the ‘do while’ loop while waiting to read from the sensor in the TxAndRxCmd function the ESP crashes after about 2 seconds, as it’s blocking.
If I touch the sensor so it gets data straight away then the ESP doesn’t crash.

I basically took your code and jerry rigged it into the CustomUARTComponent example on esphome.io.
The custom component creates a few services in HA which can be called to register / remove a print.
Unfortunately I don’t have the knowledge to get it working without crashing the ESP on timeouts yet.

I am very interested in this to be able to utilize it as a button for certain actions. However, I am a bit of a noob and was wondering if you had any more detailed instructions of how to build this.

Thanks so much for your time, this is such a cool idea!

If you are simply after a touch button (without any authentication) then you can pickup capacitive touch sensor pads which work with esphome. That is probably the easiest way to get started as you don’t really need to write code yourself (just yaml).

I did want to use it as authentication for unlocking a door as well. It would act as a button but could only be activated by certain users. The capacitive touch sensors would allow anyone to unlock the door.