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
infrared_enable 打开 1
关闭 0
infrared_target 有人 1
无人 0
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

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
Button pressed btn1
红外状态变化 infrared_detect

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
action1 状态反转 reverse
禁用 disable
led 与线路同步 rl_s 线路通时亮,线路断时灭
与线路相反 rl_r
与存在同步 ss_s
与存在相反 ss_r
长亮 1
长灭 0
闪烁 blink 每10秒,闪一次
infrared 打开 1
关闭 0
infrared_change_1 马上 0
1s 1
2s 2
3s 3
5s 5
infrared_change_0 马上 0
30s 30
1m 60
2m 120
3m 180
5m 300
10m 600
relay1 1
0
relay_change_0 打开 1
关闭 0
无动作 no
relay_change_1 打开 1
关闭 0
无动作 no

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
V4
p50.20251226.v4
id.1531 276.93 KB 2025-12-26 19:55:16
id.1539 267.54 KB 2025-12-26 20:01:12
id.1540 276.93 KB 2025-12-26 20:01:13
V3
p50.20250226.v3
id.970 280.59 KB 2025-02-26 14:41:05
V2
p50.20240806.v2
id.635 272.25 KB 2024-08-06 21:58:24
V1
p50.20240318.v1
id.382 342.39 KB 2024-03-18 16:02:17