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
power1 1
0
power2 1
0
power3 1
0
power4 1
0
power5 1
0
power6 1
0
power7 1
0
power8 1
0
power9 1
0
power10 1
0
power11 1
0
power12 1
0
power13 1
0
power14 1
0
power15 1
0
power16 1
0
power17 1
0
power18 1
0
power19 1
0
power20 1
0
power21 1
0
power22 1
0
power23 1
0
power24 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
批量控制
batch
全开 {"batch":"{"power":1}"}
全关 {"batch":"{"power":0}"}
线路1|3|5|7开 {"batch":"{"relay":[1,3,5,7],"power":1}"}
线路1|3|5|7关 {"batch":"{"relay":[1,3,5,7],"power":0}"}
线路2|4|6|8开 {"batch":"{"relay":[2,4,6,8],"power":1}"}
线路2|4|6|8关 {"batch":"{"relay":[2,4,6,8],"power":0}"}
先通后断
point
500毫秒,全部线路 {"point":"{"interval":500}"}
1秒,线路1|3|5|7 {"point":"{"relay":[1,3,5,7],"interval":1000}"}
2秒,线路2|4|6|8 {"point":"{"relay":[2,4,6,8],"interval":2000}"}
先断后通
reset
500毫秒,全部线路 {"reset":"{"interval":500}"}
1秒,线路1|3|5|7 {"reset":"{"relay":[1,3,5,7],"interval":1000}"}
2秒,线路2|4|6|8 {"reset":"{"relay":[2,4,6,8],"interval":2000}"}

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
Press the button 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
btn1 全断 0 默认
全通 1
禁用 disable
relay1 1
0 默认
relay2 1
0 默认
relay3 1
0 默认
relay4 1
0
relay5 1
0
relay6 1
0
relay7 1
0
relay8 1
0
relay9 1
0
relay10 1
0
relay11 1
0
relay12 1
0
relay13 1
0
relay14 1
0
relay15 1
0
relay16 1
0
relay17 1
0
relay18 1
0
relay19 1
0
relay20 1
0
relay21 1
0
relay22 1
0
relay23 1
0
relay24 1
0
offline1 1
0
不理会 n
offline2 1
0
不理会 n
offline3 1
0
不理会 n
offline4 1
0
不理会 n
offline5 1
0
不理会 n
offline6 1
0
不理会 n
offline7 1
0
不理会 n
offline8 1
0
不理会 n
offline9 1
0
不理会 n
offline10 1
0
不理会 n
offline11 1
0
不理会 n
offline12 1
0
不理会 n
offline13 1
0
不理会 n
offline14 1
0
不理会 n
offline15 1
0
不理会 n
offline16 1
0
不理会 n
offline17 1
0
不理会 n
offline18 1
0
不理会 n
offline19 1
0
不理会 n
offline20 1
0
不理会 n
offline21 1
0
不理会 n
offline22 1
0
不理会 n
offline23 1
0
不理会 n
offline24 1
0
不理会 n
gap 无保护 0
间隔1秒 1
间隔2秒 2
间隔3秒 3

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
p104.20241108.v1
id.786 280.26 KB 2024-11-08 12:59:17
id.816 280.26 KB 2024-11-20 16:01:25