Add support for irobot roomba clean specific room

I’d love to be able to clean a specific set of rooms from HA, but I’m not running docker, and am not really up for hacking of this level just for this purpose.

What would you all estimate are the chances of actually getting this feature officially added to the roomba integration at some point?

Alternatively, is there a way to inject a command into the google assistant? I.e., the google assistant is able to fully control the roomba… if I could send commands to it from HA, that might work?

Thoughts?

Pretty sure the Google Assistant SDK will do what you’re suggesting!

Oh thank you thank you thank you!
This quick comment just upped my HA game by a huge margin.
It fixed my issue here, and about 3 others I have been fighting with on the side.

How have you done this?

1 Like

Yeah, i am also interested in this.

@rossc719 Can you share this? :slight_smile:

Same? Why the official app does not support maps and rooms selections? It would be much helpful!

Sure (Sorry for being slow).
I installed the SDK as @amichaelwagner suggested:

And then from there, I can send commands directly to the home assistant to start the roomba in a specific room or area:

E.g.

service: google_assistant_sdk.send_text_command
data:
  command: "vacuum the kitchen"

And it works like a charm. Ive also started using it to trigger other google assistant routines and such. Any command seems to work just fine. Any command you could run via “Ok Google” is now available to HA.

I also use the notify.google_assistant_sdk service to send notifications around the house. The old way I was doing it (using the tts services) would cancel any music that was playing. Now it doesn’t.
Couldn’t be happer with this.

1 Like

It should be built indo th UI for the Roomba integration.

2 Likes

Hi,
I’ve added the ability to get the RAW_STATE_2 attributes. Now I am trying to sort out which attributes I can use. I use the Google SDK integration to send it to a room. It’s easy to send a command to turn on the lights and when it finishes turn them off. I am wanting to have it do this for a scheduled run.
What I can’t seem to find is how it knows which room it is in. I can get the region_id sequence, but I haven’t figured out how to tell when it goes to the next room. In the app it seems to be able to track when it is going to the next room and when it is cleaning the next room.
I was hoping the information that it uses would be in the RAW_STATE_2 attributes.

Any thoughts on this?

Thanks

1 Like

This functionality seems to have vanished in 2023.12 as my scripts no longer work. Anyone else experience this?

1 Like

same problem

I’ve found a way to log the roomba commands to the home assistant log without needing to modify the roomba python files and add them to the custom_components folder.

Its possible to enable Debug logging for the existing roomba component using the Home Assistant logger
https://www.home-assistant.io/integrations/logger/

I added the following code to my configuration.yaml

# Logger:
logger:
  default: info
  logs:
    homeassistant.components.roomba: debug

This will now log out debug information when the roomba integration interacts with the robot. It will log out the IP address(es) of the robot(s) and all commands sent to the robot(s)

Restart Home Assistant.
Trigger a clean for the roomba via the Roomba app
Check the Home Assistant logs

2024-01-02 15:17:05.899 DEBUG (Thread-3 (_thread_main)) [homeassistant.components.roomba.irobot_base] Got new state from the vacuum: {‘state’: {‘reported’: {‘lastCommand’: {‘command’: ‘start’, ‘favorite_id’: None, ‘initiator’: ‘rmtApp’, ‘ordered’: 1, ‘params’: None, ‘pmap_id’: ‘TlX_nz0ZR1111111111111’, ‘regions’: [{‘params’: {‘noAutoPasses’: True, ‘twoPass’: False}, ‘region_id’: ‘6’, ‘type’: ‘rid’}], ‘time’: 1704208626, ‘user_pmapv_id’: ‘236573T123456’}}}}

The lastCommand object is logged out each time a new command is issued to the robot. E.g. start, pause, cancel etc.

This should work for both Roomba and Braava mops.

Once you have the id’s of all the rooms, then the logging level can be set back to default level to avoid filling the logs with unneeded log messages.

NOTE - if you have edited the python code for the roomba component and added the files to the custom_components folder, then you will need to delete this folder so that the default roomba component bundled with Home Assistant is used.

18 Likes

I’m interested in removing the manual steps involved here - take a look at my proposal

Thanks a lot for this. It worked really fine !

Thank you!!

Works like a charm, for me worked in the original way the first time, but last time (I needed to update the user map id and took me too much time, but today again updating the map id I was not able to do it in the old way. But with this option, it took me 2 minutes.

Thanks again.

Why is this not higher, it just works :exploding_head:

Thank you!

I’ve created account only to say “Thank you”. You made my day. I’ve spend few days installing, reinstalling all in the world software to get this pesky lastCommand (python scripts, containers, pips, npms etc.) of course lost all this time because no output was generated or something didn’t work.

Your method is clean, robust, fast and actually OUT OF THE BOX. So again… thank you very much, now i have my zones ids finally.

And -1 for HomeAssistant Roomba handler for hiding data from users, why? HA should be swiss-knife for managing devices, we should get all data to work with from the start.

2 Likes

I managed to follow the steps and got the the debug log but it doesn’t return any region IDs?

the log output as below: 2025-01-30 14:15:36.706 DEBUG (Thread-3 (_thread_main)) [homeassistant.components.roomba.vacuum] Got new state from the vacuum: {‘state’: {‘reported’: {‘cleanMissionStatus’: {‘cycle’: ‘clean’, ‘phase’: ‘run’, ‘expireM’: 0, ‘rechrgM’: 0, ‘error’: 0, ‘notReady’: 0, ‘condNotReady’: , ‘mssnM’: 0, ‘expireTm’: 0, ‘rechrgTm’: 0, ‘mssnStrtTm’: 1738208663, ‘operatingMode’: 2, ‘initiator’: ‘rmtApp’, ‘nMssn’: 374, ‘missionId’: ‘01JJTMYNER1SBS6SWEH7YJX88G’}}}}

I should note the model is j7+