软件协议文档
终端设备协议文档
功能&协议池(所有功能协议)
MQTT协议文档
HTTP协议文档
微光TLV协议文档
微光卡&码协议
功能模块&UI文档
人脸机
VF105
门禁标品MQTT协议文档(DejaOS版本)
Access control standard MQTT protocol document
VF系列HTTP协议接口文档V1.0.28(Vbar版本)
VF系列MQTT协议文档V1.37.0(Vbar版本)
VF系列-协议模式下通讯协议文档V1.0.4(Vbar版本)
VF203
门禁标品MQTT协议文档(DejaOS版本)
Access control standard MQTT protocol document
VF系列HTTP协议接口文档V1.0.28(Vbar版本)
VF系列-协议模式下通讯协议文档V1.0.4(Vbar版本)
VF系列-MQTT协议文档V1.37.2(Vbar版本)
VF 系列 HTTP 协议接口文档-V1.37.1(Vbar版本)
VF106
门禁标品MQTT协议文档(Android版本)
Access control standard MQTT protocol document
VF114
门禁标品MQTT协议文档(DejaOS版本)
Access control standard MQTT protocol document
VF系列HTTP协议接口文档V1.0.28(Vbar版本)
VF系列-协议模式下通讯协议文档V1.0.4(Vbar版本)
VF205
门禁标品MQTT协议文档(DejaOS版本)
VF系列HTTP协议接口文档V1.0.28(Vbar版本)
VF系列-协议模式下通讯协议文档V1.0.4(Vbar版本)
读头
EE200
读头标品TLV通讯协议
Read header standard TLV communication protocol
读头标品TLV通讯协议V3.10(Vbar版本)
TX200
读头标品TLV通讯协议
Read header standard TLV communication protocol
QT960
读头标品TLV通讯协议
Read header standard TLV communication protocol
QT660
读头标品TLV通讯协议
Read header standard TLV communication protocol
Q340
读头标品TLV通讯协议
Read header standard TLV communication protocol
M300
读头标品TLV通讯协议
Read header standard TLV communication protocol
读头标品TLV通讯协议V3.10(Vbar版本)
JL7000
读头标品TLV通讯协议
Read header standard TLV communication protocol
Q350
读头标品TLV通讯协议
Read header standard TLV communication protocol
MU86
读头标品TLV通讯协议
Read header standard TLV communication protocol
读头标品TLV通讯协议V3.10(Vbar版本)
MET
读头标品TLV通讯协议
Read header standard TLV communication protocol
扫码器TCP/HTT通讯协议V1.0(Vbar版本)
读头标品TLV通讯协议V3.10(Vbar版本)
M350
读头标品TLV通讯协议
Read header standard TLV communication protocol
读头标品TLV通讯协议V3.10(Vbar版本)
扫码器TCP/HTT通讯协议V1.0(Vbar版本)
DW200
读头标品TLV通讯协议(DejaOS版本)
Read header standard TLV communication protocol
读头标品HTTP&TCP协议文档(DejaOS版本)
读头标品HTTP&TCP协议文档(Vbar版本)
读头标品TLV通讯协议V3.10(Vbar版)
读头标品RS485一拖多协议V0.7(Vbar版本)
M340
读头标品TLV通讯协议
Read header standard TLV communication protocol
CR90
刷卡模块通信协议v3.0
CR90指令文档
微光指令:0x60 蓝牙设备控制
1.7/2.x扫码器配置字段说明文档
门禁
DW200
门禁标品MQTT协议文档(DejaOS版本)
Access control standard MQTT protocol document
门禁扫码器MQTT协议文档(Vbar版本)
MU86
门禁标品MQTT协议文档
Access control standard MQTT protocol document
门禁20180820 MQTT协议文档V1.0.2(Vbar版)
Q350
门禁标品MQTT协议文档
Access control standard MQTT protocol document
门禁20180820 MQTT协议文档V1.0.2(Vbar版)
MET
门禁标品MQTT协议文档
Access control standard MQTT protocol document
门禁20180820 MQTT协议文档V1.0.2(Vbar版)
M350
门禁标品MQTT协议文档
Access control standard MQTT protocol document
门禁20180820 MQTT协议V1.0.1(Vbar版本)
门禁20180820 MQTT协议文档V1.0.2(Vbar版本)
MP86
门禁20180820 MQTT协议文档V1.0.2(Vbar版本)
控制板
CC104
控制板标品MQTT协议文档
Control board standard MQTT protocol documentation
CC101
控制板标品MQTT协议文档
Control board standard MQTT protocol documentation
CC101标品20211101MQTT协议V3.6(Vbar版本)
平台服务协议文档
网关服务接口定义
门禁应用接口定义
工具文档
多弦产品API签名安全规则
海外锁
app和后台的mqtt协议
文档
-
+
首页
Access control standard MQTT protocol document
Cloud device interface documentation ==================================== File version change log table ----------------------------- <table data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><thead data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><tr data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><th data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">Version number</font></font></font></th><th data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">What's Changed</font></font></font></th><th data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">Reviewers</font></font></font></th><th data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">Approver</font></font></font></th><th data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">remark</font></font></font></th></tr></thead><tbody data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><tr data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><td>V_3.0</td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">New</font></font></font></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td></tr><tr data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><td>V_3.1</td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">1. The start time of the key has been increased</font></font></font><br data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">2. Add the version number of the lower computer scanner to the query device</font></font></font><br data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">3. Set the device status to add the DeviceStatus field, and change the devGroup and DeviceId to numeric types</font></font></font></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td></tr><tr data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><td>V_3.2</td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">1. Query\Set device status, add the device name</font></font></font></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td></tr><tr data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><td>V_3.3</td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5" data-immersive-translate-paragraph="1"><font class="notranslate immersive-translate-target-wrapper" data-immersive-translate-translation-element-mark="1" lang="en"><br><font class="notranslate immersive-translate-target-translation-theme-none immersive-translate-target-translation-block-wrapper-theme-none immersive-translate-target-translation-block-wrapper" data-immersive-translate-translation-element-mark="1"><font class="notranslate immersive-translate-target-inner immersive-translate-target-translation-theme-none-inner" data-immersive-translate-translation-element-mark="1">1. Add the sub-device ID and DeviceId to the traffic record</font></font></font></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td></tr><tr data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"><td>V_3.4</td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td><td data-immersive-translate-walked="9c83e93e-5ba7-481e-abe3-27d68c717bc5"></td></tr></tbody></table> disclaimer ---------- Before using the device, be sure to carefully read all the contents in the cloud device interface documentation to ensure the correct, safe, and effective use. All the right to interpret and modify this manual belongs to Beijing Microlight Interconnection Technology Co., Ltd. directory --------- 1. [overview](#1-%E6%A6%82%E8%BF%B0) * [Application scenarios](#11-%E5%BA%94%E7%94%A8%E5%9C%BA%E6%99%AF) * [peculiarity](#12-%E7%89%B9%E7%82%B9) 2. [Interface documentation](#2-%E6%8E%A5%E5%8F%A3%E6%96%87%E6%A1%A3) * [illustrate](#21-%E8%AF%B4%E6%98%8E) * [List of interfaces](#22-%E6%8E%A5%E5%8F%A3%E5%88%97%E8%A1%A8) * [Heartbeat interface](#221-%E5%BF%83%E8%B7%B3%E6%8E%A5%E5%8F%A3) * [Alarm interface](#222-%E6%8A%A5%E8%AD%A6%E6%8E%A5%E5%8F%A3) * [Write tags](#223-%E5%86%99%E6%A0%87%E7%AD%BE) * [Read the label](#224-%E8%AF%BB%E6%A0%87%E7%AD%BE) * [Synchronization keys](#225-%E5%90%8C%E6%AD%A5%E7%A7%98%E9%92%A5) * [Synchronization whitelist (100 items)](#226-%E5%90%8C%E6%AD%A5%E7%99%BD%E5%90%8D%E5%8D%95100%E6%9D%A1) * [Query the whitelist](#227-%E6%9F%A5%E8%AF%A2%E7%99%BD%E5%90%8D%E5%8D%95) * [Report traffic records](#228-%E4%B8%8A%E6%8A%A5%E9%80%9A%E8%A1%8C%E8%AE%B0%E5%BD%95) * [Online verification](#229-%E5%9C%A8%E7%BA%BF%E9%AA%8C%E8%AF%81) * [Control the device](#2210-%E6%8E%A7%E5%88%B6%E8%AE%BE%E5%A4%87) * [Query the device status](#2211-%E6%9F%A5%E8%AF%A2%E8%AE%BE%E5%A4%87%E7%8A%B6%E6%80%81) * [Set the device status](#2212-%E8%AE%BE%E7%BD%AE%E8%AE%BE%E5%A4%87%E7%8A%B6%E6%80%81) * [Synchronize the clock](#2213-%E5%90%8C%E6%AD%A5%E6%97%B6%E9%92%9F) * [Update the firmware](#2214-%E6%9B%B4%E6%96%B0%E5%9B%BA%E4%BB%B6) * [Query device logs](#2215-%E6%9F%A5%E8%AF%A2%E8%AE%BE%E5%A4%87%E6%97%A5%E5%BF%97) 1\. Overview ------------ Interface Overview: This document provides a set of APIs for direct access to the device, which is used to push and obtain device information, and users can directly customize and develop a complete set of access control or related application systems according to the interface instructions after purchasing the device. The interface uses the MQTT communication protocol, which can be connected to various general MQTT brokers, and can also use the MQTT brokers recommended by us. ### 1.1 Application Scenarios Application scenario: When you need to connect to your own business system, you can use the interface to directly communicate with the device through the MQTT protocol. ### 1.2 Features The interface is simple, the function is comprehensive, and it is suitable for most of the application scenarios of access control. 2\. Interface documentation --------------------------- ### 2.1 Description The interface uses the MQTT protocol and is divided into uplink and downlink. Uplink: Sends messages to the background or apps on the device. Downlink: Messages are delivered to the device by the background or application. The MQTT broker is used in the middle of the communication, and the message contains the message topic and message content in the following format: 1. Message topic The header of the message, regardless of whether it is upstream or downlink, the rules for sending instructions and returning instructions are "instructions" and "instructions \_reply". The format is as follows: * Downside: `20211101/cmd/{#DeviceAddr}/xxxx` Corresponding return command (uplink): `20211101/cmd/xxxx_reply` * Uplink: `20211101/event/yyyy` Corresponding return command (downlink): `20211101/event/{#DeviceAddr}/yyyy_reply` Note: `20211101` is a specific identifier of the interface version, `cmd` means that the background or application actively sends commands to the device, and `event` means that the device actively sends messages or triggers events to the background or application. 2. The content of the message The message content is in text format, and the content is in Json format * Send a message The format of the sending command is fixed, including `SerianNo`, `DeviceAddr`, and `Data`, for example: { "SerialNo" : "6w8keif5g6", //消息序列号,10位字符串,包含的小写字母和数字,必需的, "DeviceAddr" : "xxxxxxxx", //设备地址,设备的唯一地址用于通讯时保证设备是有效的设备 "Data" : //不同的指令对应的Data内容不一样,可以是任何类型,不是必填 } * Return the message The return message format always includes `SerianNo`, `DeviceAddr`, `Result`, `Message`, and `Data`, for example: { "SerialNo" : "6w8keif5g6", //消息序列号,10位字符串,包含的小写字母和数字,必需的,用于通讯时确保同步 "DeviceAddr" : "xxxxxxxx", //设备地址,设备的唯一地址用于通讯时保证设备是有效的设备 "Result" : 0, //0表示成功,非0表示失败 "Message" : "出错的原因信息或成功的提示信息", //不是必填 "Data" : //不同的指令对应的Data内容不一样,可以是任何类型,不是必填 } ### 2.2 List of interfaces #### 2.2.1 Heartbeat interface * device to background or app Message topic: `20211101/event/heartbeat` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "DeviceStatus" : 1, //0-未激活,1-正常,2-禁用 "DeviceTime" : 1596277728 //设备时间,时间戳(秒) } } * Feedback to the device in the background or app Message topic: `20211101/event/{#DeviceAddr}/heartbeat_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.2 Alarm interface * device to background or app Message topic: `20211101/event/alarm` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "AlarmType" : 1, //报警类型,1:异常开门报警。2:火警,3:开门超时 "DeviceTime" : 1596277728 //设备时间,时间戳(秒) } } * Feedback to the device in the background or app Message topic: `20211101/event/{#DeviceAddr}/alarm_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.3 Write tags * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/tagwrite` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "tag0" :"标签1的值", "tag1" :"标签2的值", "tag2" :"标签3的值", "tag3" :"标签4的值", "tag4" :"标签5的值", "tag5" :"标签6的值", "tag6" :"标签7的值", "tag7" :"标签8的值", "tag8" :"标签9的值", "tag9" :"标签10的值" } } * Device feedback to the background or apps Message topic: `20211101/cmd/tagwrite_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.4 Read the label * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/tagread` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx" //设备地址 } * Device feedback to the background or apps Message topic: `20211101/cmd/tagread_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "", //原因(可选) "Data": { "tag0" :"标签1的值", "tag1" :"标签2的值", "tag2" :"标签3的值", "tag3" :"标签4的值", "tag4" :"标签5的值", "tag5" :"标签6的值", "tag6" :"标签7的值", "tag7" :"标签8的值", "tag8" :"标签9的值", "tag9" :"标签10的值" } } #### 2.2.5 Synchronization Keys * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/secretsync` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "SyncFlag" : 1, //同步标识,1-全量,2-增量 "SecretKeys" :[ //密钥数组 { "SecretKeyType" : "xxxx", //密钥类型,如RSA, AES等 "SecretKeyCode" : "xxxx", //密钥编码,对应密钥编码,如vguang "SecretKeyValue" : "xxxx", //密钥值 "SecretKeyStartTime" : 1566277728, //密钥开始时间,时间戳(秒) "SecretKeyExpirytime" : 1596277728, //密钥过期时间,时间戳(秒) "SyncType" : 1 //同步类型,当SyncFlag=2时有效,1-增加,2-修改,3-删除 }, ... ] } } * Device feedback to the background or apps Message topic: `20211101/cmd/secretsync_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.6 Synchronization whitelist (100 items) * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/whitelistsync` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "SyncFlag" : 1, //同步标识,1-全量,2-增量 "WhiteLists" :[ //白名单数组 { "IdentityType" : 101, //身份类型 "IdentityCode" : "xxxxxxxx", //身份标识 "OrgId" : 100, //组织编号,删除白名单时校验 "BeginTime" : 1596277728, //开始时间,时间戳(秒) "EndTime" : 1596277728, //结束时间,时间戳(秒) "Times" : 0, //次数(数字),0-不限,>0,限制次数 "SyncType" : 1 //同步类型,当SyncFlag=2时有效,1-增加,2-修改,3-删除 }, ... ] } } * Device feedback to the background or apps Message topic: `20211101/cmd/whitelistsync_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } Note: Identity type, 101-ordinary QR code, 102-microlight access control dynamic code 1, starting with &mj, 103-microlight access control dynamic code 2, starting with vg://v103, 104-microlight access dynamic code 3, starting with vg://v104, 201-Mifare\_UltraLight card, 202-Mifare\_One (S50) card, 203-Mifare\_One (S70) card, 204-Mifare\_ Pro(X) card, 205-Mifare\_DESFire card, 206-ID card, 238-other card, 505-emergency code, QR code starting with &em. Customers can choose 101, 102, 103, or customized special symbology (custom code type 4XX) according to their own situation. Message: the reason for the failure 0: Success \-1: JSON string error \-2: Insufficient disk space \-3: Failed to start a transaction in the database \-4: Failed to clear the database \-5: Failed to save \-6: Failed to modify \-7: Failed to delete \-8: Error writing to the database #### 2.2.7 Query the whitelist * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/whitelistquery` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "IdentityType" : 101, //身份类型,可选,如果有则只查询此类 "IdentityCode" : "xxxxxxxx", //身份标识,可选,如果有则只查询此身份标识对应的 "OrgId" : 100, //组织编号,可选,如果有则只查询此类 "BeginTime" : 1596277728, //开始时间,时间戳(秒),可选,如果有则只查询此时间后的 "EndTime" : 1596277728, //结束时间,时间戳(秒),可选,如果有则只查询此时间前的 "PageSize" : 50, //查询每页记录条数(最大100) "CurrentPage" : 1 //查询当前页数,从第0页开始 } } * Device feedback to the background or apps Message topic: `20211101/cmd/whitelistquery_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "", //原因(可选) "Data": { "PageSize" : 50, //查询结果每页记录条数 "CurrentPage" : 50, //查询结果当前页数 "PageCount" : 3, //查询结果总页数 "Total" : 150, //查询结果记录总条数 "WhiteLists" :[ { //白名单数组 "IdentityType" : 101, //身份类型,505:应急码 "IdentityCode" : "xxxxxxxx", //身份标识 "OrgId" : 100, //组织编号 "BeginTime" : 1596277728, //开始时间,时间戳(秒) "EndTime" : 1596277728, //结束时间,时间戳(秒) "Times" : 0 //次数(数字),0-不限,>0,限制次数 }, ... ] } } #### 2.2.8 Report traffic records * device to background or app Message topic: `20211101/event/reportrecord` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": [ { "IdentityType" : 101, //身份类型 "IdentityCode" : "xxxxxxxx", //身份标识 "OriginalCode" : "xxxxxxxx", //原始数据 "PassTime" : 1596277728, //通行时间,时间戳(秒) "DeviceId" : "001-A", //设备标识 "Result" : 0, //通行验证结果,=0-成功 <0失败 "Message": "xxx" //1表示常开状态,2表示常闭状态,扫描没通过 }, ... ] } * Feedback to the device in the background or app Message topic: `20211101/event/{#DeviceAddr}/reportrecord_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.9 Online Verification * device to background or app Message topic: `20211101/event/onlinecheck` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "IdentityType" : 101, //身份类型 "IdentityCode" : "xxxxxxxx", //身份标识 "OriginalCode" : "xxxxxxxx", //原始数据 "PassTime" : 1596277728 //通行时间,时间戳(秒) } } * Feedback to the device in the background or app Message topic: `20211101/event/{#DeviceAddr}/onlinecheck_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.10 Control Equipment * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/controldevice` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "HintType" : 1 //控制类型,1-开门, 100-重启 } } * Device feedback to the background or apps Message topic: `20211101/cmd/controldevice_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.11 Query the device status * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/getstatus` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx" //设备地址 } * Device feedback to the background or apps Message topic: `20211101/cmd/getstatus_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "", //原因(可选) "Data": { "DeviceName" :"001-A", //设备名称 "DeviceMode" : "xxxxxxxx", //设备型号 "Scanner1Ver" : "xxxxxxxx", //设备型号 "Scanner2Ver" : "xxxxxxxx", //设备型号 "DeviceNetType" : 1, //设备网络类型,1-WIFI "DeviceVer" : "xxxxxxxx", //设备版本 "OpenMode" :0, //设备开门模式,0-正常,1-常开模式,2-常闭模式 "OpenTime" : 5, //开门时长,单位秒 "HeartbeatInterval" : 60, //心跳间隔,小于等于0,表示关闭心跳 "TimeSyncInterval" : 43200, //主动时钟更新间隔时间,单位秒,缺省43200秒(12小时),如果小于等于0,表示不主动更新 "DeviceStatus" : 1, //0-未激活,1-正常,2-禁用 "DeviceTime" : 1596277728, //设备时间,时间戳(秒) "DeviceSpace" : 1000000 ,//设备剩余空间(单位字节) "DeviceWhitelistCount" : 5000 ,//白名单总数量 "DevicePassRecordCount" : 5000 ,//未上传通行记录总数 "ScanInterval" : 1000, //扫码间隔单位毫秒(ms) "RecordUploadStrategy" : 0, //0:通行优先, 1:上传优先 "CheckMode" : 0, //0:只离线验证,1:先离线验证失败后走在线验证 "FaultTolerantTimeInterval" : 5, //容错时间间隔小时(h)为0时表示禁用动态调整,如每隔5h时间容错增加1秒 "MaxFaultTolerantTime" :60, //最大容错时间秒(s),如当容错时间达到60s时停止增加 "AnalogCard" :1, //1:屏蔽手机模拟卡, 0:不屏蔽手机模拟卡 "DevGroup" : 123, //设备分组用于应急码组校验 "DeviceId" :123, //设备ID用于应急码设备ID校验 "EmKey" : "078571e7c65de78e818ff3083a4814e2", //应急码秘钥 "MotorKeepTime" :0, //持续工作时间(毫秒) "BlockNum" :0, //读取的块 "BlockKey" :"", //扇区秘钥 "BlockKeyType" : 96 //扇区秘钥类型 } } #### 2.2.12 Set the device status * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/setstatus` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "DeviceName" :"001-A", //设备名称 "DeviceStatus" : 1, //0-未激活,1-正常,2-禁用 "OpenMode" :0, //设备开门模式,0-正常,1-常开模式,2-常闭模式,3-任意码(卡)开门 "OpenTime" : 1000, //开门时长,单位毫秒 "OpenTimeout" : 30, //开门超时时长,单位秒 "HeartbeatInterval" : 60, //心跳间隔,小于等于0,表示关闭心跳 "TimeSyncInterval" : 43200, //主动时钟更新间隔时间,单位秒,缺省43200秒(12小时),如果小于等于0,表示不主动更新 "ScanInterval" : 1000, //扫码间隔单位毫秒(ms) "RecordUploadStrategy" : 0, //0:通行优先, 1:上传优先 "CheckMode" : 0, //0:只离线验证1:先离线验证失败后走在线验证 "FaultTolerantTimeInterval" : 5, //容错时间间隔小时(h)为0时表示禁用动态调整,如每隔5h时间容错增加1秒 "MaxFaultTolerantTime" :60, //最大容错时间秒(s),如当容错时间达到60s时停止增加 "AnalogCard" :1, //1:屏蔽手机模拟卡, 0:不屏蔽手机模拟卡 "DevGroup" : 123, //设备分组用于应急码组校验 "DeviceId" : 123, //设备ID用于应急码设备ID校验 "EmKey" : "078571e7c65de78e818ff3083a4814e2", //应急码秘钥 "MotorKeepTime" :0, //持续工作时间(毫秒) "BlockNum" :0, //读取的块 "BlockKey" :"FFFFFFFFFFFF", //扇区秘钥 "BlockKeyType" : 96 //扇区秘钥类型 } } * Device feedback to the background or apps Message topic: `20211101/cmd/setstatus_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.13 Synchronize Clocks * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/timesync` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "DeviceTime" : 1596277728 //设备时间,时间戳(秒) } } * Device feedback to the background or apps Message topic: `20211101/cmd/timesync_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.14 Update Firmware * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/updatefirmware` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Data": { "FirmwareType" : 1, //固件类型,1:控制板,2:下位机1(扫码器),3:下位机2(扫码器) "FirmwareUrl" : "http://xxx.xxx.xxx/", //固件文件下载地址 "FirmwareMd5" : "xxxxxxxxxx" //固件文件MD5值 } } * Device feedback to the background or apps Message topic: `20211101/cmd/updatefirmware_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "" //原因(可选) } #### 2.2.15 Query device logs * Background or app to device Message topic: `20211101/cmd/{#DeviceAddr}/extractlog` Message content: { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx" //设备地址 } * Device feedback to the background or apps Message topic: `20211101/cmd/extractlog_reply` { "SerialNo" : "6w8keif5g6", //消息序列号 "DeviceAddr" : "xxxxxxxx", //设备地址 "Result": 0, //执行结果,0-成功,非0失败 "Message": "", //原因(可选) "Data": "Feb 5 09:16:58 vbar: verify_analysis_nfc_offline_check()|82| ERR: nfc offline check failed, identityType: 204, identityCode: cdb332be\n" }
马志祥
2025年2月23日 17:16
15
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
Markdown文件
Word文件
PDF文档
PDF文档(打印)
分享
链接
类型
密码
更新密码
有效期