If you are developing for Linux environment and If you have a task related to pulling data from a zkĀ fingerprint attendance machine / biometric device the hair pulling phase may start 1 hour – 3 hours of hopeless search.
Downloading windows SDK and reverse engineering them isn’t the solution. wireshark isn’t the solution and connecting the the shared .mdb file isn’t also a solution the right solution is to connect to the machine using UDP port 4370.
0- Backup your attendance machine data.(You may use zktimes for this step.)
1- clone this repo:
For Python: git@github.com:dnaextrim/python_zklib.git
For PHP: https://github.com/dnaextrim/php_zklib
2- Login to the attendance machine as admin
and set the communication key (aka communication password to 0 or empty).
3- Set the IP address to some IP (say 192.168.1.201) this is the default one.
4-Connect the attendance machine to the network (ethernet most commonly)
5-Change IP:
zk = zklib.ZKLib(“192.168.1.201″, 4370)
6- Comment this (dangerous line that clears admin):
print “Pesan Clear Admin:“, zk.clearAdmin()
Now, try to run the script with the machine connected to your local network.
./zktest.py
I’ve just saved your life.
Check the file capability it should be very easy for any python programmer from here on.
Note: you may find very strange messages like “Pesan Koneksi” or use my safe English translated fork.
Enjoy!
I must say it was hard to find your website in google.
You write awesome content but you should rank your website higher in search engines.
If you don’t know how to do it search on youtube:
how to rank a website Marcel’s way
Hi,
Can I create user ,delete user & restrict a user .
Is there any way to access it while the comm key is set to something like 123? In short, is there a way to pass the comm key in the connect function? Is that an available parameter?
Hi,
Is it possible to know who is checking their assistance in real time in my python program?
I don’t think you can in real time but you can constantly pull the data and see if there’s any change.
Good afternoon, I need to get the encrypted fingerprints, that is, I need to show the fingerprint of each user. How do I do it? regards
We can integrate the biometric attendance machine with the any web based ERP solutions such as Odoo/OpenERP , ERPNext, HRAPP, Zoho, and any own application, without any software support in windows/linux , watch http://www.youtube.com/watch?v=RQ6W3S3bV5o? . It Supports some of the ZkTeco biometric machines, essl biometric machines along with all the biometric machines listed http://camsunit.com/product/home.html
Hi,
Thank you for sharing AlSayedGamal/python_zklib,this has helped us a lot. We would like to know if you have any upgrades or any solution for python 3. The above version works for python 2.7. We are currently using odoo 11 and this does not work any more.It works fine for odoo 10. Please let us know how you could support us on this.
Thank you !
Regards
Dharmakantha
I don’t maintain this repo any more but upgrading to python 3.0 can be a great addition I’ll see if I can make it next weekend.
I strongly recommend that you add it as an issue to the repo.
Sorry for late reply :O
Good afternoon, I need to communicate with zkteco device using TCP protocol but your code is using UDP. How do i do that using TCP protocol ? Thank you
I’m not aware of any other technique to TCP communication other than the HTTP protocol web interface they have in some versions but I don’t think that this will work for all versions.
Hi AlSayedGamal, I’m trying out the python code but having errors regarding the unicodeDecoder. And also the code was not able to display the attendance. Pls advice.
Can you please, your issue on the repo I’ll be glad to check it and let you know what’s wrong with it.
Sir i open this zk test file but its show me a blank page can you help
i also entered Machine ip or port but still blank ??