All Projects → caobo171 → node-zklib

caobo171 / node-zklib

Licence: other
This is a lightweight of node.js module to connect to biometrix attendance device for examples ZKTeco

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-zklib

pyzatt
Python lib to access ZKTeco's standalone devices
Stars: ✭ 72 (+67.44%)
Mutual labels:  zkteco, zklib
xijs
A business - oriented scene Js Library
Stars: ✭ 91 (+111.63%)
Mutual labels:  js-library
Terra
👾 JS library for simple biological simulations and cellular automata
Stars: ✭ 571 (+1227.91%)
Mutual labels:  js-library
React Trello
Pluggable components to add a kanban board to your application
Stars: ✭ 1,788 (+4058.14%)
Mutual labels:  js-library
Redash
Tiny functional programming suite for JavaScript.
Stars: ✭ 40 (-6.98%)
Mutual labels:  js-library
Link Preview Js
Parse and/or extract web links meta information: title, description, images, videos, etc. [via OpenGraph], runs on mobiles and node.
Stars: ✭ 240 (+458.14%)
Mutual labels:  js-library
Gemini Scrollbar
🌓 Custom overlay-scrollbars with native scrolling mechanism for web applications
Stars: ✭ 369 (+758.14%)
Mutual labels:  js-library
sistem absensi pegawai app
Mobile application for employee attendance data management in Balaesang District government offices. This application is built with Flutter.
Stars: ✭ 84 (+95.35%)
Mutual labels:  attendance-tracking
ChangeNumbersJs
Tiny Library for change number from a language in other language.
Stars: ✭ 14 (-67.44%)
Mutual labels:  js-library
Libapps Mirror
Mirror of the official libapps repo from https://chromium.googlesource.com/apps/libapps/
Stars: ✭ 103 (+139.53%)
Mutual labels:  js-library
Selection
✨ Selection - A simple and lightweight library to add a visual way of selecting elements, just like on your Desktop. Zero dependencies. Full mobile and scroll support.
Stars: ✭ 1,371 (+3088.37%)
Mutual labels:  js-library
Bitsharesjs
JavaScript tools for BitShares Encryption and Serialization
Stars: ✭ 88 (+104.65%)
Mutual labels:  js-library
FixLanguageTypeJs
Tiny Library for fix problem of language selection in type text.
Stars: ✭ 15 (-65.12%)
Mutual labels:  js-library
Psd Guides
📐 JS library to draw photoshop-like guides.
Stars: ✭ 22 (-48.84%)
Mutual labels:  js-library
FilterInputJs
Tiny and Powerful Library for limit an entry (text box,input) as number,string or more...
Stars: ✭ 37 (-13.95%)
Mutual labels:  js-library
Javascript Guessing Game
You know there are too many JavaScript libraries when there is a game for it 🎯
Stars: ✭ 384 (+793.02%)
Mutual labels:  js-library
Values.js
🍇 Get the tints and shades of a color
Stars: ✭ 97 (+125.58%)
Mutual labels:  js-library
Semantic Ui React
The official Semantic-UI-React integration
Stars: ✭ 12,561 (+29111.63%)
Mutual labels:  js-library
karthik558.github.io
It's just my Personal Portfolio Website, built with JAVASCRIPT | PHP | CSS | SASS | HTML ❤️
Stars: ✭ 18 (-58.14%)
Mutual labels:  js-library
biometric-attendance-sync-tool
A simple tool for syncing Biometric Attendance data with your ERPNext server
Stars: ✭ 95 (+120.93%)
Mutual labels:  zkteco

node-zklib

install

 npm install --save node-zklib
 or yarn add node-zklib
const ZKLib = require('./zklib')
const test = async () => {


    let zkInstance = new ZKLib('10.20.0.7', 4370, 10000, 4000);
    try {
        // Create socket to machine 
        await zkInstance.createSocket()


        // Get general info like logCapacity, user counts, logs count
        // It's really useful to check the status of device 
        console.log(await zkInstance.getInfo())
    } catch (e) {
        console.log(e)
        if (e.code === 'EADDRINUSE') {
        }
    }


    // Get users in machine 
    const users = await zkInstance.getUsers()
    console.log(users)


    // Get all logs in the machine 
    // Currently, there is no filter to take data, it just takes all !!
    const logs = await zkInstance.getAttendances()
    console.log(logs)


    const attendances = await zkInstance.getAttendances((percent, total)=>{
        // this callbacks take params is the percent of data downloaded and total data need to download 
    })

     // YOu can also read realtime log by getRealTimelogs function
  
    // console.log('check users', users)

    zkInstance.getRealTimeLogs((data)=>{
        // do something when some checkin 
        console.log(data)
    })



    // delete the data in machine
    // You should do this when there are too many data in the machine, this issue can slow down machine 
    zkInstance.clearAttendanceLog();
    
    // Get the device time
    const getTime = await zkInstance.getTime();
		  console.log(getTime.toString());

    // Disconnect the machine ( don't do this when you need realtime update :))) 
    await zkInstance.disconnect()

}

test()

 
    async executeCmd(command, data=''){
        return await this.functionWrapper(
            ()=> this.zklibTcp.executeCmd(command, data),
            ()=> this.zklibUdp.executeCmd(command , data)
        )
    }

    // unlock the door  
    executeCmd(CMD.CMD_UNLOCK, '')
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].