Add support for irobot roomba clean specific room

I have a braava m6 and a roomba i9+ and I would like to have a service to call when I want to clean a specific room.

This would be really nice!

1 Like

Wow. This doesn’t make any sense. 5 votes within one year? This should have been implemented long ago.

1 Like

This is possible with the official iRobot integration. You just have to do a little upfront work to get it to work and then call service: vacuum.send_command.

Instructions

  1. Ensure you have Docker installed and running.

  2. Replacing IROBOT_USERNAME and IROBOT_PASSWORD with your iRobot cloud credentials, run the following:

    docker run -it node sh -c "npm install -g dorita980 && get-roomba-password-cloud IROBOT_USERNAME IROBOT_PASSWORD"
    

    Note your BLID (username) and PASSWORD from the output.

  3. Open the iRobot mobile app and start a clean job for a specific room.

  4. Close the iRobot mobile app and temporarily turn off the “Continuous” setting for the iRobot integration in Home Assistant. This will ensure nothing is connecting locally to the Roomba.CleanShot 2021-09-21 at 12.15.56

  5. Replacing BLID , PASSWORD, and ROBOT_IP with your own values, run the following:

    docker run -e BLID='1B166A0FNOTREALA9B1FA' -e PASSWORD=':1:1706623241:NOTREALUmdqQ' -e ROBOT_IP='192.168.1.78' -it -w /root node sh -c "npm install --silent --no-progress dorita980 && node -e \"var dorita980 = require('dorita980'); var robot = new dorita980.Local(process.env.BLID, process.env.PASSWORD, process.env.ROBOT_IP); robot.getRobotState(['lastCommand']).then((st)=> { console.log(st.lastCommand); process.exit(0); });\""
    
  6. Note pmap_id, regions and user_pmapv_id in the output. The regions object will correspond to the room you started the vacuum job for in step #2 above.

  7. Turn back on the “Continuous” setting for the iRobot integration in Home Assistant.

  8. Call the vacuum.send_command in Home Assistant using the following format:

    service: vacuum.send_command
    data:
        entity_id: vacuum.roombie
        command: start
        params:
          pmap_id: ohG_V5NOTREALRnAvsFkqw
          regions:
            - region_id: '27'
              type: rid           
          user_pmapv_id: 1105NOTREAL07
    
17 Likes

Glad to see this getting more traction - and discussion! :slightly_smiling_face:

Regions and zones can be added to the regions section as displayed in the above. The command will work on all.

If “ordered: 1” is added to the command, the rooms/zones will be worked in that sequence - this is handy. I use this do de-prioritize rooms/zones that are most likely to cause the roomba to fail.

More info here

1 Like

Any one trying this out. Remove continuous before trying to retrieve the password.
And also, the formatting on the docker command is fubar.

docker run -e BLID=‘BLID’ -e PASSWORD=‘PW’ -e ROBOT_IP=‘IP’ -it -w /root node sh -c “npm install --silent --no-progress dorita980 && node -e “var dorita980 = require(‘dorita980’); var robot = new dorita980.Local(process.env.BLID, process.env.PASSWORD, process.env.ROBOT_IP); robot.getRobotState([‘lastCommand’]).then((st)=> { console.log(st.lastCommand); process.exit(0); });””

Hi,

[update] Solved on my own- I indeed use the wrong container. Using “-it homeassistant” worked fine.

I am struggling in getting the credentials in step 1 (BLID and password).

I checked the referenced link where it says to start the following command for Home Assistant Container.

docker exec -it CONTAINER_NAME_OR_ID python -c 'import roombapy.entry_points; roombapy.entry_points.password()' ROOMBA_IP

Unfortunately I am getting this back:

Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'roombapy'

I am pretty sure I used the correct container. I have installed my HA as HassIO image as a virtual machine.
To find the correct ID I logged in to the console (with “login”) and check the available containers (sorry, just as screendump picture). Should I have to use a different container?

Thanks for all your further ideas!

/KNEBB

Unfortunately I have to state step 1 is still not working.

I press the Home button on my Roomba S9+ and wait until the sound appears. Immediately after I start the command on HOASS.

But whatever I do I am getting “Connection refused”.

And yes, it is the correct IP of my Roomba:

<inside of the container> 
python -c 'import roombapy.entry_points; roombapy.entry_points.password()' 192.168.22.50

Any ideas what is wrong here?

Thanks!

/KNEBB

Is there a way to do this without providing the user_pmapv_id? It seems that after each run the roomba continues to learn and the user_pmapv_id changes to the time the map updated causing my previous scripts to not work anymore.

Hi,

Is there any way for it to work without installing docker? I have installed HA flashing the image with
Balena Etcher, not installing the container and now I don’t know how to proceed everytime someone writes about installing something with docker


Thank you,

5 Likes

HassOS is installed using docker. you can possibly access port 2222 in order to access the host. I caution when you’re using this as you can royally screw up your system if you dont know what you’re doing. you can run docker commands there.

Whilst not using the native solution, I did write some instructions for achieving this using rest980 as a HA Addon/Docker Container.

I’m getting an ‘access denied’ response when clicking on your link. Unsure if its something I’m doing.

Sorry I messed up the link, fixed now

Thank you very much!! I had seen your solution but I thought it was necessary to use docker too. I’m a Windows boy and, for now, Linux is something very strange for me. I’m working on it 


I have been able to install your add-on and it works very well. Now I’m trying to do my own configuration.

1 Like

See step by step tutorial and script for queuing room/zones in home assistant here: Home Assistant Roomba S9 Integration With Room Selection

1 Like

This is infuriatingly complicated. I would love to get this to work, but cannot justify the many hours and days it will take. What a shame it isn’t easier to achieve.

3 Likes

I just did this today with no issues. Worked exactly as described.

For anyone who stumbles onto this frustrated that the link by posted on January 24th by Joshua Hess doesn’t work when you get to the docker commands, if you have a Roomba J7+ you need to add one more environment variable to the command: ROBOT_CIPHERS='TLS_AES_256_GCM_SHA384'

2 Likes

I am super excited about this. Once the battery charges back up, I am running that command and creating an automation that counts the motions in each room (plus each room gets one motion per day to make sure under-utilized rooms get some attention) to automatically vacuum the most accumulated used room every day when I am at work. Prevents bins from getting full and failing on the whole job.

1 Like