Documentation / Biometric Attendance

๐Ÿ“ก Biometric Attendance Setup

This guide walks you through connecting a ZKTeco, eSSL, or CPPlus biometric attendance device to Ledgr. Once configured, every fingerprint/face/card punch on the device flows automatically into Ledgr's attendance grid โ€” feeding payroll without any manual entry.

What Ledgr's biometric integration does

Compatibility

VendorModelsProtocolStatus
ZKTecoK40, K50, MB360, MB460, MA300, SpeedFace, iClock series, ZAM170, F18, F22TCP 4370 (open ZK)โœ… Fully supported
eSSLX990, K30, K30Pro, F18, BioMax โ€” eSSL is largely ZKTeco OEM in IndiaTCP 4370 (open ZK)โœ… Fully supported
CPPlusCP-VTA-FT, CP-VFA-FA, CP-VCM-FA seriesTCP 4370 (open ZK) โ€” most modelsโœ… Mostly supported
CPPlus (older)CP-VTA-FRH-NRD-V seriesVendor's Realtime SDK (Windows DLL)โŒ Not supported (out of cross-platform scope)
Other vendorsRealand, Suprema, AnvizVariousโš ๏ธ Ad-hoc โ€” test before buying
Buying advice: If you're sourcing a new device for use with Ledgr, pick ZKTeco K40 or K50 (cheap, reliable, every distributor stocks them) or any current SpeedFace face-recognition model. Confirm "supports ZK Protocol over TCP 4370" before purchasing.

Architecture

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  TCP 4370  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  ZKTeco / eSSL  โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’  โ”‚ Ledgr Desktop    โ”‚
  โ”‚  Device         โ”‚             โ”‚ (your PC)        โ”‚
  โ”‚  192.168.1.50   โ”‚             โ”‚ Pulls punches    โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                          โ”‚
                                          โ–ผ
                                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                โ”‚ biometric_punches  โ”‚ raw log
                                โ”‚ table (audit)      โ”‚
                                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                          โ”‚
                                          โ–ผ aggregator
                                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                โ”‚ attendance table   โ”‚ daily
                                โ”‚ (employee ร— date)  โ”‚
                                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                          โ”‚
                                          โ–ผ
                                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                โ”‚ Salary runs        โ”‚
                                โ”‚ (auto-feeds hours) โ”‚
                                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    

Ledgr sits on the same LAN as your device. It opens a TCP socket, authenticates with the comm password (default 0), and reads punches. Each punch is recorded in the raw biometric_punches table. The aggregator then groups punches by (employee, date), picks first-in/last-out, and writes a row to the daily attendance table.

Initial setup

1. Enable the Biometric Attendance feature

The feature is OFF by default for every niche. Turn it on:

  1. Settings โ†’ Modules.
  2. Find Biometric Attendance in the feature list.
  3. Toggle ON.
  4. Save โ†’ restart the app. The Staff & Payroll hub now shows a Biometric tab with Devices + Punches sub-tabs, plus a status pill in the top-right.

2. Network requirements

Three things must be true:

3. Configure the device's IP

On the device's keypad / touchscreen menu (varies slightly per model):

  1. Menu โ†’ Comm / Network โ†’ set IP, subnet mask, gateway.
  2. Set communication password (default 0). If you've set it to non-zero, remember the value.
  3. Save and restart the device.
  4. Ping the device IP from Ledgr's PC to confirm it's reachable: ping 192.168.1.50

4. Add the device in Ledgr

  1. Staff & Payroll โ†’ Biometric tab โ†’ Devices.
  2. Click + Add Device.
  3. Fill the form:
    • Name โ€” friendly label like "Front Gate", "Factory Floor".
    • Vendor โ€” ZKTeco / eSSL / CPPlus (drives expected behavior; doesn't change protocol).
    • IP address โ€” e.g. 192.168.1.50.
    • Port โ€” leave 4370 unless you've changed it on the device.
    • Comm password โ€” leave 0 unless you've set a non-zero value.
    • Timezone โ€” optional; defaults to company timezone.
  4. Save.

5. Test the connection

From the Devices list, click the ๐ŸŒ Test icon next to your device. Ledgr opens a TCP socket and reads:

Success toast: "Front Gate: connected. ZKTeco K50 (S/N 1234ABC5678) ยท 23 users ยท 1,847 punches on device."

Failure toast: "Front Gate: Connection failed: dial tcp 192.168.1.50:4370 i/o timeout." โ€” see Troubleshooting below.

The User Mapping Wizard

Critical step. The device knows users by their device user ID (e.g. "1", "EMP-042", "100"). Ledgr knows them by employee ID. We need to map between the two.

How it works

  1. From the Devices list, click the ๐Ÿ‘ฅ Map Users icon next to your device.
  2. Ledgr fetches the list of users from the device. Each row shows: device user ID, device user name (as enrolled on the device), privilege level (Admin / User).
  3. For each row, pick the matching Ledgr employee from the dropdown.
  4. Click โœจ Auto-match by name at the top โ€” Ledgr suggests matches by name similarity (handles upper/lower case, spaces, punctuation). Manually fix any wrong suggestions.
  5. Click Save (N). The mapping is stored and any pending punches for those users are auto-resolved to the matched employees.
Pro tip: When you enroll an employee on the device, set their User ID to match their Ledgr employee_code. Auto-match by name will be 100% accurate, and the mapping setup takes 1 click for the whole list.

Multi-device mapping

If the same employee swipes on multiple devices (front gate, back office, factory floor), each device may have a different user ID for them. Repeat the mapping wizard per device โ€” same employee, multiple device-user-ID rows in the mapping table. Punches from any device flow into the same employee's attendance.

Syncing punches

Manual sync

From the Devices list, click the ๐Ÿ”„ Sync icon next to a device. Ledgr connects, pulls all punches, and writes new ones to biometric_punches with INSERT-OR-IGNORE on the (device, user, timestamp) unique constraint โ€” re-syncs are safe.

Result toast: "Front Gate: pulled 1,847 (12 new โ€” 8 matched, 4 unmapped). Map remaining users."

Auto-sync timer

  1. Settings โ†’ Attendance Policy.
  2. Scroll to Auto-Sync Biometric Devices.
  3. Pick interval: Off / 5 / 15 / 30 / 60 min. Default is 60.
  4. Tick Auto-aggregate punches into attendance (recommended) โ€” so punches automatically become attendance rows.
  5. Save.

Now whenever the Staff hub is open in your Ledgr app, the timer fires every N minutes. The status pill (top-right of Staff hub) shows the latest sync result.

Status pill

While in the Staff hub:

Click the pill to expand: per-device breakdown (โœ“ matched count vs โœ— error message), aggregated rows + total new punches stats, unmapped warning banner, and a manual "Sync Now" button.

The aggregator (punches โ†’ attendance)

Raw punches need to become daily attendance rows. The aggregator runs:

How it derives status

For each (employee, date) with matched punches in the configured date range:

  1. in_time = earliest punch on that date
  2. out_time = latest punch (NULL if only one punch)
  3. hours = decimal difference between out and in
  4. status derived from your Attendance Policy:
    • Hours โ‰ฅ full_day_min_hours (default 6.0) โ†’ present
    • Hours โ‰ฅ half_day_min_hours (default 3.0) and < full โ†’ half_day
    • Single punch (no out) โ†’ present with note "Auto: missing out punch"
    • Hours < half_day_min โ†’ absent

Manual override priority

The aggregator does not overwrite attendance rows that you've manually edited (source = 'manual' or 'mixed'). If you marked an employee on-leave for a day, biometric sync respects that and skips the row. More on the manual/biometric coexistence in Staff & Payroll docs.

Attendance policy configuration

Settings โ†’ Attendance Policy controls how punches translate to status:

SettingDefaultWhat it does
Weekly off daysSunday onlyDays marked off when "Apply Default Pattern" runs on monthly grid.
2nd & 4th Saturday offOffIndian banking convention. When on, only 2nd + 4th Saturdays are off (other Saturdays are working).
Half-day minimum hours3.0โ‰ฅ this and < full โ†’ Half day. < this โ†’ Absent.
Full-day minimum hours6.0โ‰ฅ this hours โ†’ Present.
Default in/out time09:30 / 18:30Stamped on rows when manually marking present without explicit time.
Auto-sync interval60 minOff / 5 / 15 / 30 / 60.
Auto-aggregate after syncOnAutomatically run aggregator over last 7 days after each sync.

Common workflows

Daily morning check

  1. Open Staff hub. Status pill shows current state.
  2. If amber (unmapped punches): click pill โ†’ Map Users โ†’ resolve.
  3. If red: click pill โ†’ see device error โ†’ ping device IP โ†’ restart device if needed.
  4. Otherwise: nothing to do. Punches flow continuously while Ledgr is open.

End-of-month: prep payroll

  1. Click the auto-sync pill โ†’ "Sync Now" to ensure latest punches are in.
  2. Staff โ†’ Attendance โ†’ Monthly Grid โ†’ review the month.
  3. Override any anomalies (employee was on approved leave, missed punch, etc.).
  4. Save.
  5. Staff โ†’ Payroll โ†’ Create Salary Run for the month โ†’ finalize โ†’ mark paid.

New employee onboarding

  1. Enroll fingerprint/face on the device. Note the device user ID assigned (or set it manually to match employee_code).
  2. In Ledgr: Staff โ†’ Employees โ†’ New Employee โ†’ save.
  3. Staff โ†’ Biometric โ†’ Devices โ†’ Map Users โ†’ click ๐Ÿ”„ to refresh device user list.
  4. Find the new device user, pick the new employee from dropdown, save.
  5. From now on, their punches flow automatically.

Removing an employee from device + Ledgr

  1. On the device: delete the user (their fingerprint template is wiped).
  2. In Ledgr: Staff โ†’ Employees โ†’ select employee โ†’ click power icon to soft-delete.
  3. Their old punches stay in biometric_punches for historical audit. Their attendance rows are preserved.

Troubleshooting

"Connection failed: i/o timeout"

"Connection failed: invalid checksum"

"Device authentication failed"

Punches arriving with wrong timestamps

Punches stuck in "pending" status

Sync runs but no new punches found

FAQ โ€” Biometric specific

Does Ledgr need to be running 24/7 for sync to work?

Yes for auto-sync, but it's not critical. The device buffers punches in non-volatile memory (typically 100,000+ records). When you next open Ledgr, the next sync pulls everything new. So overnight downtime is fine.

Can I set up real-time push (so punches flow instantly)?

Not yet โ€” Ledgr v1.0.3 supports LAN-pull only. Real-time push (HTTP iClock / ADMS protocol) is on the roadmap. For 90% of SMB use cases, 60-min auto-pull is fast enough.

What about multi-branch โ€” devices across multiple offices?

Two options: (a) one Ledgr install per branch, each pulling from its local device. Or (b) Tailscale / WireGuard VPN between branches, then one central Ledgr install pulls from all branches via VPN-routed IPs.

Does Ledgr store fingerprint templates?

No. Ledgr only reads the punch log (user_id + timestamp + punch_type + verify_method). Fingerprint templates stay on the device. This means we don't need to handle biometric data privacy concerns โ€” Ledgr stores no biometrics.

Can I sync from a cloud-hosted device (like ZKTeco BioCloud)?

Not directly. Ledgr's LAN-pull doesn't speak the BioCloud API. Workaround: export attendance from BioCloud as CSV โ†’ import via the Monthly Attendance Grid's CSV import (long format).

What if my device uses face recognition instead of fingerprint?

Doesn't matter to Ledgr โ€” the protocol is the same. ZKTeco SpeedFace, eSSL Face, etc. all expose the same TCP 4370 protocol and same punch format. Verify method is just metadata.

Can multiple Ledgr installs sync from the same device?

Technically yes โ€” the device handles concurrent connections. But you'd get duplicate records in two separate databases. Not recommended unless you specifically want multi-install redundancy.

How do I bulk-import historical attendance from before installing Ledgr?

Export from your old system as CSV in long format (employee_code, date, status, in_time, out_time, hours, notes). Use the Import CSV button on the Monthly Attendance Grid. Ledgr validates and inserts.

Setting up biometric for the first time?

WhatsApp us โ€” we'll walk you through device IP setup, mapping, and first sync over a screen-share. Free 30-min call.

Chat on WhatsApp