Skip to content

Setting up your devices

abbas0444 edited this page Sep 9, 2026 · 1 revision

Setting up your devices

Three things, in this order. Skip any of them and the sync will tell you what is missing rather than failing quietly.

Everything lives in the Nexus ZKT workspace, or the app tile on your /apps screen.

1. Add your devices

Open Nexus ZKT Settings and add one row per machine.

The device table

Field What to put in it
Device Name Any name you choose, e.g. front-door. It is saved on every check-in this device creates, so pick something you would want to see in a report.
Device IP Address The device's address on your network, e.g. 192.168.1.201.
Port Leave at 4370. Change it only if your router forwards a second machine to a different port — see More than one door.
Device Password Only if your machine has a numeric communication key. Most do not. Leave it empty.
In or Out AUTO suits almost everyone. Use IN or OUT for a reader that only ever records one direction. None stores punches with no direction and leaves it to your Shift Type.
Check Every (Minutes) How long the hourly job waits before reading this machine again.
Last Read Filled in for you after each run. Clear it to force the next scheduled run to read this machine.
Latitude / Longitude Optional. Copied onto each check-in.

Then press Save.

Two rows may not share a name, and may not share an address and port together — both would mean one machine being read twice under two identities.

2. Tell ERPNext who is who

This is the step people miss.

On every Employee, fill in Attendance Device ID with that person's user ID on the machine — the number the device shows as "User ID", not their name, not their employee number.

Only employees with Status: Active are read. Somebody who has left keeps their history but stops producing new check-ins.

To see the user list a machine is holding, run this from your bench folder:

env/bin/python -c "
from zk import ZK
c = ZK('192.168.1.201', port=4370, password=0).connect()
for u in c.get_users(): print(u.user_id, '-', u.name)
c.disconnect()"

Change the IP to yours. If your machine has a communication key, put it in password=.

3. Set your Shift Type

In each Shift Type, set Determine Check-in and Check-out to:

Alternating entries as IN and OUT during the same shift

This works whether or not your machine records a punch direction, and it is what the app's IN/OUT logic assumes.

Optional: tell HRMS how far the check-ins are complete

If HRMS marks attendance for you automatically, it needs to know how far your check-ins are complete — otherwise it will mark people absent for a day whose punches have not arrived yet.

Fill in Shift Type Device Mapping with a JSON list naming each Shift Type and the devices that feed it:

[{"shift_type_name": "Day Shift", "related_device_id": ["front-door", "back-gate"]}]

After every successful read of all of a shift's devices, that Shift Type's Last Sync of Checkin is moved forward. If one of its machines could not be reached, the timestamp is left alone on purpose — moving it would tell HRMS a gap is complete when it is not.

Leave the field as [] if you do not use auto attendance.

Now run it

Press Sync Attendance Now. It reads every machine immediately, ignoring the wait time, and shows a progress bar.

Nexus ZKT Settings after a run

From here on it runs by itself, every hour.

Next

→ More than one door → Troubleshooting if something did not work

Clone this wiki locally