远程设置LED亮度、色温、开关速度
统一指令:controller-event
远程控制设备的亮度、色温、开关速度,指令执行后,设备立即切换LED状态。
向设备发送指令 服务端向设备订阅topic发送消息
{
"Brightness" : 80,
"ColorTemperature" : 0,
"key" : 1,
"Speed" : 2000,
"type" : "event"
}
设备返回信息 设备向服务端订阅topic上报消息
{
"Brightness" : 80,
"bssid" : "a0c5f2b73086",
"code" : "GSLM2B",
"ColorTemperature" : 0,
"commandName" : "controller-event",
"frequency" : 1000,
"ip" : "10.168.1.202",
"key" : 1,
"keyLock" : 0,
"mac" : "78e36d1decd4",
"onState" : 2,
"signal" : -22,
"source" : "command",
"Speed" : 2000,
"ssid" : "duchaoqun",
"version" : "2.0.2",
"wifiLock" : 0
}
获取设备基础信息
统一指令:info-all
查询当前设备的基础信息,如设备MAC地址、设备型号、固件版本号、当前连接的WiFi名称(ssid)、当前设备被分配的IP地址、WiFi信号强度及相关配置信息。
向设备发送指令 服务端向设备订阅topic发送消息
{
"messageId" : "$messageId",
"type" : "info"
}
设备返回信息 设备向服务端订阅topic上报消息
{
"Brightness" : 100,
"bssid" : "a2b5f2cfecc2",
"code" : "GSLM2B",
"ColorTemperature" : 0,
"commandName" : "info-all",
"frequency" : 10000,
"ip" : "192.168.3.237",
"key" : 1,
"keyLock" : 0,
"mac" : "34865d8520c4",
"messageId" : "$messageId",
"onState" : 2,
"signal" : -20,
"source" : "command",
"Speed" : 1000,
"ssid" : "gemeopen",
"version" : "2.0.2",
"wifiLock" : 0
}