协议分为两部分: header 以及 payload
示例:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"TurnOn",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"powerstate",
"value":"on",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
参数名 | 参数类型 | 参数说明 | 是否必传 |
---|---|---|---|
namespace | String | 消息命名空间,详见1.2 | 是 |
name | String | 详见1.3 | 是 |
payLoadVersion | int | payload 的版本,目前版本为 1 | 是 |
messageId | String | 用于跟踪请求 | 是 |
namespace | 解释说明 |
---|---|
AliGenie.Iot.Device.Discovery | 设备发现 |
AliGenie.Iot.Device.Control | 设备控制 |
AliGenie.Iot.Device.Query | 设备属性查询 |
1.3.1 设备发现类(与AliGenie.Iot.Device.Discovery对应)
name | 解释说明 |
---|---|
DiscoveryDevices | 设备发现(获取设备列表) |
1.3.2 操作类(与AliGenie.Iot.Device.Control对应)
name | 解释说明 |
---|---|
TurnOn | 打开 |
TurnOff | 关闭 |
SelectChannel | 频道切换 |
AdjustUpChannel | 频道增加 |
AdjustDownChannel | 频道减少 |
AdjustUpVolume | 声音按照步长调大 |
AdjustDownVolume | 声音按照步长调小 |
SetVolume | 声音调到某个值 |
SetMute | 设置静音 |
CancelMute | 取消静音 |
Play | 播放 |
Pause | 暂停 |
Continue | 继续 |
Next | 下一首或下一台 |
Previous | 上一首或下一台 |
SetBrightness | 设置亮度 |
AdjustUpBrightness | 调大亮度 |
AdjustDownBrightness | 调小亮度 |
SetTemperature | 设置温度 |
AdjustUpTemperature | 调高温度 |
AdjustDownTemperature | 调低温度 |
SetWindSpeed | 设置风速 |
AdjustUpWindSpeed | 调大风速 |
AdjustDownWindSpeed | 调小风速 |
SetMode | 模式的切换 |
SetColor | 设置颜色 |
OpenFunction | 打开功能 |
CloseFunction | 关闭功能 |
1.3.3 查询类(与AliGenie.Iot.Device.Query对应)
支持的查询属性方法 | 操作方法说明 | 返回值说明 |
---|---|---|
Query | 查询所有标准属性 | 详情见各个属性 |
QueryColor | 查询颜色 | Red、Yellow、Blue、White、Black等值(AliGenie以这些值为准,厂家适配) |
QueryPowerState | 查询电源开关 | on(打开)、off(关闭) |
QueryTemperature | 查询温度 | 返回数值(AliGenie默认的单位为摄氏度,厂家适配该单位) |
QueryHumidity | 查询湿度 | 返回数值 |
QueryWindSpeed | 查询风速 | 返回值参考风速控制中的风速值对应表章节 2.2.8.1 |
QueryBrightness | 查询亮度 | 返回数值 |
QueryFog | 查询雾量 | 返回数值 |
QueryMode | 查询模式 | 返回值枚举参考例子模式切换中的例子 |
QueryPM25 | 查询pm2.5 含量 | 返回数值 |
QueryDirection | 查询方向 | 返回 left,right,forward,back,up,down |
QueryAngle | 查询角度 | 返回数值,单位度 |
payload根据namespace不同分为Discovery、Control、Query三类,详见章节二。
设备发现请求:
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Discovery",
"name":"DiscoveryDevices",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token"
}
}
|
设备发现响应:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Discovery",
"name":"DiscoveryDevicesResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"devices":[{
"deviceId":"34ea34cf2e63",
"deviceName":"light1",
"deviceType":"light",
"zone":"",
"brand":"",
"model":"",
"properties":[{
"name":"color",
"value":"Red"
}],
"actions":[
"TurnOn",
"TurnOff",
"SetBrightness",
"AdjustBrightness",
"SetTemperature",
"Query" // 查询的也请返回
],
"extensions":{
"extension1":"",
"extension2":""
}
}]
}
}
|
payload 协议参数说明:
参数名 | 参数类型 | 参数说明 | 返回值是否允许为空 |
---|---|---|---|
deviceId | String | 设备Id | 否 |
deviceType | String | 设备类型 | 否 |
deviceName | String | 名称 | 否 |
brand | String | 品牌 | 否 |
model | String | 型号 | 否 |
zone | String | 位置 | 可选 |
icon | String | 产品icon(https协议的url链接),像素最好160*160 以免在app显示模糊 | 否 |
properties | JSON List | 返回当前设备支持的属性状态列表,产品支持的属性列表参考2.3.2章节 | 否 |
actions | List | 产品支持的操作(注:包括支持的查询操作) ,详情参照1.3.2和1.3.3章节 | 否 |
extensions | Object | 产品扩展属性,为空返回null或者不返回该字段 | 可选 |
注:
1.设备名称的取值可参考接口: https://open.bot.tmall.com/oauth/api/aliaslist(key 为品类,value为该品类的别名取值枚举)
2.位置取值可参考接口: https://open.bot.tmall.com/oauth/api/placelist
3.设备支持的actions 需要按照设备的实际情况将支持的操作返回,我们会根据Actions的返回进行控制请求过滤,请开发商务必返回实际的操作actions
2.2.1.1 设备打开
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"TurnOn",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"powerstate",
"value":"on",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应:
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"TurnOnResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
异常响应:
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"ErrorResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234",
"errorCode":"DEVICE_NOT_SUPPORT_FUNTION",
"message":"device not support"
}
}
|
2.2.1.2 关闭设备
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"TurnOff",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"powerstate",
"value":"off",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"TurnOffResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.2.1 按照频道名称切换
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SelectChannel",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceType":"XXX",
"deviceId":"34234",
"attribute":"channel",
"value":"浙江卫视",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SelectChannelResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
异常响应:
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"ErrorResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234",
"errorCode":"DEVICE_NOT_SUPPORT_FUNTION",
"message":"device not support"
}
}
|
2.2.2.2 按照频道号切台
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SelectChannel",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceType":"XXX",
"deviceId":"34234",
"attribute":"number",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SelectChannelResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.3.1 按照步长控制音量(加大或减少,默认步长为1)
调大声音
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpVolume",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"volumeStep",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpVolumeResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
调小声音
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownVolume",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"volumeStep",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownVolumeResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.3.2 直接设置音量达到指定值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetVolume",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"volume",
"value":"20",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetVolumeResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.3.3 声音设置成最值(最大、最小)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetVolume",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"volume",
"value":"max",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetVolumeResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
最值 | 说明 |
---|---|
max | 对应最大值 |
min | 对应最小值 |
2.2.3.4 静音设置
1
2
3
4
5
6
7
8
9
10
11
12
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetMute",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234"
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetMuteResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.3.5 取消静音设置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"CancelMute",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"CancelMuteResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.4.1 播放
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"Play",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"PlayResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.4.2 暂停
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"Pause",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"PauseResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.4.3 继续播放
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"Continue",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"ContinueResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.4.4 下一首或者下一台
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"Next",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"NextResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.4.5 上一首或者上一台
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"Previous",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"PreviousResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.4.6 快进播放
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"FastForward",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"forward",
"value":"30", // 快进到多少分钟
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"FastForwardResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.5.1 亮度设置指定值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetBrightness",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"brightness",
"value":"30",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetBrightnessResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.5.2 亮度调成最值(最大、最小)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetBrightness",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"brightness",
"value":"max",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
最值 | 说明 |
---|---|
max | 对应最大值 |
min | 对应最小值 |
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetBrightnessResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.5.3 步长设置亮度(默认步长 10)
调亮
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpBrightness",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"brightnessStep",
"value":"10",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpBrightnessResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
调暗
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownBrightness",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"brightnessStep",
"value":"10",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownBrightnessResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.6.1 温度设置指定值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetTemperature",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"temperature",
"value":"27",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetTemperatureResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.6.2 温度设置最值(最大、最小)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetTemperature",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"temperature",
"value":"max",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetTemperatureResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
最值 | 说明 |
---|---|
max | 对应最大值 |
min | 对应最小值 |
2.2.6.3 步长设置温度(默认步长为1)
调高温度
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpTemperature",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"temperatureStep",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpTemperatureResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
调低温度
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownTemperature",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"temperatureStep",
"value":"10",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownTemperatureResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.7.1 湿度设置指定值
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetHumidity",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"humidity",
"value":"27",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetHumidityResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.7.2 湿度设置最值(最大、最小)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetHumidity",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"humidity",
"value":"max",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetHumidityResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
最值 | 说明 |
---|---|
max | 对应最大值 |
min | 对应最小值 |
2.2.7.2 湿度调整(按照默认步长 1 调整)
湿度增加
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpHumidity",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"humidityStep",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpHumidityResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
湿度减少
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownHumidity",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"humidityStep",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownHumidityResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.8.1 风速的控制
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetWindSpeed",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"windspeed",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
风扇类的风速对应值
风速值 | 说明 |
---|---|
1 | 对应风速 1档 |
2 | 对应风速 2档 |
3 | 对应风速 3档 |
4 | 对应风速 4档 |
空调类的风速对应值
风速值 | 说明 |
---|---|
auto | 自动风 |
low | 低风 |
medium | 中风 |
high | 高风 |
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetWindSpeedResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.8.2 风速设置最值(最大、最小)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetWindSpeed",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"windspeed",
"value":"max",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
最值 | 说明 |
---|---|
max | 对应最大值 |
min | 对应最小值 |
2.2.8.3 风速的步长调整(默认步长为1)
调大风速
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpWindSpeed",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"windspeedStep",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustUpWindSpeedResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
调小风速
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownWindSpeed",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"windspeedStep",
"value":"1",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"AdjustDownWindSpeedResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.9.1 开启摆风
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"OpenSwing",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"OpenSwingResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.9.2 关闭摆风
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"CloseSwing",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
2.2.9.3 按照角度摆风
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"XXX",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"angle",
"value":"30", // 度为单位
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
按照角度的摆风name 列表取值以及属性如下:
name名称 | 参数说明 | 属性 | 属性值枚举 |
---|---|---|---|
OpenUpAndDownSwing | 开启上下X度摆动 | angle | 30,60(默认60 度) , 90 |
OpenUpSwing | 开启向上X度摆动 | angle | 30,60(默认60 度) , 90 |
OpenDownSwing | 开启向下X度摆动 | angle | 30,60(默认60 度) , 90 |
OpenLeftAndRightSwing | 开启左右X度摆动 | angle | 30,60(默认60 度) , 90 |
OpenLeftSwing | 开启向左X度摆动 | angle | 30,60(默认60 度) , 90 |
OpenRightSwing | 开启向右X度摆动 | angle | 30,60(默认60 度) , 90 |
OpenForwardAndBackSwing | 开启前后X度摆动 | angle | 30,60(默认60 度) , 90 |
OpenForwardSwing | 开启向前X度摆动 | angle | 30,60(默认60 度) , 90 |
OpenBackSwing | 开启向后X度摆动 | angle | 30,60(默认60 度) , 90 |
2.2.10.1 模式的设置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetMode",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token"
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"mode",
"value":"auto",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
mode取值表
模式名称 | 参数说明 |
---|---|
auto | 自动模式 |
cold | 制冷模式 |
heat | 制热模式 |
ventilate | 通风模式 |
airsupply | 送风模式 |
dehumidification | 除湿模式 |
reading | 阅读模式 |
movie | 影院模式 |
sleep | 睡眠模式 |
live | 生活模式 |
manual | 手动模式 |
silent | 静音模式 |
energy | 省电模式 |
normalWind | 正常风模式 |
natureWind | 自然风模式 |
sleepWind | 睡眠风模式 |
quietWind | 静音风模式 |
comfortableWind | 舒适风模式 |
babyWind | 宝宝风模式 |
cottons | 棉织物模式 |
synthetics | 化纤模式 |
wool | 羊毛模式 |
hygiene | 除菌模式 |
drumClean | 筒清洁模式 |
silk | 丝绸模式 |
holiday | 假日模式 |
smart | 智能模式 |
music | 音乐模式 |
zeroGravity | 零重力模式 |
snoreStop | 止鼾模式 |
diffuse | 多人模式 |
swing | 摇摆模式 |
power | 强效模式 |
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetModeResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetColor",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"color",
"value":"Red",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"SetColorResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
颜色对应表参考章节 2.3.2
2.2.12.1 打开XX功能
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"OpenFunction",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"function",
"value":"XXX", // 功能值如下功能属性值表所示
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"OpenFunctionResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
2.2.12.2 关闭XX功能
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"CloseFunction",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"attribute":"function",
"value":"XXX", // 功能值如下功能属性值表所示
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Control",
"name":"CloseFunctionResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
功能属性表:
属性 | 说明 |
---|---|
anion | 负离子功能 |
effluent | 出水功能 |
oneButtonStart | 一键启动功能 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Query",
"name":"Query",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token",
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{
"properties":[
{
"name":"powerstate", // 电源状态
"value":"on"
},
{
"name":"color",
"value":"Red"
},
{
"name":"temperature",
"value":"27" //标准单位 摄氏度
},{
"name":"humidity",
"value":"20"
},{
"name":"windspeed",
"value":"2" // 1对应 1档, 2对应2档, 3 对应 3档
},{
"name":"humidity",
"value":"23"
},{
"name":"pm2.5",
"value":"20"
} ,{
"name":"direction", // 摆向方向
"value":"left"
} ,{
"name":"angle", // 角度
"value":"60"
}
],
"header":{
"namespace":"AliGenie.Iot.Device.Query",
"name":"QueryResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
注: Query 请求电源状态(powerstate)必须返回,其他属性的返回与否视设备自身情况而定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"header":{
"namespace":"AliGenie.Iot.Device.Query",
"name":"QueryTemperature",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"accessToken":"access token"
"deviceId":"34234",
"deviceType":"XXX",
"extensions":{
"extension1":"",
"extension2":""
}
}
}
|
正常响应
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{
"properties":[
{
"name":"temperature",
"value":"27"
}
],
"header":{
"namespace":"AliGenie.Iot.Device.Query",
"name":"QueryTemperatureResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234"
}
}
|
目前支持的查询属性如下:
属性 | 说明 | 属性值参考 | AliGenie 所支持的对应单位 |
---|---|---|---|
powerstate | 电源状态 | on(打开),off(关闭) | 无 |
color | 颜色 | 参考颜色对应表 | 无 |
temperature | 温度 | 数值 | 摄氏度 |
windspeed | 风速 | 数值 | 档 |
brightness | 亮度 | 数值 | 无 |
fog | 雾量 | 数值 | 无 |
humidity | 湿度 | 数值 | 无 |
pm2.5 | pm2.5 | 数值 | 无 |
channel | 电视频道 | 标准的频道名称 | 无 |
number | 电视频道号 | 数值 | 无 |
direction | 方向 | 取值left,right,forward,back,up,down | 无 |
angle | 角度 | 数值 | 度 |
anion | 负离子功能 | on(打开),off(关闭) | 无 |
effluent | 出水功能 | on(打开),off(关闭) | 无 |
mode | 模式 | 参考mode 设置中的mode取值表 | 无 |
lefttime | 剩余时间 | 数值 | 无 |
remotestatus | 设备远程状态 | on(打开),off(关闭) | 无 |
支持控制的颜色对应表
AliGenie支持控制的颜色 | 对应中文描述 |
---|---|
Red | 红色 |
Yellow | 黄色 |
Blue | 蓝色 |
Green | 绿色 |
White | 白色 |
Black | 黑色 |
Cyan | 青色 |
Purple | 紫色 |
Orange | 橙色 |
支持查询的颜色对应表(上诉支持控制的颜色对应表同样支持,这里不再列出)
AliGenie支持查询的颜色 | 对应中文描述 |
---|---|
Pink | 粉红 |
Violet | 紫罗兰 |
Magenta | 洋红 |
Indigo | 靛青 |
SlateBlue | 蓝灰色 |
DarkBlue | 深蓝色 |
SkyBlue | 天蓝色 |
DarkCyan | 深青色 |
Beige | 浅褐色 |
Brown | 棕色 |
请厂商适配上诉颜色,若颜色对应表中无,请近似匹配
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{
"header":{
"namespace":"AliGenie.Iot.Device.XXXX",
"name":"ErrorResponse",
"messageId":"1bd5d003-31b9-476f-ad03-71d471922820",
"payLoadVersion":1
},
"payload":{
"deviceId":"34234",
"errorCode":"DEVICE_NOT_SUPPORT_FUNTION",
"message":"device not support"
}
}
|
错误响应header协议中name为ErrorResponse
错误响应payload 协议如下
参数 | 说明 |
---|---|
deviceId | 设备ID |
errorCode | 错误码,详见 3.2章节 |
message | 错误信息 |
错误码 errorCode | 错误码说明 | 对应message |
---|---|---|
INVALIDATE_CONTROL_ORDER | 控制指令不正确 | invalidate control order |
SERVICE_ERROR | 服务异常 | 服务错误原因(方便观察原因) |
DEVICE_NOT_SUPPORT_FUNCTION | 设备不支持该操作 | device not support |
INVALIDATE_PARAMS | 请求参数有误 | invalidate params |
DEVICE_IS_NOT_EXIST | 设备未找到 | device is not exist |
IOT_DEVICE_OFFLINE | 设备离线状态 | device is offline |
ACCESS_TOKEN_INVALIDATE | access_token 无效(包括失效) | access_token is invalidate |
AliGenie所支持的品类 | 厂商所需要传递的品类 |
---|---|
电视 | television |
灯 | light |
空调 | aircondition |
空气净化器 | airpurifier |
插座 | outlet |
开关 | switch |
扫地机器人 | roboticvacuum |
窗帘 | curtain |
加湿器 | humidifier |
风扇 | fan |
暖奶器 | bottlewarmer |
豆浆机 | soymilkmaker |
电热水壶 | kettle |
饮水机 | watercooler |
电饭煲 | cooker |
热水器 | waterheater |
烤箱 | oven |
净水器 | waterpurifier |
冰箱 | fridge |
机顶盒 | STB |
传感器 | sensor |
洗衣机 | washmachine |
智能床 | smartbed |
香薰机 | aromamachine |
窗 | window |
注意事项:
1. 云端请求厂商服务接口目前设置的超时时间为2秒,如果出现服务不可用的情况,请接入方进行优化
2. messageId 是不重复的消息id
3. 通用协议的请求都是POST请求
4.app 上显示产品icon有问题时请注意icon链接是https以及大小是160*160
创建人 | admin |
工作小组 | MIOC物联网开放平台 |
文档编辑权限 | 创建者私有 |
文档阅读权限 | 来自分类 |
分类阅读权限 | 所有人 |
分类编辑权限 | 所有人 |
分类审核权限 | 无 |
修改日期 | 修改人 | 备注 |
2017-12-31 16:49:28[当前版本] | admin | 系统管理员修改 |
2017-12-31 17:46:37 | admin | CREAT |