rytilahti / python-miio

Python library & console tool for controlling Xiaomi smart appliances
https://python-miio.readthedocs.io
GNU General Public License v3.0
3.52k stars 542 forks source link

I can't run set-voice command dreame.vacuum.p2041o #1946

Open sverdlyuk opened 6 days ago

sverdlyuk commented 6 days ago

Describe the bug My device Xiaomi Vacuum MOP 2 Pro+ (dreame.vacuum.p2041o) is in the list of supported devices, but when running the command miiocli dreamevacuum --ip --token set_voice https://github.com/Findus23/voice_pack_dreame /raw/main/voice_pack.tar.gz 8ebfabb9e23e169a5c9b867266f9d1ef 4325024 I get the error Error: Unable to find set_voice in the mapping

Version information (please complete the following information):

Device information: If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token> info]:

To Reproduce Steps to reproduce the behavior:

  1. miiocli dreamevacuum --ip 192.168.0.101 --token xxxxxxxxxxxx set_voice https://github.com/Findus23/voice_pack_dreame/raw/main/voice_pack.tar.gz 8ebfabb9e23e169a5c9b867266f9d1ef 4325024

Expected behavior A clear and concise description of what you expected to happen. I am waiting for the voice package to be installed

Console output miiocli dreamevacuum --ip 192.168.0.101 --token xxxxxxxxxxxxxxxxxx set_voice https://github.com/Findus23/voice_pack_dreame/raw/main/voice_pack.tar.gz 8ebfabb9e23e169a5c9b867266f9d1ef 4325024 Running command set_voice Error: Unable to find set_voice in the mapping

rytilahti commented 6 days ago

This device does not use the same format as what's implemented in the class. If you try miiocli genericmiot --ip 127.0.0.1 --token 00000000000000000000000000000000 settings on your device, you'll see that there's audio:set-voice but it expects only a string parameter. I don't see anything hinting towards uploading/downloading new sound packs, so perhaps this device does only support changing between the existing packs?

sverdlyuk commented 5 days ago

This device does not use the same format as what's implemented in the class. If you try miiocli genericmiot --ip 127.0.0.1 --token 00000000000000000000000000000000 settings on your device, you'll see that there's audio:set-voice but it expects only a string parameter. I don't see anything hinting towards uploading/downloading new sound packs, so perhaps this device does only support changing between the existing packs?

Thank you for the quick response. I managed to load a custom voice package onto this vacuum cleaner using the Home Assistant - Vacuum Dreame integration. I see that the miio spec for the vacuum cleaner includes a command to load an audio package (SIID 7 audio, and properties PIID 4 set-voice). However, I want to load the voice package using python-miio. Can I load the package using the call command or a raw command?