-
-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom sound/voice package functionality for dreame.vacuum.mc1808 (Mijia 1C) #1181
Comments
|
@rezmus running: raw_command action "[{'did':'DID','siid':24,'aiid':2,'in':[{'piid':3, 'value':'DE'},{'piid':4,'value':'https://awsde0.fds.api.xiaomi.com/dreame-product/dreame.vacuum.p2008/voices/package/deyu.tar.gz'},{'piid':5,'value':'96ab843008bb4d19480ac8a07d648aa7'},{'piid':6,'value':'1391385'}]}]" runs for a bit, but then shows a Error: {'code': -9999, 'message': 'user ack timeout'} |
action params are object, not an array. set/get_properties are array. |
@rezmus, I've also tried that way, but it instantly throwed a {'did': 'DID', 'siid': 24, 'aiid': 2, 'code': -1}. |
iirc some actions can't be invoked via local api while work fine via cloud api (miotspec/action). maybe it's the case. |
@rezmus any pointers on how I could make the call go through the cloud? |
check this HA component it can make cloud calls, you will find code there. |
Where can I get a mapping of filenames to certain sounds? |
In the spec for dreamevacuum1808 there's nothing in the JSON that would indicate any sound-mapping whatsoever: https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:vacuum:0000A006:dreame-mc1808:2 |
@DeutscheGabanna You can now install soundpacks for this vaccuum with the following command:
The "ip" and "token" fields should be filled in accordingly. The example URL points to a GLADOS voice pack (from the Portal game). Yes, you can upload your own voice pack somewhere, and then use that as your own custom voice pack. The two values after the URL are a checksum (MD5 I believe) of the voice pack, and its size in bytes. As for the sound mappings, my best advice would be to open the example voice pack in that URL, listen to each sound, and build your own mapping by hand from there. |
mapping of filenames https://github.com/oleksandr-belei/dreame-vacuum-uk-voice-packs/blob/main/en_voice_mapping.csv |
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
I would like to be able to install custom sound packages on my dreame.vacuum.mc1808.
Device information:
If the enhancement is device-specific, please include also the following information.
miiocli device --ip 192.168.1.103 --token 5662576b644d7369686a566838786c4c info
Model: dreame.vacuum.mc1808
Hardware version: Linux
Firmware version: 4.1.8_1118
Additional context
I see the device is supported here:
https://github.com/rytilahti/python-miio/blob/master/miio/integrations/vacuum/dreame/dreamevacuum_miot.py
However, setting custom voice packs is not currently supported. From other issues I found this repository:
http://miot-spec.org/miot-spec-v2/instances?status=all
From here I got to two possible types for my vacuum, and corresponding commands (I've seen mentions of one being a release, and the other a debug version):
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:vacuum:0000A006:dreame-mc1808:1
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:vacuum:0000A006:dreame-mc1808:2
They both provide a "set-voice" service, with siid=24, aiid=2.
I learned how to send raw_commands from here:
#901
I can get the voice pack currently being used by running:
miiocli device --ip 192.168.1.103 --token 5662576b644d7369686a566838786c4c raw_command get_properties "[{'did': 'MYDID', 'siid': 24, 'piid': 3 }]"
However for changing the voice pack, I do not know what the "payload" should be here:
miiocli device --ip 192.168.1.103 --token 5662576b644d7369686a566838786c4c raw_command set_properties "[{'did': 'MYDID', 'siid': 24, 'aiid': 2 '<??...??>' }]"
I was also hoping that it is URL based, similar to the dreame F9, so that it supports custom audio packs:
#812
I've tried running mi home on bluestacks, and then doing a packet capture with wireshark. However, I don't have a way to parse that capture to get the actual exchanged commands. Plus, I don't see any traffic from or to a UDP port 54321 when changing voice language on the app running on blue stacks (I can try it again).
Finally, I've also found a reference to the following command on other repositories in github, for this vacuum:
action{"did":"audio-set-voice","siid":24,"aiid":2,"in":[]}
(again, no payload shown)
e.g. https://github.com/mksway/openhab-addons/blob/c668f77f92eb261c18315efcdf6bdee2c9466904/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.mc1808-miot.json
Any help would be appreciated, and I would be glad to attempt a PR to add this functionality if someone could provide the correct parameters for the call.
P.S. I also see that for some reason the miiocli throws a "WARNING:miio.device:Found an unsupported model 'dreame.vacuum.mc1808' for class 'Device'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/". I can open a separate issue on that, or I can also correct it myself if I end up doing a PR.
The text was updated successfully, but these errors were encountered: