Learn the product definition (object model), which can help you more accurately and flexibly call the interface to access the device.
Product definition

2.1 State property

The status attribute is the basic material model of the product, which determines the function of the product.
By issuing commands, human operations can change these status attributes;
If it is a sensor class or a product with sampling function, the environment will also change the device status attribute.
Property Options Value Description
power 1 门禁线路通
0 门禁线路断

2.2 Device command

The device supports the following commands, and can send these commands to the device through the interface.
When private (Broker, gateway, etc. in any way), the command sending method is different, but the content is the same.
System command(All products support)
Name Content Description
网络信息 {"system":"network"} View the current network information of the device: network type, signal strength, IP address, etc.
Soft reboot {"system":"restart"} Restart the device and try to maintain the current state as much as possible
Hard reboot {"system":"reboot"} Restart the device, abandon the current state
Commands of this product
Command Name Content Description
设置密码
pwd
设置一个临时密码123123 {"pwd":"{"temp":"123123","limit":60}"} 60秒内有效,超期后,设备将删除此密码。
设置一个临时密码8888 {"pwd":"{"temp":"8888"}"} 默认有效期,自下发起3600秒
设置一个永久密码123456789 {"pwd":"{"persist":"123456789"}"}
密码列表
list
临时密码列表 {"list":"temp"}
永久密码列表 {"list":"persist"}
删除密码
delete
删除一个临时密码 {"delete":"{"temp":"123123"}"}
删除一个或永久密码 {"delete":"{"persist":"123456789"}"}
清空密码
clear
清空临时密码 {"clear":"temp"}
清空永久密码 {"clear":"persist"}
先断后通
reset
2秒 {"reset":"2000"}
3秒 {"reset":"3000"}
5秒 {"reset":"5000"}
先通后断
point
2秒 {"point":"2000"}
3秒 {"point":"3000"}
5秒 {"point":"5000"}

2.2 Trigger event

When the device property status value changes because of the following two reasons:
1. Self-state changes (such as the value of a sensor changes);
2. Human operation (pressed the device button)
After the event is triggered, the platform will carry the current status parameter of the device, and report the message in real time,
The specific mechanism is described in "Section 5: Message push"
Public event(All products support)
Name Content Description
Power on {"name":"boot","state":{Current attribute value}} Device power on, cloud registration after trigger, report with the current status (the value of each function attribute)
This product event
Event Name Description
密码正确[放行] pass
密码错误[拒绝] deny
线路 relay1
按下出门开关 btn1

2.3 Configuration item

All configuration items are saved in the Flash of the device, because Flash has a write limit,
So the platform does not open the interface to modify the configuration of the device in batch, you can modify the configuration item in the console.
All configuration items have default values, such as do not understand the meaning of the configuration item, do not modify it randomly;
Modifying the configuration item can only be successfully sent and saved when the device is online, and does not require a restart of the device.
Configuration item
Configuration item Name Content Description
relay1 1 默认
0
pass_action 先断后通 reset 默认
先通后断 point
1
0
无动作 dis
pass_time 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000 默认
8秒 8000
10秒 10000
action1 先断后通 reset
先通后断 point
1
0
无动作 dis
time1 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000
sensitivity 1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
threshold_1 4 4
6 6
8 8
10 10
20 20
50 50
threshold_2 2 2
3 3
4 4
5 5
8 8
threshold_3 2 2
3 3
4 4
5 5
8 8
20 20
threshold_4 2 2
3 3
4 4
5 5
8 8
threshold_5 2 2
3 3
4 4
5 5
8 8
threshold_6 2 2
3 3
4 4
5 5
8 8
20 20
threshold_7 2 2
3 3
4 4
5 5
8 8
threshold_8 2 2
3 3
4 4
5 5
8 8
threshold_9 2 2
3 3
4 4
5 5
8 8
threshold_10 2 2
3 3
4 4
5 5
8 8
threshold_11 2 2
3 3
4 4
5 5
8 8
threshold_12 5 5
2 2
3 3
4 4
8 8
20 20
10 10

Attachment. Firmware list

The principle of firmware update is compatibility upgrade, that is, the new firmware version will retain the original functions and commands.
If the current firmware can meet the business requirements, you can not upgrade the latest version of the firmware.
Last 10
Version ID Size Release date Description
V1
p168.20260129.v1
id.1690 282.14 KB 2026-01-29 16:50:52
id.1692 282.13 KB 2026-01-29 18:27:59
id.1702 282.08 KB 2026-03-18 22:07:04
id.1719 282.08 KB 2026-04-29 16:01:49