rytilahti / python-miio

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

API change language pack on Viomi Vacuum v7 #738

Open thangtq139 opened 4 years ago

thangtq139 commented 4 years ago

Hi,

I just bought a brand new Viomi Vacuum v7 (STYJ02YM) shipped with latest firmware 3.5.3_0047. The v7 is the domestic product, so, it speaks Chinese.

I just tried to change the language to English using Miio's built-in command: miiocli viomivacuum --ip xxx.xxx.x.x --token xxxxxxxxxxxxxxxxx set_language en

The returned result is: ['ok']. However, there is no change at all, the robot still speaks Chinese :(

I don't want to root the device because I just want to take at minimal risk at possible in order to get English/Vietnamese voice. Just wonder if there is any API like directly asking the robot to get the sound pack from some URLs (which is similar to the Roborock gen1&2)

Thanks in advance!

rezmus commented 4 years ago

set_language 2

v7 firmware does not allow custom voice packs (v8 does).

thangtq139 commented 4 years ago

Tried with raw_command set_language '[2]', but no luck. Seems that they removed the language pack or something...

rezmus commented 4 years ago

i doubt it's the case, because english sound pack is part of firmware. send both cmd (it should do the same)

set_language 2 set_lang en

and power on/off robot. keep in mind that if you still use mi home app it will automatically set sound pack on the robot according to your mi home language setting (cn for cn, en for other).

Soarex16 commented 4 years ago

@rezmus , how I can reboot robot? I'm only can reset wifi settings, but it doesn't helps.

Elkropac commented 3 years ago

@thangtq139 Have you figured it out? I tried both

miiocli -d  viomivacuum  --ip IP --token TOKEN raw_command set_lang '["en"]'
miiocli -d  viomivacuum  --ip IP --token TOKEN raw_command set_language '[2]'

powered it off by holding power button, but it still speaks Chinese

Model: viomi.vacuum.v7
Hardware version: Linux
Firmware version: 3.5.3_0047
rezmus commented 3 years ago

new batch of this model has something broken in language change. wait for firmware update and try again.

LZsolt75 commented 3 years ago

I have the same issue, unfortunatly no upgrade is relesaed. The miiocli info command says that my device is viomi.vacuum.v7, but the data plate at the bottom of the device says it is a STYTJ02YM which is viomi.vacuum.v8 as I found here: somewhere. (MiHome app also said it is a v7)

rytilahti commented 3 years ago

Is it still possible to change the language from the app? If yes, doing a packet trace & finding out the issue would make it possible to create a fix for this specific case.

LZsolt75 commented 3 years ago

The language in the MiHome app is set to English. I haven't found language setting option on the Vacuum cleaners page

rezmus commented 3 years ago

in v7 they don't have commands to download voice packs. you can only switch between factory cn/en (last batch with factory firmware 0047 had even this broken). maybe with firmware update if there will be any ;)

janowakps commented 3 years ago

maybe with firmware update if there will be any ;)

@rezmus or maybe there is an option to change the firmware from v7 to v8?

8times4 commented 3 years ago

The 'easiest' way to change the language is either by opening an adb shell at boot (and connecting it to your device via micro usb) or just use this to also get a permanent ssh into the vacuum. viomi-rooting

Once you're in, either with adb shell or ssh, you should do the following: cd /usr/share/audio/ - to change dir to the audio folder. rm -r mandarin - this will fully erase the mandarin from the mop, so just fyi. mv english mandarin && mkdir english - to rename english folder to mandarin and to create an english folder just to avoid errors. you could also symlink english to mandarin, but your mop will go mute until you relink it if something happens with the symlink. Hope this helps. :)

P.S: I also tried using this method from dustcloud but it failed to work for me.

RiRomain commented 3 years ago

I just tried and replacing the language file via ssh works. Connect to the robot and just do: cp /usr/share/audio/english/* /usr/share/audio/mandarin/ I didn't replace the mandarin folder with the english one, as some audio are missing from the english pack, and I don't want to risk the robot crashing or having issue.

Just as info, missing are:

8times4 commented 3 years ago

For me It'll just not speak if it can't find the file. I also replaced files and they also work just fine. https://github.com/Hypfer/Valetudo/commit/c953e2b558b7bce5eace00655c3fb2f3ad30b0d6 ^Valetudo also implements it now, so it should be part of the 2021.04 release if you use Valetudo.

RiRomain commented 3 years ago

Thanks for the info, I'll watch for the release of 2021.04, seems many will be improved for the Viomi v7 in the next release.

cyprieng commented 3 years ago

Anybody succeeded to change the voice pack on a viomi v8 ?

I cannot rename the files because the disk is full, I get the "No space left on device" error

arnegue commented 2 years ago

Anybody succeeded to change the voice pack on a viomi v8 ?

I cannot rename the files because the disk is full, I get the "No space left on device" error

I first had the same error message because i made a backup of the mandarin folder on the robot. If you make the backup, then transfer it via scp to another device.

Elkropac commented 2 years ago

Anybody succeeded to change the voice pack on a viomi v8 ?

I cannot rename the files because the disk is full, I get the "No space left on device" error

When you rename it, it's actually copied to new location, because it's on overlay FS. I just removed mandarin dir and created symlink from english to mandarin