Xiaomi Vacuum Media PLayer (for TTS Music and Rado stations )

Do you have SSH access to the robot ? Is it rooted ?

Yeah, rooted and accessible via SSH. It is running valetudo.

Why not just installing it on the vacuum…? Apt Install Sox ?

  1. Install sox and perl via package manager (apt/opkg/etc).
  2. Copy sound_server.pl to device.
  3. Run sound_server.pl.
  4. Add /path/to/sound_server.pl & to /etc/rc.local above exit 0 to enable auto start on boot.

@definitio, @thundergreen you guys rock the roborock :smiley:

Will try adding a esp32 cam to the robot but first i have to study the 5v output on the vacuum. Will make a new post once finished

I remember trying to do that, but I just scratched the surface (on S5) with the microUSB port. no power was coming out over there

will check Giese docs … he disambled the robot completely when he tried to figure out how to root it :slight_smile:

1 Like

On gen3 (S5 Max) there is no apt or other package managers available. I managed to get espeak working, but I had to transfer binary as well as all dependencies.

I will keep on trying and keep you guys updated if I got any luck.

i just get strange behaviour… won’t work each time … i need to manually run this to get it work:

#!/usr/bin/env python3

import socket

HOST = '192.168.1.222'
PORT = 7777

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
    sock.settimeout(5)
    sock.connect((HOST, PORT))
    sock.sendall(";1.0;".encode())
    output = sock.recv(256)

print(output)

You can try this binaries.

Hi, I am new to HA world, still fighting with setting my system, etc…
Well, I have installed valetudo on my gen1 vaccum, added the Sox player on HA, but I don’t know how to proceed.

In the dashboard I can add SOX player as play button and volume, nothing more.
I also tried to add service in developer settings by trying to play mp3 file that I put on www, but also doesn’t work.

So let me try to put my desired goals here, and I will appreciate any help given:

  1. Ability to play music/radio Playlist on the roborock, and how to set it properly in dashboard.
  2. proper TTS support (I tried to install the docker, but got error that the switches are wrong)

Thanks in advance!

Are you on discord? I can help you there better

Yes.
Sent request

Sorry for bumping this topic.
I followed definitio`s instructions but unfortunately it seems like dustbuilder strips the underlying ubuntu so much that there is no possibility to install new packages any more

apt / apt-get, dpkg and sudo are not known to the system and can’t be executed via ssh.
I have to admit that I’m no linux user and so I might not see the obvious here.

Has anyone managed to install sox on a recent S5-vacuum? (Dustbuilder: ver 2034, 11/2020, stripped-Ubuntu)

You can get a prebuilt firmware there.

Thanks for the quick comment :slight_smile:
Regarding this custom firmware I have two questions left:

  • Will the firmware-update from valetudo-settings still work afterwards or would sox be uninstalled as soon as an “official” update is done?
  • How does one know that these prebuilt firmwares don’t include suspicious content? Because of this I can imagine that people like to install packages independently :innocent:
  1. I don’t know. I’m always just replace valetudo binary to update it.
  2. You can build custom firmware from sources.

I know I am late to the part but how did you get espeak running.

Hello,
Bump this topic to thanks again definitio and, to add that is possible to install snapclient and squeezelite. The first has to be version 0.15 from badaix releases Snapclient_vacuum and should be installed with --force-depends. The squeezelite installs directly from the repositories.

Didn’t try but, maybe MPD works too, fair enough three clients on the vacuum for me.

About use of this integration, in my case, one of the TTS I got from my vacuum is after a failure of power as it has battery (and my router and HA are on a UPS) so it does a quite specific task and, that would be more difficult to accomplish in other ways…so don’t underestimate this integration…