iRobot Roomba (WiFi) Support

I tried posting the errors else where as well with no response, any help would be greatly appreciated.

did you get it working, I’m hitting the same roadblock.

No luck at all. I even tried upgrading python from 3.4 to 3.6.3 with no luck. By that I mean i don’t even have the file anymore but I do have the That didn’t work either.

yes, While it works great I find the map does not work when the cleaning job is started with HASS over using the official app.

I would primarily love it if the map worked.


I was able to get my roomba 890 blid and password by using:

pip install git+[email protected]
1 Like

Has anyone been able to get the map into HA? Im using a 980 and have it integrated with HA, but I dont see how to get the maps?

Still can’t get this to work.

installed pip
installed git
sudo git clone
cd roomba

and i get the following…
Traceback (most recent call last):
File “”, line 25, in
from roomba.password import Password
File “/home/homeassistant/Roomba980-Python/roomba/”, line 25, in
from roomba.password import Password
ImportError: No module named password

1 year after… Has anyone been able to get the map into HA? ^^

nope, but I just export the position coordinates to a file via automation and setup a generic camera fetching a php script which returns a generated image and draws rectangles/lines on the coordinates.
It’s far from perfect but gets the job done :slight_smile:

- alias: Locate Roomba every 2 seconds
  initial_state: true
    platform: time_pattern
    seconds: /2
    condition: state
    entity_id: vacuum.roomba
    state: 'on'
    - service: vacuum.locate
      entity_id: vacuum.roomba

- alias: Log Roomba Position
  initial_state: true
      platform: state
      entity_id: "sensor.roomba_location"
    - service: notify.roombafile
        message: "{{ states.vacuum.roomba.attributes.position }}"

- alias: Clean Roomba Log
  initial_state: true
    platform: state
    entity_id: vacuum.roomba
    from: 'off'
    to: 'on'
    - service: homeassistant.turn_on
      entity_id: switch.clear_roomba_log
1 Like

Thank’s! Is it possible to have also the php script and all resources or the github repository if exist? I will try this method =)

sorry I don’t have a repo for this but you can download the code here:

I made some refinements so it looks nicer


Thank you very much! I will test it and tell you :slight_smile:

HI @gotschi,
I am analyzing your code and trying to adapt to my environment: HASSIO running in Docker on Synology NAS (Intel Celeron).
Could you explain the line “http://phpserver/roomba/image.php” ?
I guess I need my homeassistant docker container to be able to run PHP, am I correct ?
How do I “install” PHP in homeassistant?
Will a precompiled static php binary work and where do I find it?


Hi @gerosaf!

yes that is correct, you need a php interpeter running on your host to process the image.php script.
so the easiest way would be to just run a nginx-php container and put the image.php in it’s www_root. You don’t installl it in Hass, there is no php addon available I believe.

This way you can call it like http://nasip:nginxport/image.php

Hi @gotschi ,
thanks for answering!

I am having a look at the PHP script, I am not a programmed, so, sorry for noob question…
I sometime get a full-white camera, so I am troubleshooting

Do I need to qualify this “…” link in the image.php at line 15?
$coords = file_get_contents(“”.time());

Same at line 143 for
curl_setopt($ch, CURLOPT_URL,“”);


yes you need to adapt this to the HA containers ip - or just use

Understood, thanks.
First link is now fixed and tested ok.
I still get a “401: Unauthorized”
testing “curl” in the container and even in my browser with “

I am not sure HA is exposing /api/states… or maybe a permission problem?
Thanks in advance for helping!

curl -X GET “
-H ‘Authorization: Bearer YOUR_LONG_LIVED_TOKEN’

you’ll have to create long lived token in


at the bottom of page click create token.
copy that long-lived token key, save it somewhere
HA won’t show it again. that key needs to be in
the curl command. I also put that in image.php
right after Bearer

1 Like

Hi @pnakashian, hi @gotschi,
you got the point! I solved the permission problem, thank you!

Unfortunately it seems my NGINX-PHP container is missing some functions:

PHP message: PHP "Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor(
) in /data/wwwroot/image.php:50

What would you suggest ?

Got it working using a different NGINX-PHP container.
I am now rescaling my default FLOOR image.

Thanks a lot!