Error attempting to add Roomba integration

I just got a new Roomba i6 and I was delighted to see that there’s a HA integration for it. Unfortunately when I attempted to add the integration and set up my Roomba, I got errors during installation.

When I click “Add Integration” it seems to start the installation process successfully. During the “Connect Device” process, it is able to find my new Roomba so I can select it as a host from the drop-down list. It then asks me to hold down the home button on the Roomba and then hit submit. After following the instructions and clicking submit, the integration setup displays an “unknown error occurred” message and will not let me proceed further.

I figured I would try to do the manual setup, so I attempted to follow the documentation and some tips found at this forum post in order to extract my BLID and password. From the command line on my HA server, I attempted to run the roomba-password command from the roombapy package, and it throws the errors below:

(homeassistant) [user@localhost]/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/roombapy% roomba-password <ROOMBA IP>
Roomba have to be on Home Base powered on.
Press and hold HOME button until you hear series of tones.
Release button, Wi-Fi LED should be flashing
Press Enter to continue...
Traceback (most recent call last):
  File "/home/homeassistant/srv/homeassistant/bin/roomba-password", line 8, in <module>
    sys.exit(password())
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/roombapy/entry_points.py", line 30, in password
    roomba_password = RoombaPassword(roomba_ip)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/roombapy/getpassword.py", line 17, in __init__
    self.server_socket = _get_socket()
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/roombapy/getpassword.py", line 76, in _get_socket
    ssl_socket = ssl.wrap_socket(
  File "/usr/local/lib/python3.8/ssl.py", line 1404, in wrap_socket
    context.set_ciphers(ciphers)
ssl.SSLError: ('No cipher can be selected.',)

I assume this is the error that the integration setup GUI is hitting. I’ve seen some forum posts that post similar errors, but not quite the same, and none seem to solve the issue. Any ideas regarding this problem? Information regarding my setup is below.

HA version: 2021.2.3
Python version: 3.8.0
OS version: Running in CentOS 7 Linux in a Python venv
Roomba model: Roomba i6 (equivalent to i7)
Roomba firmware: 3.10.8

Thanks!

One quick follow-up – below is the output in my HA log, which seems to confirm that HA is experiencing the same error during setup that I do when I attempt to manually run the roomba-password script. Perhaps this is a new bug? Or an issue with the integration and Python 3.8, or with the latest Roomba firmware?

Logger: aiohttp.server
Source: components/roomba/config_flow.py:206
First occurred: 6:25:14 PM (56 occurrences)
Last logged: 7:04:13 PM

Error handling request
Traceback (most recent call last):
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
    return await handler(request)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 169, in post
    return await super().post(request, flow_id)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 106, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 155, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 213, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/homeassistant/components/roomba/config_flow.py", line 206, in async_step_link
    RoombaPassword(self.host).get_password
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/roombapy/getpassword.py", line 17, in __init__
    self.server_socket = _get_socket()
  File "/home/homeassistant/srv/homeassistant/lib/python3.8/site-packages/roombapy/getpassword.py", line 76, in _get_socket
    ssl_socket = ssl.wrap_socket(
  File "/usr/local/lib/python3.8/ssl.py", line 1404, in wrap_socket
    context.set_ciphers(ciphers)
ssl.SSLError: ('No cipher can be selected.',)

Just updated to HA 2021.3.2 on the chance that it might fix the Roomba issue. Unfortunately it did not, so I thought I’d bump this to see if anyone might have still have the same problem.

(note the update to 2021.3.2 appears to have broken some other things, like cloud and mobile_app fail during startup, myq fails during startup, ffmpeg does not start…so all in all, not a great update, but issues for another ticket I suppose)

On the brighter side (?), I wasn’t alone with my cloud and mobile_app errors after my recent HA update; apparently this happened to at least a few people. Luckily the solution to that issue appears to be manually updating the aiohttp package:

pip3 install --force-reinstall aiohttp

Thanks to the conversation at 2021.3: My Oh My.

Still no fix for the Roomba though. Any help there would be appreciated!

roombapy maintainer here.

Can you hop on GitHub, where we have created an issue for this on your behalf?

I do not monitor the forums, so please respond to me on GitHub, and not here.

We’d need some more info from you to debug this:

  • Roomba firmware version
  • the exact command run
  • what environment are you using? HASS OS? Home Assistant container? Python & venv?
  • do you get a similar error when using dorita980 for example to retrieve your credentials?

Hi, roombapy contributor here :slight_smile:
In file roombapy/getpassword.py line 84 has

ciphers="DEFAULT@SECLEVEL=1",

Change this line to one of this options:

ciphers="DEFAULT@SECLEVEL=1,AES128-SHA"
ciphers="DEFAULT@SECLEVEL=3"
ciphers="DEFAULT:!DH"

Then try to get password for your Roomba as usual.
Tell us (better on github) does it work at all? If yes, which option?

Thanks for the suggestions! I replied on the Github, but to summarize here as well:

Two of the changes recommended by @freekode did not work (same errors), but the following modification did:

ciphers="DEFAULT:!DH"

With this change, I was able to get the integration to work, and I was able to add my Roomba. The conversation continues on the Github issue.

The only problem at this moment is that iRobot has pushed firmware 2.x, and since this release they have changed the communication protocol completely. The iRobot vacuum for pet hair is now using MQTT in stead of HTTP with firmware 1.x.

There are more people looking for a solution… elsewhere.

I’m also having a problem with this integration - I manage to set-up properly, manually retrieving the password via the python script. State seems to be refreshed on initial config, and on any reconfigure after that (continuous or not, doesn’t matter) - but NEVER after that, or between configurations. I’m seeing these errors logs:

Logger: roombapy.roomba
Source: /usr/local/lib/python3.9/site-packages/roombapy/roomba.py:166
First occurred: 4:16:49 PM (1 occurrences)
Last logged: 4:16:49 PM

Unexpectedly disconnected from Roomba 192.168.1.161, code Unable to connect to Roomba at 192.168.1.161
Logger: roombapy.remote_client
Source: /usr/local/lib/python3.9/site-packages/roombapy/remote_client.py:63
First occurred: 4:16:49 PM (1 occurrences)
Last logged: 4:16:49 PM

Unable to connect to 192.168.1.161

@pschmitt @freekode - any idea?

Hi All,

I recently had to factory reset my Roomba and Braava and when I did, it forced me to re-add them to the Android app. When I did that, it broke the HA integration, so I deleted the integration and after a restart, it discovered the newly reset robots.

image

If I click on Configure, it then says it couldn’t find a robot and asks me to manually configure:

When I click on Submit, it eventually throws an error:

I’ve tried rebooting the robots just before I try to add them. Anyone have any ideas?

+1

Same issue here, starting this past week. Have a Braava and a Roomba. Seeing this with the Roomba 7.

I should have included my model. Both Braava and Roomba are M6 series.

After rebooting both the Roomba and HA, and then letting it sit overnight, the problem resolved. It was able to successfully connect. It was wierd, because for the hour immediately after reboot, it still was having issues.

Hopefully you have similar luck…

facing same issue, rebooted both device, no luck… Let see it tommorow! Any logs that i can check? HA log ha nos entries regarding that.

I’m having the exact same problem and same symptoms, any luck chasing down a solution?

I’m having similar issues with a new Roomba i4, using HA 2023.7.2 in a docker container. Used the Roomba980 python script to retrieve my BLID & pw, but I can’t seem to get the HA integration to add properly. Tried waiting overnight to no avail. I’ll give it another ~day and try again.

Tried again a few times today, following the instructions each time to no avail. I’d press and hold the Home + Spot Clean buttons until it played a sound, with a steady blue ring around the main Clean button. And I ensured the Roomba app was hard-quit from my phone and also my wife’s phone before each attempt. Config would fail to retrieve the device pw itself, then prompt me for the pw. I’d submit that, then inevitably be told it couldn’t connect.

I then reset the device by pushing & holding the main Clean button for ~15s. Waited ~2min for it to reboot, then gave it another shot once it played the startup sound.

However, this time I triggered the HA configuration without pressing and holding the Home + Spot Clean buttons first. The main Clean button displayed a solid white ring when I triggered this attempt. Config prompted me for the device pw, which I entered, then promptly gasped as it successfully connected and added the Roomba to my integrations.

I now have both Roomba sensors (battery and bin status) available in HA. Hopefully this helps someone else!

Roomba i4, firmware v2.4.7

Hi,

I have the same issue with with Roomba 965 (firmware 2.4.17)
I tried nearly everything, for hours, cant do anything…

I go to integration, add roomba
It find my device
I click on it, and then, whatever I do, i will allways end with “unkown error”
I could get my password with dorita980, but i cant get the promt asking for it in HA.

I tried rebooting my router, HA, the roomba
I tried pressing home, home+spot, or nothing
I tried adding the conf in configuration.yaml (unfortunatly, HA asked me to remove it and go through the integration)

I tried nearly everything I read (including this thread), It will always end with “unkown error” …

Roomba 965, firmware 2.4.17-138
HA Core 2024.2.1
OS 11.5

1 Like

Same for me, exact same model.
I got the password ready but always get the “unknown error occured” message.

It worked fine in Openhab.

Just in case anyone hasn’t seen it, there are some known issues with the Roomba integration and the latest version of HA (2024.2.3). It’s possible this issue is causing the latest round of problems for some of the folks here. The issue has supposedly been fixed and will be included in the next HA release (for reference see iRobot Roomba and Braava Integration doesn't work after update to 2024.2.3 · Issue #111210 · home-assistant/core · GitHub).