Platform: Windows 10/11
Application type: PyQt6 desktop
application
Supported terminal family: ZKTeco devices compatible with PyZK
Device port: TCP 4370
Storage options: MySQL, REST API, or Hybrid
ZKTeco Attendance Sync connects one or more attendance terminals directly to a Windows computer over the local network. It downloads punch records, prevents duplicate storage, displays live attendance, manages terminal users, and optionally delivers attendance to a remote API.
Each enabled terminal runs in an independent background thread. A slow, disconnected, or unavailable terminal therefore does not intentionally block the other configured terminals.
The application supports three operating modes:
The application checks its offline license before opening the main window. An unlicensed or expired installation displays the activation window and its Machine ID.
An active license can be replaced before it expires:
If the installed license has expired, import the replacement from the startup activation window.
The license controls the maximum number of device configurations. The application rejects saving or starting synchronization when the configured count exceeds the licensed limit.
The application opens maximized and provides the following pages:
Closing the main window normally minimizes the application to the system tray. Use the tray menu's Exit action for a complete and safe worker shutdown.
API mode does not require the local MySQL attendance database. Every device worker detects new punches and places them in the shared API delivery queue.
Available functionality includes:
Local dashboard data, stored attendance, local export, and safe terminal cleanup are unavailable because API mode has no local attendance archive.
Local Database mode stores device, employee, raw punch, daily attendance, and synchronization information in MySQL.
Available functionality includes:
Hybrid mode combines the existing local and API paths:
Terminal punch
|
v
Local duplicate-safe insert
|
+----> Live Attendance and local reports
|
v
Real-time API queue
|
v
Remote attendance API
Only punches accepted as new by the local database are placed in the live API queue. This prevents repeated terminal downloads from generating repeated live API submissions during the same local archive workflow.
If live API delivery fails after its retry attempts, the local record remains available. In Hybrid mode, the date-range synchronization action can be used to deliver locally stored records again.
Open Device Configuration to manage terminals.
In Local or Hybrid mode, Save All also inserts or updates the terminals in the MySQL
devices table.
4370.
The Dashboard provides operational and attendance totals:
Use the device selector to display all devices together or filter the dashboard to one terminal.
The Database Configuration page accepts:
Use Test Database Connection to validate credentials. Use Initialize Database for
the first installation. The configured MySQL account must initially have permission to create the selected database.
After initialization, normal SELECT, INSERT, and UPDATE permissions are
required.
| Table | Purpose |
|---|---|
devices |
Terminal configuration and connection state |
employees |
Employee profiles separated by device |
attendance_logs |
Complete raw punch archive |
daily_attendance |
Daily attendance summary |
sync_status |
Synchronization totals, timestamps, and errors |
application_logs |
Optional database-side application log structure |
Raw punch duplicate protection uses:
device_id + employee_code + punch_time
This allows the same employee number or timestamp to exist independently on different terminals.
The Live Attendance page displays locally stored attendance records with:
Use the device selector to show records from all devices or one selected terminal. The page refreshes periodically and also refreshes when a new local punch arrives.
Available output actions:
The Employees page supports both database viewing and direct machine-user operations.
Employee information includes:
Machine operations require a specific device selection to prevent changes on the wrong terminal.
Deleting a terminal user does not remove historical attendance. In Local and Hybrid modes, the local employee profile is marked inactive.
The API Connection page supports:
Live records are sent as JSON. Authentication uses:
Authorization: Bearer <api-key>
The client also sends an Idempotency-Key header. Failed live requests are retried up to three times by
the API worker.
Example request:
{
"mode": "live",
"count": 1,
"records": [
{
"device_id": 1,
"employee_code": "1001",
"punch_time": "2026-07-22T08:30:00",
"status": 0,
"verify_mode": 1,
"work_code": ""
}
]
}
The desktop client sends attendance using POST to the configured endpoint. The base URL can be either
an API directory or the complete PHP endpoint URL.
Example endpoints:
https://attendance.example.com/api/iclock
https://attendance.example.com/api/ + /iclock
Request headers:
Accept: application/json
Content-Type: application/json
User-Agent: ZKTecoAttendanceSync/1.0
Authorization: Bearer YOUR_API_KEY
Idempotency-Key: DEVICE:EMPLOYEE:PUNCH_TIME
Authorization is omitted when no API key is configured. Idempotency-Key is generated
automatically and is limited to 240 characters by the desktop client.
Application messages are available on the Application Logs page and in the rotating log file:
Available actions include:
Common connection checks:
4370 is permitted by the firewall.Preferences include:
This is an independently developed companion utility and is not an official ZKTeco product. ZKTeco is the name of the compatible terminal family; all related trademarks belong to their respective owners.
For the cloud POS, inventory, reporting, and retail management platform, visit the RetailEase main site.
Copyright © 2026 Ali Akbar. All rights reserved.
Contact: aliakbarcse@yahoo.com
WhatsApp: +88 01837-023812