humbertogontijo / homeassistant-roborock

Roborock integration for Home Assistant. This integration uses your devices from the Roborock App
GNU General Public License v3.0
659 stars 69 forks source link

Room selection #613

Open darth-aragoth opened 7 months ago

darth-aragoth commented 7 months ago

I use Roborock S6, in Roborock app I defined two floors, every floor with named rooms. How can I select floor / room for cleaning? I can find current floor / room in device attributes, but I don't know, how to send my vacuum to the chosen room.

kaiserkiwi commented 5 months ago

As far as I'm aware you only can access them via IDs that are never exposed. It's a bit weird, but try to find the right IDs.

Looks like this.

service: roborock.vacuum_clean_segment
    data:
      segments: 18
    target:
      device_id: YOUR_DEVICE_ID
darth-aragoth commented 5 months ago

It worked, thank you :)

fir3drag0n commented 4 months ago

could you elaborate how to find the specific information for rooms?

kaiserkiwi commented 4 months ago

You can drive the robot into a room and look in the dev tools at the camera.NAME_map (NAME is the part where your robot name comes in) entity and look for vacuum_room. There should be the current room id. A bit annoying but it works.

jeffgoh commented 4 months ago

I had to use entity_id instead of device_id (wouldn't work for me, not sure why) so now it starts cleaning segment but stops after zero seconds :(

Also, to figure out segment_id, I followed these instructions:

Roborock has a “segment_id” for each room. But to get what room corresponds with which segment id, you need,

enable debug logging and find one of the first calls roborock makes where we get the user_data, you should see a rooms option, which has the name of rooms and then a 6 digit id.

call the service get_room_mapping and look in the log to see the result. That maps from the 6 digit id to the segment id.

Now you can use the segment ids for cleaning specific rooms

will report back when I figure out what is keeping the vacuum from actually cleaning the specified room

jeffgoh commented 4 months ago

Figured it out - segments needs an array - e.g. "[ 16 ]" instead of just "16". All good now. Hope that helps anyone else stumbling on this issue. So awesome, @kaiserkiwi

I'm guessing that it called the service, but then didn't get a valid room when I didn't use an array as the input.