Python library for ZhianTec fingerprint sensors (e.g. ZFM-20, ZFM-60)
Python library for ZhianTec fingerprint sensors (e.g. ZFM-20, ZFM-60)
The PyFingerprint library allows to use ZhianTec ZFM-20, ZFM-60, ZFM-70 and ZFM-100 fingerprint sensors on the Raspberry Pi or other Linux machines. Some other models like R302, R303, R305, R306, R307, R551 and FPM10A also work.
Note: The library is inspired by the C++ library from Adafruit Industries:
There are two ways of installing PyFingerprint: Installation of the stable or development version. The stable version is distributed through the PM Code Works APT repository and is fully tested but does not contain the latest changes.
Add PM Code Works repository:
Debian 9/Ubuntu 16 & 17:
echo "deb http://apt.pm-codeworks.de stretch main" | sudo tee /etc/apt/sources.list.d/pm-codeworks.list
Debian 10/Ubuntu 18 & 19:
echo "deb http://apt.pm-codeworks.de buster main" | sudo tee /etc/apt/sources.list.d/pm-codeworks.list
Add PM Code Works signing key:
wget -qO - http://apt.pm-codeworks.de/pm-codeworks.de.gpg | sudo apt-key add -
sudo apt updateInstall the package:
sudo apt install python3-fingerprintThe development version contains the latest changes that may not have been fully tested and should therefore not be used in production. It is recommended to install the stable version.
Install required packages for building:
sudo apt install git devscripts equivsClone this repository:
git clone https://github.com/bastianraschke/pyfingerprint.gitBuild the package:
cd ./pyfingerprint/src/
sudo mk-build-deps -i debian/control
dpkg-buildpackage -uc -usThe library supports Python 2 and Python 3. There are one Debian package for each. It's up to you which version you install.
For Python 3 use:
sudo dpkg -i ../python3-fingerprint*.debFor Python 2 use:
sudo dpkg -i ../python-fingerprint*.debInstall missing dependencies:
sudo apt -f installIf you do not have a Debian based OS or something does not work you can also install the Python package via PIP:
pip install pyfingerprintNOTE: It is important to not use the Debian package and PIP package at the same time!
Allow non-root user "pi" (replace it correctly) to use the serial port devices:
sudo usermod -a -G dialout pi
sudo rebootpython /usr/share/doc/python-fingerprint/examples/example_enroll.pypython /usr/share/doc/python-fingerprint/examples/example_search.pypython /usr/share/doc/python-fingerprint/examples/example_delete.pypython /usr/share/doc/python-fingerprint/examples/example_downloadimage.pypython /usr/share/doc/python-fingerprint/examples/example_generaterandom.pySee my blog post for more information:
No open issues yet, or sync has not completed.