iRobot Roomba i7+ Configuration using Rest980

My apologies, I didn’t have rest980 Docker Image installed. I restarted everything, and now am seeing this in the logs,

Log Details (ERROR)
Logger: homeassistant.components.vacuum
Integration: Vacuum (documentation, issues)
First occured: 9:12:25 PM (1 occurences)
Last logged: 9:12:25 PM

Error while setting up roomba platform for vacuum
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 303, in _connect
    self.client.connect(self.address, self.roomba_port, 60)
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 937, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 1071, in reconnect
    sock = self._create_socket_connection()
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
    return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
  File "/usr/local/lib/python3.7/socket.py", line 728, in create_connection
    raise err
  File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 303, in _connect
    self.client.connect(self.address, self.roomba_port, 60)
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 937, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 1071, in reconnect
    sock = self._create_socket_connection()
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
    return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
  File "/usr/local/lib/python3.7/socket.py", line 728, in create_connection
    raise err
  File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 303, in _connect
    self.client.connect(self.address, self.roomba_port, 60)
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 937, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 1071, in reconnect
    sock = self._create_socket_connection()
  File "/usr/local/lib/python3.7/site-packages/paho/mqtt/client.py", line 3522, in _create_socket_connection
    return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
  File "/usr/local/lib/python3.7/socket.py", line 728, in create_connection
    raise err
  File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 179, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
    return fut.result()
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 112, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 286, in connect
    if not self._connect():
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 321, in _connect
    self._connect(count, True)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 321, in _connect
    self._connect(count, True)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 321, in _connect
    self._connect(count, True)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 325, in _connect
    "Unable to connect to Roomba at {}".format(self.address))
roomba.roomba.RoombaConnectionError: Unable to connect to Roomba at 192.168.20.46

The IP address is correct, and all firewall rules are setup to allow established and related - as this device is on a VLAN. All MQTT ports are also open. I then tested opening the roomba IP up to the HA server, then restarted, but got the same error as above.

this deployment does not use the HA built in vacuum component - you will need to disable this for it to work!

Is this done by removing `vacuum:

  • platform: roomba
    host: 192.168.20.46
    username: BID
    password: PW’

from the config.yaml file?

yep!

you should have the BLID/PW/IP added to the rest980 addon configuration

by default the rest980 uses port 3000 and nginx uses port 3001

so once vacuum is disabled, you should be able to browse to
http://192.168.1.198:3000/api/local/info/state
and this should give you the vacuum details

1 Like

Thank you a ton man, you’ve been an amazing help! Removing the code from the configuration.yaml file worked. I’m able to see a bunch of data points when going to that page. I then figured that that meant that everything should point to 3000 vs 3001 (which I previously had). I replaced all entries w/ the correct port, and now I have a vacuum.log file.

The last hang up I’m running into now, is when adding the lovelace module, when I paste in the full content of the lovelace.yaml file, I get, `duplicated mapping key at line 160, column 1: type: picture-glance ^’

If I remove ### PICTURE GLANCE CARD ### aspect_ratio: 0% camera_image: camera.roomba entities: [] type: picture-glance
I can get it to load, and see the data points in there.

I did add all the lovelace plugins in the guide, and chose the “add to lovelace” option. I’m not sure if I’m missing something else?

ah, the lovelace configuration should actually be two separate manual cards

  • first between lines 2 and 154 (cards and type:vertical-stack)
  • second between lines 157 and 160 (aspect_ratio to type: picture-glance)
1 Like

Thanks so much for your help!

I got most of this running. A couple of questions / challenges I’m running into on the map integration…

In the guide, it says - “You will need to update the variables at the top of the image.php and image_dev.php to align with your environment.” However, nowhere do I see an image.dev.php file anywhere.

Also, I uploaded a floor.php replacement, and I’ve run the roomba, but I’m not seeing any files as being created by it. I did insert the pmap and user pmap ID’s.

I also notice that there’s a reference to a floor.png file in the image.php doc, but no mention of it (that I could find) in the instructions.

At this point, I’m getting no map output w/ the lovelace module. I copied the code directly in.

1

BLID: 317***********890

2

PASSWORD: ‘:1:15*********6DowgNVQAynokui’’’

3

ROBOT_IP: 192.168.2.155

4

FIRMWARE_VERSION: ‘2’

5

Failed to save addon configuration, not a valid value for dictionary value @ data[‘options’]. Got {‘BLID’: 3175000042416890, ‘PASSWORD’: “:1:1565099596:K6DowgNVQAynokui’”, ‘ROBOT_IP’: ‘192.168.2.155’, ‘FIRMWARE_VERSION’: ‘2’}

No longer needed, this file was removed and ive since removed it from the README file.

If the automations are working correctly, the process should work like this -

  1. You start cleaning
  2. Vacuum Clean Log automation executes. This calls the shell command vacuum_clear_log which writes over the vacuum.log file and then calls shell command vacuum_clear_image which in turn calls /image.php?clear=true which removes the latest.png file in the vacuum directory.
  3. Vacuum Update Location executes every 2 seconds
  4. When a location update is detected by Vacuum Log Position it writes this to the log file
  5. If Stuck, Vacuum Notify on Stuck Status executes and writes “Stuck” into the log file
  6. When finished, Vacuum Notify on Finished Cleaning executes and writes “Finished” to the log file
  7. 10 seconds after finished cleaning Vacuum Generate Image after Cleaning executes and calls the shell command vacuum_generate_image, which in turn calls /image.php?last=true which generates latest.png and .png files in the vacuum directory. you can test this manaully to make sure its not a permissions issue.

Make sure all these automations are correctly firing and check your homeassistant log file for any potential errors being generated

Check Step 9

Does your password contain a " ?

Perhaps try PASSWORD: ‘:1:15*********6DowgNVQAynokui’

Sorry, I misspoke. As mentioned, I did upload my floor.png. I meant to say that there’s reference to a walls.png in the image file, but don’t see anything more in relation to it.

Also - I do see the log positions writing. However, the Picture Glance Card is still blank. I was unclear on the file being written 10 seconds after it completed. I did manually run it earlier, and manually tell it to finish, but didn’t see a new image, or anything in the Picture Glance Card. Maybe it’s misconfigured?

And, does telling the Roomba to stop cleaning via the app invalidate this process?

walls.png is a new undocumented feature requested by @austech360 :wink: its used in conjunction with line_thickness to allow you to just fill the floor with the “cleaned” area, similar to the irobot app shows. to prevent overspray, you need to duplicate your floorplan with transparent floors and this is overlayed on the end map to make it look shiny.

so all the aformentined automations are showing a last triggered time? which aligns with what you are expecting (i.e. when you stopped the clening, etc) it wont matter than you stopped it manually, as the phase and cycle statuses will still update accordingly.

after a clean/test clean, confirm the vacuum.log file contains points and then try open the image.php file in a browser and see what you get?

I’m sorry (still a noob), but how do I do this? I tried the HA IP w/ the HA port, and the docker port w/ vacuum/image.php, and both returned nothing back.

Based on the info in previous posts, i presume the URL will be
http://192.168.1.198:3001/image.php

I get this mess when I try to open it…

in image.php > change this line

$vacuum_log = 'http://192.168.1.198:3001/vacuum.log';

That worked!! Man, if I had just a small bit of your skill… Again, I really appreciate your time.

Now, it looks like I need to figure out why my floor.png file is all zoomed in and wrong.

Just takes time and practice :slight_smile:

make sure the floor.png file is the same dimensions as the height / width variables listed in image.php

also check the FAQ document, i added a new one recently for mapping tips which should help you out

I’m going through them now. In Section 7, it says - Delete the latest.png file in the vacuum directory (prevents image.php from displaying the cached file). However, I don’t have an image.php file. Am I missing something here?

image.php is in the vacuum directory? its the file you just edited to update $vacuum_log