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

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开 {"batch":"{"relay":[1,3],"power":1}"}
线路1|3关 {"batch":"{"relay":[1,3],"power":0}"}
线路2|4开 {"batch":"{"relay":[2,4],"power":1}"}
线路2|4关 {"batch":"{"relay":[2,4],"power":0}"}
先通后断
point
500毫秒,全部线路 {"point":"{"interval":500}"}
1秒,线路1|3 {"point":"{"relay":[1,3],"interval":1000}"}
2秒,线路2|4 {"point":"{"relay":[2,4],"interval":2000}"}
先断后通
reset
500毫秒,全部线路 {"reset":"{"interval":500}"}
1秒,线路1|3 {"reset":"{"relay":[1,3],"interval":1000}"}
2秒,线路2|4 {"reset":"{"relay":[2,4],"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
线路1输入 line1
线路2输入 line2
线路3输入 line3
线路4输入 line4
线路5输入 line5
状态保持 keep

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
mode1 轻触 0
长按 1
action1 状态反转 reverse
先断后通 reset
先通后断 point
禁用 disable
time1 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000
mode2 轻触 0
长按 1
action2 状态反转 reverse 默认
先断后通 reset
先通后断 point
禁用 disable
time2 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000
mode3 轻触 0
长按 1
action3 状态反转 reverse 默认
先断后通 reset
先通后断 point
禁用 disable
time3 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000
mode4 轻触 0
长按 1
action4 状态反转 reverse
先断后通 reset
先通后断 point
禁用 disable
time4 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000
mode5 轻触 0
长按 1
action5 全断 0
全通 1
禁用 disable
filter 150
200
250
300
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
V12
p48.20241120.v12
id.818 280.21 KB 2024-11-20 16:03:10
id.819 280.22 KB 2024-11-20 16:04:41
V11
p48.20241115.v11
id.801 277.09 KB 2024-11-15 18:29:46
id.802 277.09 KB 2024-11-15 18:34:07
V10
p48.20240930.v10
id.722 275.93 KB 2024-09-30 18:19:15
id.723 275.93 KB 2024-09-30 18:20:14
V9
p48.20240904.v9
id.677 273.65 KB 2024-09-04 17:26:51
id.678 273.65 KB 2024-09-04 17:27:05
V8
p48.20240725.v8
id.573 274.62 KB 2024-07-25 11:30:44
id.587 274.63 KB 2024-07-25 17:08:45
优化内存
p48.20240715.v7
id.531 273.67 KB 2024-07-15 10:50:14
增加运行模式
p48.20240623.v6
id.505 274.57 KB 2024-06-23 11:00:31
防抖优化
p48.20240509.v5
id.448 349.05 KB 2024-05-09 22:30:54
私有化支持
p48.20240504.v3
id.441 347.22 KB 2024-05-04 15:05:28
优化网络
p48.20240416.v2
id.416 346.61 KB 2024-04-16 21:08:50