Try ERPNext Buy Support Partners Foundation Foundation Members

How to integrate biometric device in ERP Next attendance

How to configure and setup the fingerprint device IP Address in ERP Next.

You have 2 options to do this .

  1. Make one whitelist function in erpnext that accept data from your bio-metric device. When punch in-out one API call trigger from device that call this whitelist function and in whitelist function you can write your logic.
  2. Make one API function your bio-metric side where you pass date and get all attendance information of that date or you can set one scheduler that call everyday and put attandance information in erp.
1 Like

I am new in ERPNext. I don’t know how to create whitelist function and where to store. Is there any link available?

1 Like
4 Likes

It shows error while running the script,

Thanks for your comment. I will check.

Can anyone share a working whitelist script sample? Would really appreciate it. I have a Hikvision Access Control system and i would love to integrate it to the biometric attendance module but i am kinda lost as to how to create the whitelist. I checked the article above but it didn’t help a noob like me.

@flexy2ky as far as bio-metric integration goes, you might not have to create a new whitelisted function. This already exists in the “Employee Checkin” DocType.
The function is called add_log_based_on_employee_field.

This function can be accessed via the URL: /api/method/erpnext.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field

In case you need an example of how to use this whitelisted function you can refer to it here: https://github.com/frappe/push-biometric-erpnext/blob/6fd922ceb9a41289c04281273d35d5ad7b79f044/push_to_erpnext.py#L150

@Maheshwari_Bhavesh, please note that the whitelisted function that you are recommending to write already exists. Also, ERPNext now handles the part of converting the IN/OUT time logs to attendance. Please refer to the Auto Attendance feature for the same.

yes @karthikeyan5. But i did that before this function available so i recommend.

Thank you.

I wish i could interpret these information. I’m as nooby as noob can get.

where you put this code…

@IT_Design, this script needs to be installed in any of the computer that has IP Network access to your bio-metric device(i.e most probably on a machine that is on the same LAN network as your bio-metric device).

Not ABLE TO RUN push_to_erpnext.py.
HOW I CAN RUN THAT AND WHERE TO RUN IT

ile “push_to_erpnext.py”, line 42
def pull_process_and_push_data(device, device_attendance_logs=None):
^
This is te error which is coming to me when i am running " push_to_erpnext.py"

Dear @karthikeyan5 thanks very much for sharing the script. I have one issue when running the script which is
frappe.throw(_("No Employee found for the given employee field value. '{}': {}").format(employee_fieldname,employee_field_value))

Dear @Anmol_b1994, @IT_Design and others

  1. Install Python Latest Version. See tutorial from https://developer.mozilla.org/en-US/docs/Learn/Common_questions/set_up_a_local_testing_server

  2. Install GIT from https://git-scm.com/download/win

  3. From the Windows Command Prompt, create a directory and move to that folder
    mkdir biometric
    cd biometric

  4. Then follow the instructions fromhttps://github.com/frappe/push-biometric-erpnext

1 Like