iRobot Roomba

It depends on a model you are working with. I can help you if you use Roomba 980. Otherwise use third-party devices like RooWifi
In case of 980 look at https://github.com/koalazak/dorita980 API implementation. Call to start your roomba in Fibaro HC2 {from scenes only!} will look like:
function StartRoombaNow()
local http = net.HTTPClient();
http:request(“https://YOUR_ROOMBA_LAN_IP/umi”,
{
options = {
method = “POST”,
headers = {
[“Content-Type”] = “application/json”,
[“Connection”] = “close”,
[“User-Agent”] = “aspen production/2618 CFNetwork/758.3.15 Darwin/15.4.0”,
[“Content-Encoding”] = “identity”,
[“Authorization”] = “Basic YOUR_BASE64_ENCODED_KEY”,
[“Accept”] = “/”,
[“Accept-Language”] = “en-us”
},
data = ‘{“do”:“set”,“args”:[“cmd”, {“op”:“start”}],“id”:2}’
},
success = function() DO_WHAT_YOU_WANT HERE end,
error = function() OR_HAVE_A_FUN_HERE_IF_NO_SUCCESS end
});
end

Call Roomba via LAN. User will be “user”. Password will be revealed following dorita980 manual steps (see a corresponding chapter). Basic encoding you can get easily using some third-party tools like Postman for Chrome.
Header in that POST request is a most important part. Save it and use.
Ask for details if necessary.

I found another iRobot implementation, but this one is in python. I wonder if anyone would have time on the interest in making a component out of this?
https://pypi.python.org/pypi/pyirobot

There is already the thinking cleaner component for the 500/600 series. Works very well for me.

Cheers Hannes

this is for the 900 series

So I’ve looked into the pyirobot to make a component for HA (i’m a complete noob, never even used HA prior to trying to accomplish this… it’s been a learning experience). The python module is dated and will not work with newer firmware because it uses the MQTT protocol to communicate locally now.

I did manage to accomplish this via setting up the Roombas as a command-line switch however, using the dorita980 lib. I may look into pulling and updating that python lib to make a more robust integration with HA, but right now this works for 100% of my use cases (starting and stopping the roomba via my Google Assistant -> IFTTT -> HA).

I’m using one of the Broadlink IR blasters and have programmed command_on to be the IR to Clean, and the command_off to be the IR to dock. I just got this working, but I think that will do the trick enough for my needs of planning my own schedule.

1 Like

Do you mind sharing how you did that? I have a broadlink on its way and I would like to do just that.

In my switches.yaml file. These IR codes may work for you as well, I’m not sure if they are Roomba specific or not. You can always have it learn the IR codes specific to your Roomba if they are not the same.

- platform: broadlink
host: 192.168.1.99
mac: 'XX:XX:XX:XX:XX:XX'
timeout: 15
switches:
  roomba:
    friendly_name: "Roomba"
    command_on: 'JgD8AGEgIV8gXyBfXCIhXyBfIAACoGIfIGAfYB9gXSIfYR5hHgACol8iHmIdYh1iXCIfYR5hHgACo2EgHmEfYR1iXCIeYh1iHQACq2AhH2EeYR9gXCMfYB9gHwAComAhH2AfYR9gXCIgYB9gHwACoWAiH2AfYB9gXCMfYB9hHgAComAhH2EeYR5hXCIgYCBfIAACoGEgIGAfYB9gXSIfYR5hHgACql8jHWIdYh1iXCMeYR5hHgACo18iHmEeYh1iXCIeYh1iHQACo18jHWIdYh5hXSIeYh1iHQACo18jHWIdYh1iXCIfYR5hHgACq18iHmEeYh1iXCIeYh1iHgANBQAAAAAAAAAAAAAAAA=='
    command_off: 'JgCQAGAhHmIfYB9gH2BdIh5iXAACbGAhHmIeYR5hH2BdIh5iXAACZGAhHmIeYR5hH2BdIh5iXAACZGEhH2AfYB9gIF9eISBgXgACYl8iIGAfYB9gH2BfICBgXgACamEhH2AfYB9gH2BfICBgXgACYmEgIGAfYCBfIF9cIx9hXAACZGAhHmIeYR5hH2BdIh5iXAANBQAAAAAAAAAA'
4 Likes

Will IR codes work with a 900 series?

I’m not sure. It looks like the remote control is only available for 500, 600, 700, 800 series.

https://homesupport.irobot.com/app/answers/detail/a_id/1093/~/overview-of-the-roomba-500%2C-600%2C-700%2C-800-series-remote-control.

Hi Everyone, here is how I control my Roomba 980 with Koalazak’s Rest980 (docker). @yevgen mentioned Dorita980 which works great too if you don’t want to run a ‘server’ like Rest980.

https://github.com/jtscott/hass-config/blob/master/switch.yaml
https://github.com/jtscott/hass-config/blob/master/sensor/roomba.yaml

1 Like

Please explain the steps to get this running. Also which version of firmware is your roomba on?

1 Like

Got my broadlink yesterday and tried this out. Works like a charm on a 880.

2 Likes

Any updated instructions for us novices? The 900’s series had a huge update Q1 of 2017 and allowed integration with Alexa/Google Home.

Hi, I have started working on an actual Roomba component. Once I finish my implementation (documentation is still missing and the battery icon is not dynamic yet), I’ll submit a PR.

You can check out my work here: https://github.com/pschmitt/home-assistant/tree/roomba
If you want to try it out the easiest way would be my docker image: pschmitt/home-assistant:roomba

Configuration:

roomba:
  hostname: 192.168.10.12
  username: MY_ROOMBA_USERNAME
  password: MY_ROOMBA_PASSWORD

With this you end up with 3 services (clean, pause and dock) and a bunch of sensors (bin full, state, position, battery).

Here’s how it’d look like inside a group.

4 Likes

Love it, I’ll try to take a look at it this week and will help out with the docs if you need it.

I felt guilty and wrote some documentation: https://github.com/pschmitt/home-assistant.github.io/commit/3e09e8246796078c718d1cec9eebad87d23f02eb

The battery icon is dynamic as well now: https://github.com/pschmitt/home-assistant/commit/a2f8c59b7c81a2b44dcf3d52f8179b3d365bfb0b

I’ll submit my PR soon.

… and here it is: https://github.com/home-assistant/home-assistant/pull/8628
Doc: https://github.com/home-assistant/home-assistant.github.io/pull/3048

1 Like

I’ve never pulled one of these down like this. How do I go about pulling it down to install? Does it need to go in the custom_components directory?

Like I said, the easiest way to get going is using the Docker image (see https://home-assistant.io/docs/installation/docker/). Just remember to replace “homeassistan/home-assistant” with “pschmitt/home-assistant:roomba”.

Otherwise this should do it:

pip3 install -U git+https://github.com/pschmitt/home-assistant@roomba
hass