Connection ZKTeco with ERPNext

Bumping this up in case someone has an idea of what i’m going through and can recommend a solution.


Did you see the comment below from iMoshi?

@olamide_shodunke Yes i did. But unfortunately this doesn’t seem to be an option for me becaus as you know, most companies here have strict no-return policy and of course the device was with me for more than 24hrs before this post and then the lockdown happened. So my only option is to purchase another device. But i am now skeptical because there’s no guarantee it will work as the documentation for the integration app says 6.60 firmware for all supported devices and this thing is expensive here.

Thanks for the very detail step. I did followed your guide and get mine to work.


Hi all, I am new with zkteco, I connect zkacess with sql but I have problem with report, I can not use zktime . A lot of information is missing, can any one support

The ZKTeco experts are @karthikeyan5 and @vigneshsekar.

I had to deploy ZKTeco Biometric Integration at a customer setting, so I reached out to these guys and signed up for a support plan with them. They were awesome. They helped set it up. Trouble helped me shoot problems, and I don’t have to get into the depths of this solution as that is not my core area. And if I have to extend this solution to another biometric devices, I know that I don’t need to break my head on this, I just go them and outsource that part to them.

I think we all need to leverage each other and if as a community we have to thrive, we have to become experts in some area and while each of us take on the complete responsibility for the implementation with a client, we have the confidence that we can deliver because we have the experts in each area supporting us at the back end.

And why should the experts support us? Because we buy a support plan from the experts.

Just a thought!




@flexy2ky, Yes you are right, you can add a “force_udp” parameter as mentioned here: GitHub - fananimi/pyzk: Unofficial library of zkteco fingerprint attendance machine

Thank you @JayRam :blush:

Thank you for the the thread. It has really helped me a LOT as a newcomer.

1 Like

i know this is an old post, but is there a way we can use the device communication password?
my devices have communication password and I cannot use them without it.

I have connected the device via
cd pyzk
python3 with password and it connects but i cannot give password in the erp sync py file so cannot sync

@kanuns, currently this is not supported, but it should be a single line feature to add to the script. Do open a feature request at Issues · frappe/biometric-attendance-sync-tool · GitHub. Or please send a PR if you manage to fix it yourself.

The fix will be in this line:


I could fetch data from the biometric device(according to “2023-01-31 17:35:37,366 INFO Attendances Fetched: 37678” in logs.log ) but I have this error in my error.log:

2023-01-31 17:03:32,726 ERROR Error during ERPNext API Call. 1000 1674647885.0 1 Traceback (most recent call last):
File “apps/frappe/frappe/”, line 69, in application
response = frappe.api.handle()
File “apps/frappe/frappe/”, line 55, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/”, line 38, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/”, line 76, in execute_cmd
return, **frappe.form_dict)
File “apps/frappe/frappe/”, line 1457, in call
return fn(*args, **newargs)
File “apps/erpnext/erpnext/hr/doctype/employee_checkin/”, line 103, in add_log_based_on_employee_field
File “apps/frappe/frappe/model/”, line 261, in insert
File “apps/frappe/frappe/model/”, line 1052, in run_before_save_methods
File “apps/frappe/frappe/model/”, line 941, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “apps/frappe/frappe/model/”, line 1259, in composer
return composed(self, method, *args, **kwargs)
File “apps/frappe/frappe/model/”, line 1241, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “apps/frappe/frappe/model/”, line 938, in fn
return method_object(*args, **kwargs)
File “apps/erpnext/erpnext/hr/doctype/employee_checkin/”, line 19, in validate
File “apps/erpnext/erpnext/hr/doctype/employee_checkin/”, line 28, in validate_duplicate_log
File “apps/frappe/frappe/”, line 504, in throw
File “apps/frappe/frappe/”, line 479, in msgprint
File “apps/frappe/frappe/”, line 434, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: This employee already has a log with the same timestamp.
Employee Checkin EMP-CKIN-01-2023-000005

2023-01-31 17:03:32,726 ERROR exception when calling pull_process_and_push_data function for device{“device_id”: “1”, “ip”: “”, “punch_direction”: “”, “clear_from_device_on_fetch”: “”}
Traceback (most recent call last):
File “C:\Users\Mehdi\Downloads\biometric-attendance-sync-tool-v1.0-win64\”, line 51, in main
pull_process_and_push_data(device, device_attendance_logs)
File “C:\Users\Mehdi\Downloads\biometric-attendance-sync-tool-v1.0-win64\”, line 129, in pull_process_and_push_data
raise Exception(‘API Call to ERPNext Failed.’)
Exception: API Call to ERPNext Failed.

I don’t have any idea what I should do.

I appreciate any help.

The quick solution will be to go to Employee Checkin doctype and find this record EMP-CKIN-01-2023-000005 and delete it and restart the sync process. I believe the latest version of the tool has some functions to bypass this restriction. So check the documentation or a quick search for other posts about time attendance should tell you how to enable the bypass.

Hope This helps


Thank you for your help. It works and I have successful attendance in ERPNext. But it doesn’t have a log type(IN/OUT). Would you please tell me what I should do?

Thank you in advance

That is dependent on your biometric machine.

1 Like

There is some info about log type in following post that might be relevant to your question.

1 Like

thanks, hopefully it is fixed.

thank you so much.

Thank you for your instructions, and I did all steps, But I have a comment, there is no file named “” in GitHub - frappe/biometric-attendance-sync-tool: A simple tool for syncing Biometric Attendance data with your ERPNext server

I did all steps, but I cant make auto attendance with ERPNext.
Can you share a video for this steps?