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
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.
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.
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.
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.
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”.