Yonsm / ZhiMsg

Uniform Message Platform for HomeAssistant
GNU General Public License v3.0
107 stars 17 forks source link

需要接入Redmi小爱触屏音箱Pro8英寸。 #6

Open lywcl2003 opened 2 years ago

lywcl2003 commented 2 years ago

Redmi小爱触屏音箱Pro8英寸,model": "xiaomi.wifispeaker.x08e 目前尝试能够查询音量 ,更改音量,可以生成input_text组件,但无法朗读文本,除音量外,查询,执行均无效。

以下为查询设备的接口文档信息 bash-5.1# micli.py spec xiaomi.wifispeaker.x08e

Generated by https://github.com/Yonsm/MiService

http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:speaker:0000

A015:xiaomi-x08e:2

Device_Information = 1
Device_Manufacturer = 1
Device_Model = 2
Device_Serial_Number = 3
Current_Firmware_Version = 4

Speaker = 2
Volume = 1 #uint8 #rwn
MIN = 0
MAX = 100

Play_Control = 3
Playing_State = 1 #uint8 #rn
Playing = 1
Stop = 0
Pause = 2
Seek_Time = 2 #int16 #
MIN = -30000
MAX = 30000
STEP = 10
Play_Loop_Mode = 3 #uint8 #rwn
Single_Cycle = 1
Seek = 1
Play = 2
Pause = 3
Stop = 4
Previous = 5
Next = 6

Microphone = 4
Mute = 1 #bool #rwn

Clock = 6
Switch_Status = 1 #bool #rwn
Status = 2 #uint8 #rn
Idle = 1
Busy = 2
Device_Fault = 3 #uint8 #rn
No_Faults = 0
Ringtone = 4 #uint8 #rwn
MIN = 1
MAX = 5
Stop_Alarm = 1

Intelligent_Speaker = 7
Text_Content = 1 #
Silent_Execution = 2 #bool #
Wake_Up = 1
Play_Radio = 2
Play_Text = 3 #in=[1]
Execute_Text_Directive = 4 #in=[1, 2]

tv-switch = 8
tv-switchon = 1

使用命令: micli.py 7 你好 反馈: {
"did": "4xxxxxxx4",
"miid": 0,
"siid": 7,
"aiid": 1,
"code": -xxxxxxxxxx5,
"exe_time": 0,
"net_cost": 0,
"ot_cost": 0,
"otlocalts": 0,
"oa_cost": 0,
"_oa_rpc_cost": 0
}

micli.py 7-4 查询天气 #1
{
"did": "4xxxxxxx4",
"miid": 0,
"siid": 7,
"aiid": 4,
"code": -7xxxxxxx5,
"exe_time": 0,
"net_cost": 0,
"ot_cost": 0,
"otlocalts": 0,
"oa_cost": 0,
"_oa_rpc_cost": 0
}

lywcl2003 commented 2 years ago

盼望尽快支持,感谢