[Custom Component] Roborock communication

Can you please explain how to extract the file? I grabbed it via root but can’t open or read it, I tried with notepad++ and a DB Browser with no luck (I couldn’t get the adb instruction to work either)

  • go to the roborock directory and manually cat the tuya file to /mnt/sdcard/roborock.gz

This is what I’m struggling with

Thank you

I mounted the virtual “sd card” in bluestacks and copied the file there.
then its accessible from the host.
its a gz file, so you need somethign that can unzip that.
or you open the json directly

1 Like

Thank for your reply, after pulling my hair our for a while I decised to look at the other files in the location and saw that for the s6Max it is a different file. And after reading here @ghvader found the same.

So I set up the integration but as others have mentioned, I’m using HassOs on a Pi (v 5.2 USB boot) And this integration doesn’t work due to missing dependancies.

So I will wait and hope that it can be updated to contain the necessary requirememts to run

I’m getting the same error as @bernhard

## Log Details (ERROR)

Logger: homeassistant.components.vacuum
Source: custom_components/roborock/vacuum.py:146
Integration: Vacuum ([documentation](https://www.home-assistant.io/integrations/vacuum), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+vacuum%22))
First occurred: 7:37:03 AM (1 occurrences)
Last logged: 7:37:03 AM

Error while setting up roborock platform for vacuum

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 193, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/roborock/vacuum.py", line 146, in async_setup_entry tuya_init(js_dir) File "/usr/local/lib/python3.8/site-packages/tuyapipc/__init__.py", line 106, in init Popen(['npm', 'install', 'tuyapi-ipc'], \ File "/usr/local/lib/python3.8/subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'npm'

Yes of course as there is no NPM in the Container.
I honestly never got the idea why Hass OS is Chosen over regular docker containers if you have a clue what you are doing. It blocks more than it helps.
If you move to a Debian or raspian installation on your host and use docker containers, you can easily modify those as needed.

@Craig_Burton If you look at the json file, the last value says “tuya_migrated:false” jd89 and I suspect that the s6’s (at least not the s6 Max V) have not been moved to the Tuya platform yet, thus his wrapper will not work since it’s using the Tuya API. our only options at this point are 1) go back to the miio integration with the mi home app and give up on the roborock app 2) wait until it’s moved to the Tuya platform or 3) hope someone figures out another approach.

1 Like

One should be able to make a Docker Container with node which takes on the tuya communication in itself - this can then be added to the AddOn Store with a custom repository this would make it run on HassOs easily too.

I’m happy to provide you guys with this container but unfortunately I also own the S6Vmax which apparently does not work yet - "TuyaMigrated":false

my guess would be that they’re using some proprietary modification of the tuya implementation to protect the platform being tampered with because it has the camera feature which could potentially be a big security concern

1 Like

Sorry for delay. Been moving house.

For docker, yeh, I wonder if I can just add a script that installs node automatically as part of config flow, and integration startup.

For S6vmax. It is hard for me to work out how it does its communications without the machine in front of me. I know where I would need to look in the APK, but other than that, it is a bit of a struggle…

1 Like

I can provide you with everything you need to poke it remotely - tell me when you are open to have a look

How did you get Roborock apk installed on Bluestacks, I am getting
INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
error

I can have a look at my Bluestacks Settings end of week when I am back home. Iguess it has to do with the model youngish to emulate?

If you use genymotion. And then Google arm translation genymotion, that is how I did it

I tried both,
Installed genymotion > Galaxy S8(Android 8) > Genymotion-ARM-Translation_for_8.0 > Open Gapps
No Roborock app available in GPlay, Tried to install from Apk with error.
Can you please post your genymotion setup details?

I am confused… How do you see these? I just get encrypted files from my S6MaxV.

Very interesting, thank you for your work on this. I don’t have a rooted phone, is there a way to run an android virtual machine with root or something to obtain the key?

Try using ApkPure to manually download the APK, and just drag in to genymotion, worked for me

Try using Genymotion or Bluestacks (I used the prior)

What is the best way to get the code for iPhone / Windows user ? where can I find the detailed guide assuming there is one?

Does this HACS integration work on supervised home-assistant (formerly Hassio) ?

p.s.
Please share your feedback on Roborock in general and this custom integration in the following thread so that other people considering this device will benefit from the full picture:

Look in this thread, MaxV not supported

@Graig_Burton, @ghvader reported 13 days ago that he found the token info of a S60 MaxV in rr_rr_xxx file.
Am I missing something? Apart your note about the MaxV not being supported :slight_smile:

The key is elsewhere as it is not communicating with Tuya, thus, not supported by this component.