Skip to content

This project was created to provide an easy to use interface to interact with ZKTeco attendance recording devices. It allows querying device details, querying user details, querying attendance records, creating users, deleting users, and more.

License

Notifications You must be signed in to change notification settings

thirstyape/zkteco-attendance-api

Repository files navigation

ZKTeco Attendance API

MIT NuGet

This project was created to provide an easy to use interface to interact with ZKTeco attendance recording devices for .NET.

It allows querying device details, querying user details, querying attendance records, creating users, deleting users, and more.

Getting Started

These instuctions can be used to acquire and implement the library.

Installation

To use this library:

Usage

Basic Example

The following example provides a complete use case. This example makes use of the most basic configuration.

var clock = new ZkTeco("192.168.1.1");

if (clock.Connect())
    Console.WriteLine("Connected to ZKTeco clock at 192.168.1.1!");
else
    Console.WriteLine("Failed...");

Console.WriteLine("Name: " + clock.GetDeviceName() ?? "Uh-oh...");
Console.WriteLine("IP: " + clock.GetDeviceIp() ?? "Uh-oh...");
Console.WriteLine("Subnet: " + clock.GetDeviceSubnetMask() ?? "Uh-oh...");
Console.WriteLine("Gateway: " + clock.GetDeviceGatewayIp() ?? "Uh-oh...");
Console.WriteLine("MAC: " + clock.GetDeviceMac() ?? "Uh-oh...");
Console.WriteLine("Serial: " + clock.GetDeviceSerial() ?? "Uh-oh...");
Console.WriteLine("Firmware: " + clock.GetFirmwareVersion() ?? "Uh-oh...");
Console.WriteLine("Platform: " + clock.GetDevicePlatform() ?? "Uh-oh...");

var details = clock.GetStorageDetails();

if (details != null)
{
    Console.WriteLine("Users " + details.Users);
    Console.WriteLine("Available Users " + details.AvailableUsers);
    Console.WriteLine("Max Users " + details.MaximumUsers);

    Console.WriteLine("Records " + details.Records);
    Console.WriteLine("Available Records " + details.AvailableRecords);
    Console.WriteLine("Max Records " + details.MaximumRecords);
    
    Console.WriteLine("Fingerprints " + details.Fingers);
    Console.WriteLine("Available Fingerprints " + details.AvailableFingers);
    Console.WriteLine("Max Fingerprints " + details.MaximumFingers);
}

clock.Disconnect();

Authors

  • NF Software Inc.

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

Thank you to:

  • fananimi for the pyzk project and great examples of communications

About

This project was created to provide an easy to use interface to interact with ZKTeco attendance recording devices. It allows querying device details, querying user details, querying attendance records, creating users, deleting users, and more.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages