This project is based on Raspberry pi 1 and UART fingerprint scanner.
It is very easy to build and control. 
Fingerprint scanner is able to store 1000 fingerprints.
You can add new one, delete or even download image of scanned fingers.
Everything is controlled via telegram bot / or web-interface(in future)

Adding new finger is very easy:

*Push "Add new finger" in telegram bot and place your finger to scanner two times
*Write the name of the person, and it will be stored in text file with the number of the fingerprint( it is need to delete specific finger. )
* As soon as you added new finger, push "Start search", place your finger and this time relay will change its state

* Connect relay to door and you do not need any keys no more, use your finger to enter.

Preparation

For this you will need an RPI1/2/3 (it doesn't matter)  with the Raspbian installed. You can get it here: https://www.raspberrypi.org/downloads/raspbian/

Boot up Raspbian and make some configuration.

sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt

Edit the file:

sudo nano /boot/cmdline.txt

Delete any parameters involving the serial port "ttyAMA0" or "serial0" if it exist, which in this example is:

console=ttyAMA0,115200

Which gives:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

Press CTRL+X to exit and save .

Next, you have to disable the serial getty service:

sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl disable serial-getty@ttyAMA0.service

Enable UART

Enabling UART with minimum core frequency:

pi@raspberrypi:~ $ sudo nano /boot/config.txt

# Enable UART
enable_uart=1

Enabling UART with maximum core frequency:

pi@raspberrypi:~ $ sudo nano /boot/config.txt

# Enable UART
enable_uart=1
force_turbo=1

Install Python library for ZFM fingerprint sensors

~$ echo "deb http://apt.pm-codeworks.de wheezy main" | sudo tee -a /etc/apt/sources.list
~$ wget -O - http://apt.pm-codeworks.de/pm-codeworks.de.gpg | sudo apt-key add -
~$ sudo apt-get update
~$ sudo apt-get install python-fingerprint
~$ sudo usermod -a -G dialout pi
~$ cd /usr/share/doc/python-fingerprint/examples/

In my case i host telegram bot apart from rpi, so i created ssh secure public key to communicate with raspberry.

Login to server where the telegram bot is hosted:

server1:~# cd /root/
server1:~# ssh-keygen -t dsa

Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa): <PRESS ENTER TO ACCEPT DEFAULT>
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase): <PRESS ENTER FOR NO PASSPHRASE>
Enter same passphrase again: <PRESS ENTER FOR NO PASSPHRASE>
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
41:03:aa:dc:cc:b9:39:50:65:bc:ee:7b:36:d2:64:7a root@server1

Copy the public key from 'server1' to 'raspberrypi'...

server1:~# scp /root/.ssh/id_dsa.pub 192.168.0.2:/root/.ssh/authorized_keys

You can test it with 

ssh root@192.168.0.2

Create Telegram Bot

You can check official guide on how to do this in just few steps:
https://core.telegram.org/bots#3-how-do-i-create-a-bot

Install some dependencies for bot 

sudo apt-get install libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make
apt-get update
apt-get -y install python-pip
python get-pip.py
pip install pytelegrambotapi 
pip install simplejson

Run BOT

(in my case i host bot on virtual server)

# -*- coding: utf-8 -*-
import config
import telebot
import os
import time
import requests
import subprocess
import simplejson
import sys
from telebot import types
from telebot import util

bot = telebot.TeleBot(config.token)


@bot.message_handler(commands=['help', 'start'])
def begin(message):
    markup = types.ReplyKeyboardMarkup(selective=True,row_width=2, resize_keyboard=True)
    markup.add('🔍Start search', '👆🏻Add new finger', u'✅Status')
    msg = bot.reply_to(message, 'Choose the action', reply_markup=markup)
    bot.register_next_step_handler(msg, process_step)

@bot.message_handler(commands=['name'])
def name(message):
  sent = bot.send_message(message.chat.id, 'Type name')
  bot.register_next_step_handler(sent, hello)

def hello(message):
    open('username.txt', 'w').write(message.text)
    os.system("sh find.sh 2>/dev/null")
    bot.send_message(message.chat.id, 'Done')
    return begin(message)

def process_step(message):
    if message.text==u'🔍Start search':
        os.system("cat </dev/null |ssh root@10.14.0.116 killall python 2>/dev/null")
        os.system("cat </dev/null |ssh root@10.14.0.116 python /usr/share/doc/python-fingerprint/examples/example_search.py & 2>/dev/null")
        return begin(message)

    if message.text==u'👆🏻Add new finger':
            os.system("cat </dev/null |ssh root@10.14.0.116 killall python 2>/dev/null")
            bot.send_message(message.chat.id, 'Place finger on the scaner...')
            output = os.system("ssh root@10.14.0.116 python /usr/share/doc/python-fingerprint/examples/example_enroll.py > add.txt << EOF")
            from telebot import util
            large_text = open("add.txt", "rb").read()
            splitted_text = util.split_string(large_text, 3000)
            for text in splitted_text:
                   bot.send_message(message.chat.id, text)
                   return name(message)

    if message.text==u'✅Status':
            from telebot import util
            large_text = open("add.txt", "rb").read()
            splitted_text = util.split_string(large_text, 3000)
            for text in splitted_text:
                   bot.send_message(message.chat.id, text)
                   return begin(message)

    else:
        bot.send_message(message.chat.id, "Try again")

if __name__ == '__main__':
    while True:
        try:
            bot.polling(none_stop=True)
        except Exception as ex:
            logger.error(ex)

 
Create additional bash script for name adding to "database"

#!/bin/bash

number=$(sed -n '3p' < add.txt |awk '{print $4}')
if grep -R "New" add.txt 
then
sed -i s/$/_$number/ username.txt
sed -n '1p' username.txt >> database.txt
else
    echo not found
fi

Assembling

Relay connection

You can test the relay with python script, just create,paste the code and run it:

#!/usr/bin/env python

import time

import RPi.GPIO as GPIO


GPIO.setmode(GPIO.BCM)
GPIO.setup(4, GPIO.OUT)
GPIO.output(4, GPIO.LOW)

time.sleep(1)

GPIO.output(4, GPIO.HIGH)
GPIO.cleanup()


Fingerprint scanner connection

To connect scanner you will need only 4 pins

And that's all, to test it you can run any of python library scripts that you have installed before. 
I will post modified Python fingerprint scanner files here, so just download them and overwrite and you are done.