How to integrate the biometric device with attendance

what are the procedure to configure with the biometric devices with Attendance module in erp next

I also have same query. if someone knows plz reply

Hi Pradeep
I hope this github will help you

For configuration
In this git there is folder named [local_config.py.template] make a copy of this file and rename it to local_config.py and change
ERPNEXT_API_KEY = ‘’
ERPNEXT_API_SECRET = ‘’
ERPNEXT_URL = ‘http://dev.local:8000
details with your details
{‘device_id’:‘test_1’,‘ip’:‘192.168.0.209’, ‘punch_direction’: None, ‘clear_from_device_on_fetch’: False},
change device _id with your biometric device id and ip to your biometric ip
then it will works fine

Hi Induja, I am getting following error while trying to connect biometric device.

2023-05-05 13:39:11,546 INFO Cleared for lift off!
2023-05-05 13:39:11,546 INFO Processing Device: CEXJ203660464
2023-05-05 13:39:11,546 ERROR Device Attendance Dump Found in Log Directory. This can mean the program crashed unexpectedly. Retrying with dumped data.
2023-05-05 13:39:12,002 INFO Mission Accomplished!
2023-05-05 13:39:12,522 INFO Cleared for lift off!
2023-05-05 13:39:12,522 INFO Processing Device: CEXJ203660464
2023-05-05 13:39:12,522 ERROR Device Attendance Dump Found in Log Directory. This can mean the program crashed unexpectedly. Retrying with dumped data.
2023-05-05 13:39:13,091 INFO Mission Accomplished!
2023-05-05 13:39:11,995 ERROR Error during ERPNext API Call. 5037 1683173177.0 CEXJ203660464 Traceback (most recent call last):
File “apps/frappe/frappe/handler.py”, line 72, in execute_cmd
method = get_attr(cmd)
File “apps/frappe/frappe/handler.py”, line 258, in get_attr
method = frappe.get_attr(cmd)
File “apps/frappe/frappe/init.py”, line 1597, in get_attr
return getattr(get_module(modulename), methodname)
File “apps/frappe/frappe/init.py”, line 1327, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘erpnext.hr’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 66, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 74, in execute_cmd
frappe.throw(_(“Failed to get method for command {0} with {1}”).format(cmd, e))
File “apps/frappe/frappe/init.py”, line 525, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 493, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 442, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Failed to get method for command erpnext.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field with No module named ‘erpnext.hr’

2023-05-05 13:39:11,995 ERROR exception when calling pull_process_and_push_data function for device{“device_id”: “CEXJ203660464”, “ip”: “192.168.0.14”, “punch_direction”: “”, “clear_from_device_on_fetch”: “”}
Traceback (most recent call last):
File “C:\Users\ADMIN\Downloads\biometric-attendance-sync-tool-master\biometric-attendance-sync-tool-master\erpnext_sync.py”, line 62, in main
pull_process_and_push_data(device, device_attendance_logs)
File “C:\Users\ADMIN\Downloads\biometric-attendance-sync-tool-master\biometric-attendance-sync-tool-master\erpnext_sync.py”, line 140, in pull_process_and_push_data
raise Exception(‘API Call to ERPNext Failed.’)
Exception: API Call to ERPNext Failed.
2023-05-05 13:39:13,081 ERROR Error during ERPNext API Call. 5010 1672919818.0 CEXJ203660464 Traceback (most recent call last):
File “apps/frappe/frappe/handler.py”, line 72, in execute_cmd
method = get_attr(cmd)
File “apps/frappe/frappe/handler.py”, line 258, in get_attr
method = frappe.get_attr(cmd)
File “apps/frappe/frappe/init.py”, line 1597, in get_attr
return getattr(get_module(modulename), methodname)
File “apps/frappe/frappe/init.py”, line 1327, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 992, in _find_and_load_unlocked
File “”, line 241, in _call_with_frames_removed
File “”, line 1050, in _gcd_import
File “”, line 1027, in _find_and_load
File “”, line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named ‘erpnext.hr’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 66, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 74, in execute_cmd
frappe.throw(_(“Failed to get method for command {0} with {1}”).format(cmd, e))
File “apps/frappe/frappe/init.py”, line 525, in throw
msgprint(
File “apps/frappe/frappe/init.py”, line 493, in msgprint
_raise_exception()
File “apps/frappe/frappe/init.py”, line 442, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Failed to get method for command erpnext.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field with No module named ‘erpnext.hr’

2023-05-05 13:39:13,081 ERROR exception when calling pull_process_and_push_data function for device{“device_id”: “CEXJ203660464”, “ip”: “192.168.0.14”, “punch_direction”: “”, “clear_from_device_on_fetch”: “”}
Traceback (most recent call last):
File “C:\Users\ADMIN\Downloads\biometric-attendance-sync-tool-master\biometric-attendance-sync-tool-master\erpnext_sync.py”, line 62, in main
pull_process_and_push_data(device, device_attendance_logs)
File “C:\Users\ADMIN\Downloads\biometric-attendance-sync-tool-master\biometric-attendance-sync-tool-master\erpnext_sync.py”, line 140, in pull_process_and_push_data
raise Exception(‘API Call to ERPNext Failed.’)
Exception: API Call to ERPNext Failed.

Hi pradeep ,
Pls check weather you have installed erp next Hrms module
I think that’s the issue

ERPNext provides an API for receiving real-time attendance logs, and Cams Biometrics machines offer integration support with ERPNext through this API. The integration does not require any desktop software or setup on a desktop computer. Instead, it relies on an API Key and Secret Key created from your ERPNext server.

Once the biometric device is online, real-time synchronization with your ERPNext server is established. Any offline data will be automatically synced once the device comes back online. It’s important to note that this feature is supported from ERPNext version 11.0.3 onwards and will provide reports within the Employee Check-In Report section.

For further details about the integration service, you can visit ErpNext Integration - ErpNext Integration with Live Biometric Attendance System (from Ver.11.0.3) | Cams Biometrics.