Auto attendance check in log type issue

Hi,

We have successfully connected our essl device to ERPNext and able to fetch the employee check-ins. The issue arises when we try to open the employee check-in as it shows only the “IN” log type, the “OUT” log type is also taken as “IN”. Can anyone help us with this? And also the attendance is not getting updated, the auto-attendance has been enabled but still not able to process.

1 Like

Hi Tejal,

Have you put all the details required in the shift type as per the screenshot attached below:

You will have to define the check in and checkout and how you want the working hrs to be calculated.

If you have already mentioned all these fields and still not working then @karthikeyan5 will be able to help you.

Regards,
Reema

@Tejal_Thakur01, how have you connected the ESSL device to your ERPNext?.. The expectation is that you have to pass the appropriate IN (or) OUT while creating the employee check-ins. If you have only one device for both IN and OUT, (or) if you do not have reliable log type information with you, please use the “Determine Check-in and Check-out” option accordingly in the auto attendance setting.

Hi Karthik,

We are running the python script in the same network where we have installed the ESSL device. We have now been able to connect the device properly but we are getting issues with the “IN” & “OUT” logs.

Basically, the output or the employee check-ins being generated in ERPNext have their log type as only “IN” whereas it should be alternate IN / OUT as per the shift type settings.

Hi Karthik,

We resolved the issue by tweaking the python script. The script runs successfully on a single device also which accepts IN/OUT. Here is what we have added:

if device_attendance_log[‘punch’] == 1 or device_attendance_log[‘punch’] == 5:
device[‘punch_direction’] = ‘OUT’
elif device_attendance_log[‘punch’] == 0 or device_attendance_log[‘punch’] == 4:
device[‘punch_direction’] = ‘IN’

3 Likes

@Tejal_Thakur01, thanks for sharing you solution here… it has now been add to the script.

You can now set punch_direction to ‘AUTO’ in the config and the script will attempt to parse punch direction.

Also,

The setting in the shift type is meant to process the employee checkin log during the attendance marking attempt, by assuming that alternate logs are IN and OUT, and not actually modify the created logs.

hi how to set erpnext ignore the attendance code . i want set first check in auto set as punch in , last check out as punch out . at local_config.pyi i set punch_direction to ‘AUTO’.
here my shift setting.

here ouput device log P:0 Punch in ,P:1 punch out , P: 255 undefined

thanks

@Tejal_Thakur01 Can u please send link how to install python script. My self try to install but its not working

hello, We were integrating Biometric machine to erpnext with use of “frappe/biometric-attendance-sync-tool”. But we have faced challenge with Auto Attendance settings in Shift Type. After Selecting “strictly based on Log type” Showed Error in Biometric sync tool:27
But if I select on “Alternating entries as IN and OUT during same shift” Employee Checkin receives all employees that checked in and out without “Log Type”

1 Like

@karthikeyan5, Hello, I added “punch_direction”: “AUTO” in local_config.py file, but Employee Checkin showing this in Log Type

1 Like

I got the solution! You need to setup your ZKTeco device (My device is ZKteco F18) for Log Type status issue.

Prerequisite:

  1. Create Shift Type and check the Enable Auto Attendance option.
  2. Assign Default Shift Type for all Employees.
  3. Assign Biometric/RF tag ID number (like 1, 2, 3 or 1001, 1002, 1003…) in application(Employee > Attendance and Leave Details > Attendance Device ID (Biometric/RF tag ID)) and also for the device as well for all employees.

ZKTeco device Setup Guide for Punch States Settings:

Step 1: In the initial interface, press [M/OK]. If you are an Administrator of this device, punch your ID Card or fingerprint to access the device menu.

Step 2: Go Personalize > Punch State Options from Menu

Step 3: First enable the Punch State Required by ON/OFF button (After enabling this button, you will see Log Type In/Out status in your ERPNext application). Then you need to choose an option from Punch State Mode according to your access control setup.

Step 4: Go Anti-passback Setup option from the Access Control menu. Then select Anti-passback Direction and Device Status options as per your need.

In my case, I am using ERPNext v14 in Oracle VM VirtualBox. I have a ZKTeco F18 device as a master unit for Check-In and ZKTeco FR1200 device as a slave unit for Check-Out. It is a Master-Slave configuration. According to my Access Control setup, I am using Normal Fixed Mode for Punch State Mode option. Then enabled the Anti-passback Setup option from the Access Control menu. Then chose the In for Device Status option and IN/OUT Anti-passback for the Anti-passback Direction option for strict access control configuration. Strict means, if you Check-In then you have to Check-Out when you exit or vice versa. No multiple/duplicate punch allowed here. If you don’t want the strict configuration then chose the OUT Anti-passback option. In this option there will be no restriction for multiple/duplicate Check-In and Check-Out at a time.

After everything is done, You have to run the erpnext_sync.py by just pressing ENTER key after configuring the local_config.py file as per the Author’s Instruction. After that Everythihg should work!

Note: If your are using ERPNext v14, then you have to edit “frappe/biometric-attendance-sync-tool” - erpnext_sync.py file to work with ERPNext v14 otherwise Auto Attendance for Employee Checking will not work.

Edit line 180: Replace …/erpnext.hr.doctype… text with …/hrms.hr.doctype…

like this:

url = config.ERPNEXT_URL + "/api/method/erpnext.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field"
to
url = config.ERPNEXT_URL + "/api/method/hrms.hr.doctype.employee_checkin.employee_checkin.add_log_based_on_employee_field"

Because, In ERPNext v14, HR module is a separate application(HRMS).

But there is still one problem which I am facing right now is Auto Attendance. Attendances not mark automatically. I have to press the Mark Attendance button for manual attendance everyday in Shift Type page. If anyone have any solution for this, please share it.

Reference manual link for ZKTeco F18 (Follow page no: 33 & 43): User manual ZKTeco F18 (English - 70 pages)

2 Likes

Did you solve this problem

Yes this has been resolved. Please check thus post:

1 Like

in version 15 there is no update in tool we are getting logs without log type how to set this up in version 15