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
status 空闲 0
播放中 1
volume 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
voice 女声 0
男声 1
speed 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
tone 0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9

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开 {"batch":"{"relay":[2,4,6],"power":1}"}
线路2|4|6关 {"batch":"{"relay":[2,4,6],"power":0}"}
先通后断
point
500毫秒,全部线路 {"point":"{"interval":500}"}
1秒,线路1|3 {"point":"{"relay":[1,3],"interval":1000}"}
2秒,线路2 {"point":"{"relay":[2],"interval":2000}"}
先断后通
reset
500毫秒,全部线路 {"reset":"{"interval":500}"}
1秒,线路1|3 {"reset":"{"relay":[1,3],"interval":1000}"}
2秒,线路2 {"reset":"{"relay":[2],"interval":2000}"}
5秒,线路7 {"reset":"{"relay":["7"],"interval":5000}"}
语音播报
play:gbk:16
到账提醒 {"play:gbk:16":"支付宝到账200元"}
业务提醒 {"play:gbk:16":"你好,小程序上有新的业务线索:河北的刘先生要定制一款小程序,请及时处理"}
工作通知(男声) {"play:gbk:16":"[m1]小王,请你到一下张总的办公室"}
长文本 {"play:gbk:16":"今天天气非常晴朗,暖暖的太阳照在人身上真舒服。我不禁的感叹:这真是美好的一天。最长不要超过50个字符,如果超过50个,可分多条连续下发命令。"}
提示音+文字 {"play:gbk:16":"[message_3]欢迎光临"}
数字 {"play:gbk:16":"ID为[n1]888,手机号码为[n3]18500860080的客户,共消费[n2]1888元,优惠100元。"}
多音字 {"play:gbk:16":"请把空调调[=diao4]转一下角度"}
停顿 {"play:gbk:16":"你[w0]好,你好"}
喇叭铃声
ring
1 {"ring":"1"}
2 {"ring":"2"}
3 {"ring":"3"}
4 {"ring":"4"}
5 {"ring":"5"}
喇叭提示音
message
1 {"message":"1"}
2 {"message":"2"}
3 {"message":"3"}
4 {"message":"4"}
5 {"message":"5"}
喇叭警示音
alert
1 {"alert":"1"}
2 {"alert":"2"}
3 {"alert":"3"}
4 {"alert":"4"}
5 {"alert":"5"}
停止播放
stop
停止当前 {"stop":"0"}
全部停止 {"stop":"1"}

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
线路6输入 line6
线路7输入 line7
线路8输入 line8
状态保持 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
relay5 1
0
relay6 1
0
relay7 1
0
offline7 1
0
不理会 no
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 状态反转 reverse
先断后通 reset
先通后断 point
禁用 disable
time5 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000
mode6 轻触 0
长按 1
action6 状态反转 reverse
先断后通 reset
先通后断 point
禁用 disable
time6 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000
mode7 轻触 0
长按 1
action7 状态反转 reverse
先断后通 reset
先通后断 point
禁用 disable
time7 1秒 1000
2秒 2000
3秒 3000
4秒 4000
5秒 5000
mode8 轻触 0
长按 1
action8 全断 0
全通 1
禁用 disable
led 长亮 open
长灭 close
长亮|静音时灭 volume
长灭|播放时亮 play
boot_message 0
提示音1 1
提示音2 2
提示音3 3
提示音4 4
提示音5 5
online_message 0
1 1
2 2
3 3
4 4
5 5
oper_message 关闭 0
提示音1 1
提示音2 2
提示音3 3
提示音4 4
提示音5 5
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
V17
p36.20241222.v17
id.911 288.83 KB 2024-12-22 10:42:24
id.912 288.83 KB 2024-12-22 10:43:01
V16
p36.20241206.v16
id.878 285.04 KB 2024-12-06 14:39:12
id.879 285.04 KB 2024-12-06 14:39:23
V15
p36.20241120.v15
id.833 285.1 KB 2024-11-20 17:53:42
id.834 285.1 KB 2024-11-20 17:54:03
V14
p36.20241026.v14
id.767 281.07 KB 2024-10-26 18:02:44
id.768 281.07 KB 2024-10-26 18:21:34
V13
p36.20241013.v13
id.758 281.09 KB 2024-10-13 14:29:20
id.759 281.09 KB 2024-10-13 14:29:38
V12
p36.20240930.v12
id.725 281.05 KB 2024-09-30 18:36:34
id.726 281.05 KB 2024-09-30 18:44:02
V11
p36.20240904.v11
id.667 278.75 KB 2024-09-04 16:11:14
id.669 278.74 KB 2024-09-04 16:12:37
V10
p36.20240812.v10
id.640 279.75 KB 2024-08-12 09:54:24
id.642 279.74 KB 2024-08-12 09:59:57
V9
p36.20240725.v9
id.575 279.75 KB 2024-07-25 11:33:12
id.578 279.74 KB 2024-07-25 14:44:16
内存优化
p36.20240715.v8
id.528 278.95 KB 2024-07-15 10:45:55