Giter Club home page Giter Club logo

node-anviz's Introduction

node-anviz

NPM package to communicate with Anviz devices.

⚠️ Work in progress ⚠️

This is a work in progress, but it's already functional. I managed to find the random document online and I'm currently implementing the TC_B Communications Protocol (2.1) (See dev/tcb_communications_protocol2.1.pdf).

Usage

Install the module

npm install node-anviz

Call a supported method:

const anviz = require("node-anviz");
let request = new anviz.Request("<device ip>");
request.execute("getInformation1", 1).on("error", function(err) {
	console.info("ERROR", err);
}).on("complete", function(res, raw){
    console.info(res, raw);
    request.close();
});

Documentation

This is a work in progress, documentation is on it's way. At this time you may check the examples folder.

Methods status:

PLEASE NOTE: There method descriptions were taken out DIRECTLY from the protocol document (check the pdf on the dev/ folder); Do not make me questions about the descriptions, some of them are incomprehensible.

ID Method Description Command Status Name Tested On Device
1 Get Device Configuration 1 0x30 getInformation1
2 Set Device Configuration 1 0x31 setInformation1 🔴
3 Get Device Configuration 2 0x32 🔴
4 Set Device Configuration 2 0x33 🔴
5 Get Device Date/Time 0x38 🔴
6 Set Device Date/Time 0x39 🔴
7 Get Network Configuration 0x3A 🔴
8 Set Network Configuration 0x3B 🔴
9 Get Records Info 0x3C 🔴
10 Download T&A Records 0x40 downloadAttendanceRecords
11 Upload T&A Record 0x41 🔴
12 Download User's Info 0x42 🔴
13 Upload User’s Info 0x43 🔴
14 Download FP Template 0x44 🔴
15 Upload FP Template 0x45 🔴
16 Get Device ID 0x46 🔴
17 Set Device ID 0x47 🔴
18 Get Device Model code 0x48 🔴
19 Set Device Model Code 0x49 🔴
20 Get Manufacture Code 0x4A 🔴
21 Set Manufacture Code 0x4B 🔴
22 Delete Designated User Data 0x4C 🔴
23 Initialize User Profile 0x4D 🔴
24 Erase all Records/ New Records Flag 0x4E 🔴
25 Initialize System 0x4F 🔴
26 Get Timezone 0x50 🔴
27 Set Timezone 0x51 🔴
28 Get Group Info 0x52 🔴
29 Set Group Information 0x53 🔴
30 Get Alarm Setting 0x54 🔴
31 Set Alarm 0x55 🔴
32 Get Indexed Messages 0x56 🔴
33 Add Index Message 0x57 🔴
34 Get Headers of All Index MSG 0x58 🔴
35 Delete Index Message 0x59 🔴
36 Get T&A Status Parameters List 0x5A 🔴
37 Set T&A Status Parameters List 0x5B 🔴
38 Enroll Fingerprint Online 0x5C 🔴
39 Get Device Capacity Parameter 0x5D 🔴
40 Unlock Door Without Authentication 0x5E 🔴
41 Output T&A Records in Real Time 0x5F 🔴
42 Get Customized T&A Statuses 0x70 🔴
43 Set Customized T&A Statuses 0x71 🔴
44 Download User Data (Extended 0x72 🔴
45 Upload User Data(Extended 0x73 🔴
46 Get Communication Device ID 0x74 🔴
47 Modify Communication Device ID 0x75 🔴
48 Clear Admin Flag 0x3D 🔴
49 Get Time Stamp 0x3E 🔴
50 Set Time Stamp 0x3F 🔴
51 Get Random Number 0x76 🔴
52 Encrypt Device Model and Language Options with a Random Number 0x77 🔴
53 Get Specified Index Message 0x26 🔴
54 Add a Indexed Message 0x27 🔴
55 Get Headers of a Ranged Message 0x28 🔴
56 Delete a indexed Message 0x29 🔴
57 Get T&A Status Auto Switching Setting 0x20 🔴
58 Set T&A Status Auto Switching Setting 0x21 🔴
59 Get the Number of Daily Remaining Attempts of a Specified User 0x10 🔴
60 Set Daily Attempts Number of a Specified User 0x10 🔴
61 Download User Data(Extended 0x22 🔴
62 Upload User Data( Extended 0x23 🔴
63 Get Device Serial Number 0x24 🔴
64 Modify Device Serial Number 0x25 🔴
65 Get Special State 0x2F 🔴
66 Get Number of All Images 0x2A 🔴
67 Get Image Headers 0x2B 🔴
68 Get a Specified Image File 0x2C 🔴
69 Delete a Specified Image 0x2D 🔴
70 Update Firmware/Image/Voice 0x10 🔴
71 Directory Operation 0x12 🔴
72 Download Log Files 0x13 🔴
73 Get Admin Card ID/ Password 0x1C 🔴
74 Set Admin Card ID/ Password 0x1D 🔴
75 Get Daylight Saving Parameters 0x1A 🔴
76 Set Daylight Saving Parameters 0x1B 🔴
77 Get Language Options 0x18 🔴
78 Set Language Options 0x19 🔴
79 Send Feature Value/ Card ID to T&A Device 0x78 🔴
80 Get GPRS Parameters 0x16 🔴
81 Set GPRS Parameters 0x17 🔴
82 Get Device Extended Info 0x7A 🔴
83 Modify Device Extended Info 0x7B 🔴
84 Get Card Number 0x7E 🔴
85 Get Reboot Time 0x14 🔴
86 Set Reboot Time 0x15 🔴
87 Extended Commands 0x2E 🔴
88 UDP Search Device 0x02 🔴
89 UDP Set Device Parameter 0x03 🔴
90 Heartbeat Package 0x7F 🔴
91 Data Modification Alert 0x7D 🔴
92 Download Personnel Change Records 0x64 🔴
93 Download User’s Information (Extended 0x65 🔴
94 Clear Change of Personnel Records/ Flags 0x1E 🔴
95 Get Device Configuration 3 0x34 🔴
96 set Device Configuration 3 0x35 🔴
97 Connection Authentication 0x04 🔴
98 Get Device Configuration4 0x36 🔴
99 Add Department 0x61 🔴
100 Delete Department 0x62 🔴
101 Download a Specified User’s Templates/Images 0x66 🔴
102 Batch Download Users’ Images 0x67 🔴
103 Get Result of Last Authentication (Pass/Fail 0x79 🔴
104 Get Timezone Mode Status 0x68 🔴
105 Set Timezone Mode Status 0x69 🔴
106 Upload User’s images 0x6D 🔴
107 Add BT Device/User 0x6A 🔴
108 Delete Specific Address of Bluetooth Device 0x6B 🔴
109 Get Information of All Bluetooth Devices 0x6C 🔴
110 Get IEEE802.11 Network Setting 0x6E 🔴
111 Set IEEE 802.11 Network setting 0x6F 🔴
112 Get Authorization Code 0x05 🔴
113 Authorize 0x06 🔴
114 UDP Start Video 0x07 🔴
115 UDP Stop Video 0x08 🔴
116 UDP Command 0x09 🔴
117 Get Server URL 0x0A 🔴
118 Set Server URL 0x0B 🔴
119 Test User 0x0C 🔴

License

MIT

Want to contribute? Great!

I'm accepting PR's if anyone wants to jump in.

node-anviz's People

Contributors

whiteaglept avatar alopezcia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.