MiService
MiService copied to clipboard
小米触屏音箱无法执行指令
{ "type": "urn:miot-spec-v2:device:speaker:0000A015:xiaomi-lx04:1", "description": "Speaker", "services": [ { "iid": 1, "type": "urn:miot-spec-v2:service:device-information:00007801:xiaomi-lx04:1", "description": "Device Information", "properties": [ { "iid": 1, "type": "urn:miot-spec-v2:property:manufacturer:00000001:xiaomi-lx04:1", "description": "Device Manufacturer", "format": "string", "access": [ "read" ] }, { "iid": 2, "type": "urn:miot-spec-v2:property:model:00000002:xiaomi-lx04:1", "description": "Device Model", "format": "string", "access": [ "read" ] }, { "iid": 3, "type": "urn:miot-spec-v2:property:serial-number:00000003:xiaomi-lx04:1", "description": "Device Serial Number", "format": "string", "access": [ "read" ] }, { "iid": 4, "type": "urn:miot-spec-v2:property:firmware-revision:00000005:xiaomi-lx04:1", "description": "Current Firmware Version", "format": "string", "access": [ "read" ] } ] }, { "iid": 2, "type": "urn:miot-spec-v2:service:speaker:0000781C:xiaomi-lx04:1", "description": "Speaker", "properties": [ { "iid": 1, "type": "urn:miot-spec-v2:property:volume:00000013:xiaomi-lx04:1", "description": "Volume", "format": "uint8", "access": [ "read", "write" ], "unit": "percentage", "value-range": [ 5, 100, 1 ] }, { "iid": 2, "type": "urn:miot-spec-v2:property:mute:00000040:xiaomi-lx04:1", "description": "Mute", "format": "bool", "access": [ "read", "write" ] } ] }, { "iid": 3, "type": "urn:miot-spec-v2:service:play-control:0000781D:xiaomi-lx04:1", "description": "Play Control", "properties": [ { "iid": 1, "type": "urn:miot-spec-v2:property:playing-state:00000041:xiaomi-lx04:1", "description": "Playing State", "format": "uint8", "access": [ "read", "notify" ], "value-list": [ { "value": 0, "description": "Pause" }, { "value": 1, "description": "Playing" } ] } ], "actions": [ { "iid": 1, "type": "urn:miot-spec-v2:action:play:0000280B:xiaomi-lx04:1", "description": "Play", "in": [], "out": [] }, { "iid": 2, "type": "urn:miot-spec-v2:action:pause:0000280C:xiaomi-lx04:1", "description": "Pause", "in": [], "out": [] }, { "iid": 3, "type": "urn:miot-spec-v2:action:next:0000280F:xiaomi-lx04:1", "description": "Next", "in": [], "out": [] }, { "iid": 4, "type": "urn:miot-spec-v2:action:previous:0000280E:xiaomi-lx04:1", "description": "Previous", "in": [], "out": [] } ] }, { "iid": 4, "type": "urn:miot-spec-v2:service:microphone:00007826:xiaomi-lx04:1", "description": "Microphone", "properties": [ { "iid": 1, "type": "urn:miot-spec-v2:property:mute:00000040:xiaomi-lx04:1", "description": "Mute", "format": "bool", "access": [ "read", "write" ] } ] }, { "iid": 5, "type": "urn:miot-spec-v2:service:intelligent-speaker:0000789B:xiaomi-lx04:1", "description": "Intelligent Speaker", "properties": [ { "iid": 1, "type": "urn:miot-spec-v2:property:text-content:000000FA:xiaomi-lx04:1", "description": "Text Content", "format": "string", "access": [] }, { "iid": 2, "type": "urn:miot-spec-v2:property:silent-execution:000000FB:xiaomi-lx04:1", "description": "Silent Execution", "format": "uint8", "access": [], "value-list": [ { "value": 0, "description": "On" }, { "value": 1, "description": "Off" } ] } ], "actions": [ { "iid": 1, "type": "urn:miot-spec-v2:action:play-text:00002841:xiaomi-lx04:1", "description": "Play Text", "in": [ 1 ], "out": [] }, { "iid": 2, "type": "urn:miot-spec-v2:action:wake-up:0000283F:xiaomi-lx04:1", "description": "Wake Up", "in": [ 1 ], "out": [] }, { "iid": 3, "type": "urn:miot-spec-v2:action:play-radio:00002840:xiaomi-lx04:1", "description": "Play Radio", "in": [], "out": [] }, { "iid": 4, "type": "urn:miot-spec-v2:action:execute-text-directive:00002842:xiaomi-lx04:1", "description": "Execute Text Directive", "in": [ 1, 2 ], "out": [] } ] }, { "iid": 6, "type": "urn:miot-spec-v2:service:clock:0000789A:xiaomi-lx04:1", "description": "Clock", "actions": [ { "iid": 1, "type": "urn:miot-spec-v2:action:stop-alarm:00002843:xiaomi-lx04:1", "description": "Stop Alarm", "in": [], "out": [] } ] } ] }
TTS正常,但是直接执行指令就不行,返回
/config # micli.py 5-4 查询天气 #1 { "did": "********", "miid": 0, "siid": 5, "aiid": 4, "code": -704220025, "exe_time": 0, "net_cost": 0, "ot_cost": 0, "otlocalts": 0, "oa_cost": 0, "_oa_rpc_cost": 0 }
micli.py action '{"did":"********","siid":5,"aiid":4,"in":["查询天气",1]}'
但是用这个命令可以正常执行....
micli.py action '{"did":"********","siid":5,"aiid":4,"in":["查询天气",1]}'
但是用这个命令可以正常执行....
『#』需要转义,前面加上『\』符号。 比如: micli.py 5-4 查询天气 \#1