Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Roborock App Integration #100

Open
jamescaudle opened this issue Apr 11, 2021 · 10 comments
Open

Roborock App Integration #100

jamescaudle opened this issue Apr 11, 2021 · 10 comments
Assignees
Labels
enhancement New feature or request platform: xiaomi

Comments

@jamescaudle
Copy link

Many thanks for making this integration.

I am wondering if it is possible to pull the maps from the Roborock server rather than the Xiaomi server. Recently the HASS-Roborock integration has allowed Hass users to utilise the Roborock app and the Home Assistant Vacuum-Card simultaneously. However, I note since switching to the Roborock app I am unable to access the map feature.

Is this a feature that can be added?

@cathelest
Copy link

cathelest commented Apr 11, 2021 via email

@PiotrMachowski
Copy link
Owner

@jamescaudle it's not possible to do it in this integration, as Roborock uses a completely different API (Tuya, as far as I know)

@cathelest see this discussion

@Xyaren
Copy link

Xyaren commented Dec 10, 2022

This might change!
https://gist.github.com/rovo89/dff47ed19fca0dfdda77503e66c2b7c7

https://github.com/humbertogontijo/homeassistant-roborock

I fiddled around with the js gist and was able to load the map.
I was then able to use https://community.openhab.org/t/xiaomi-vacuum-map-viewer-to-find-coordinates-for-zone-cleaning/103500 to open the file.
I had to skip the unzipping used in the script though and save the map with .gz extension.

Promising results!

@PiotrMachowski What is your opinion ? Is it worth giving this Method a try ?

@PiotrMachowski
Copy link
Owner

@Xyaren if you were able to retrieve gz file from Roborock cloud then it should be possible to incorporate this into Map Extractor, but it would require some additional changes to be made. Let's reopen this request

@PiotrMachowski PiotrMachowski self-assigned this Dec 10, 2022
@Xyaren
Copy link

Xyaren commented Dec 10, 2022

It might be required to consider this a new platform, as this seems to be quite a different approach.

@PiotrMachowski
Copy link
Owner

PiotrMachowski commented Dec 10, 2022

I have to take a look at the code and consider all pros/cons. The only difference will be in retrieving raw map file from the cloud - the rest (raw map parsing and drawing) should be the same.

I have a similar dilemma with Valetudo ;)

@Xyaren
Copy link

Xyaren commented Dec 11, 2022

Oh right, I got confused with lovelace-xiaomi-vacuum-map-card.

@Xyaren
Copy link

Xyaren commented Dec 11, 2022

@humbertogontijo just added a fix to the integration for map payloads fetching.
I understand that this is a very early stage of development, but I was successful calling get_map_v1 via the "send_command" service:

service: vacuum.send_command
data:
  command: get_map_v1
target:
  entity_id: vacuum.fussel

Which results in the following log statements:

2022-12-11 16:38:53.541 DEBUG (SyncWorker_4) [custom_components.roborock.api] Requesting method get_map_v1 with None
2022-12-11 16:38:53.951 DEBUG (SyncWorker_4) [custom_components.roborock.api] Response from get_map_v1: b'rr\x14\x00,\x18\x06\x00\x01\x00\x00\x00k\x06\x00\x00\x01\x00\x00\x00\x02\x00\x1c\x00\xa1\xf4\x02\.......

(Log is cut short for sanity...)
Very promising though.

I'm not very familiar with Homeassistant, but maybe there is a way of using the homeassistant-roborock entity for fetching the map data.

@mindgam3s
Copy link

this would be really awesome as I switched to the roborock app myself for a new robot model and sadly realized that the HACS integration doesnt work with the roborock API and you can't connect the vacuum to both systems :(

+1

@mschulze46
Copy link

Have the same problem with my Roborock S7. Switched to Roborock app and the map extraction doesn't work anymore.
So pulling the map from Roborock API would be really awesome!!!

+1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request platform: xiaomi
Projects
None yet
Development

No branches or pull requests

6 participants