- 积分
- 194
- 金钱
- 151
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
注册会员
- 积分
- 194
- 金钱
- 151
- HASS币
- 0
|
发表于 2021-1-6 11:17:31
|
显示全部楼层
本帖最后由 axlzys 于 2021-1-6 11:22 编辑
大佬你好。。一个欧普的风扇灯,,一直提示-9999 user act timeout,确认IP和token没打错。。
这个是代码,
switch:
- platform: xiaomi_miot_raw
name: 风扇灯
host: 192.168.1.174
token: 7c41ed8b1a71b460c7c915368444c827
turn_on_command: 'set_properties'
turn_on_parameters: '{"did":"light","siid":2,"piid":1,"value":true}'
turn_off_command: 'set_properties'
turn_off_parameters: '{"did":"light","siid":2,"piid":1,"value":false}'
state_property:
did: SwitchStatus
siid: 2
piid: 1
state_property_getter: 'get_properties'
state_on_value: True
state_off_value: False
这个是SPECS按我理解,iid:2是控制灯的,对于siid。里面包含另外4个iid控制设备开关 色温之类就是piid,不知道是不是这样理解。。
{
"type":"urn:miot-spec-v2:device:light:0000A001:opple-fanlight:2","description":"Light","services":
[
{"iid":1,"type":"urn:miot-spec-v2:service:device-information:00007801:opple-fanlight:2","description":"Device Information","properties":
[
{"iid":1,"type":"urn:miot-spec-v2:property:manufacturer:00000001:opple-fanlight:2","description":"Device Manufacturer","format":"string","access":["read"]},
{"iid":2,"type":"urn:miot-spec-v2:property:model:00000002:opple-fanlight:2","description":"Device Model","format":"string","access":["read"]},
{"iid":3,"type":"urn:miot-spec-v2:property:serial-number:00000003:opple-fanlight:2","description":"Device Serial Number","format":"string","access":["read"]},
{"iid":4,"type":"urn:miot-spec-v2:property:firmware-revision:00000005:opple-fanlight:2","description":"Current Firmware Version","format":"string","access":["read"]}
]
},
{"iid":2,"type":"urn:miot-spec-v2:service:light:00007802:opple-fanlight:2","description":"Light","properties":
[
{"iid":1,"type":"urn:miot-spec-v2:property:on:00000006:opple-fanlight:2","description":"Switch Status","format":"bool","access":["read","write"]},
{"iid":2,"type":"urn:miot-spec-v2:property:mode:00000008:opple-fanlight:2","description":"Mode","format":"uint8","access":["read","write"],"value-list":[{"value":1,"description":"Hospitality"},{"value":2,"description":"Tv"},{"value":3,"description":"Entertainment"},{"value":4,"description":"Night"}]},
{"iid":3,"type":"urn:miot-spec-v2:property:brightness:0000000D:opple-fanlight:2","description":"Brightness","format":"uint8","access":["write","read"],"unit":"percentage","value-range":[7,100,1]},
{"iid":4,"type":"urn:miot-spec-v2:property:color-temperature:0000000F:opple-fanlight:2","description":"Color Temperature","format":"uint32","access":["read","write"],"unit":"kelvin","value-range":[3000,5700,1]}
]
},
{"iid":3,"type":"urn:miot-spec-v2:service:fan:00007808:opple-fanlight:2","description":"Fan","properties":
[
{"iid":1,"type":"urn:miot-spec-v2:property:on:00000006:opple-fanlight:2","description":"Switch Status","format":"bool","access":["read","write","notify"]},
{"iid":2,"type":"urn:miot-spec-v2:property:fan-level:00000016:opple-fanlight:2","description":"Fan Level","format":"uint8","access":["read","write","notify"],"value-range":[10,64,1]},
{"iid":3,"type":"urn:miot-spec-v2:property:mode:00000008:opple-fanlight:2","description":"Mode","format":"uint8","access":["read","write","notify"],"value-list":[{"value":1,"description":"NONE"},{"value":2,"description":"LOW"},{"value":3,"description":"MID"},{"value":4,"description":"HIGH"}]}
]
}
]
}
以下是报错信息
Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}
|
|