iRobot Roomba

@davejcameron any chance in getting the rest of the IR codes

I like that the new Roomba models can be controlled by voice, very cool.
I read about it in a blog Roomba and bought one =)

@xstrex Got a 896 and had issues with the missing bin_full attribute as well.
I managed to find the problem: the roomba script checks for the entry “binFullDetect” in the capabilities, which is missing. Therefore it does not read out the entry “full” from the bin states, which does exist.

I’m not sure what to make out of all those entries in the capabilities, so as a quick fix, I just made a custom component for roomba and removed this check.

Hello,

I’m getting the same error (Error 2 No such file or directory) but your fix has already been implemented…any ideas?

I’m running roomba i7

I would love this for my Shark Ion robot :frowning:

Looks like HA’s Roomba platform relies on roombapy v1.3.1 (reference, unless I’m mistaken) which hasn’t been updated since August 2017, so it doesn’t include @gooorooo’s fix.

Unless you follow the instructions to update your virtualenv manually, I think the only way to fix is for @pschmitt to update roombapy on PyPI to include the latest changes from Roomba980-Python. I’m not exactly sure how easy that would be since I don’t know what changes went into his fork.

All that said, others seem to be using it fine, though perhaps that is with an older version of HA. I’m on 0.83.1 and still see the [Errno 2] No such file or directory error when I add the Roomba platform to my config file.

after installing all dependencies, as suggested by @gooorooo, i copied /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/components/vacuum/roomba.py (that’s an os x path, change accordingly) into custom_components/vacuum/roomba.py and changed the requirements to

REQUIREMENTS = ['https://github.com//NickWaterton/Roomba980-Python/zipball/master#roomba==1.2.3']

this works for me, though i’m still on homeassistant version 0.75.3. before this change i also got the FileNotFoundError while using the standard component.

also, as suggested here, adding

    roomba.enable_map(
        enable=True, mapSize="(800,1650,-300,-50,2,0)", 
        enableMapWithText=False, roomOutline=False,
        mapPath="/Users/ix/.homeassistant/www/markus/", 
        iconPath="/Users/ix/.homeassistant/www/markus/res"
    )

right after the Roomba() handler is created, works for me: the original library Roomba980-Python now also creates a map for me.

I am using https://www.home-assistant.io/components/vacuum.roomba/ component and I see in the log that it connects roomba every 5 seconds, when I set “continuous: false”, then it still connecting every 5 seconds to roomba to check status. I don’t want to check every 5 seconds the status of roomba. Is there any possibility to set status interval?

2 Likes

This seemed to fix it for me: Continuous Updates from Roomba, should be periodic

it would be nice if this will be fixed inside component self, next update you will lose all your changes :wink:

Have you happened to have upgraded home assistant? I’m on the latest and can’t get this to work. I have followed your steps and see the custom component get loaded. I even see home assisant getting data from my roomba. The issue is though that my home assistant gui won’t come up when I have roomba enabled.

Can you share your roomba.py so I can ensure mine looks the same?

Thanks!

i’m still on HA 0.75.3, this is my roomby.py (which i extended slightly):

Thank you so much for this. Your version looks great but it causes the same issue for me. I can see it connect to the vacuum then locks up my home assistant. Any suggestions on how to view better debug logs? I am not sure if this is an issue with the latest home assistant or something unique in my setup.

Edit: I spun up a test docker version of the latest home assistant and it works there. There has to be something funky with my setup but I have no clue what.

Fixed my issue by installing ‘apt install python3-opencv’ outside my venv.

does anyone know what all the possible ‘statuses’ are for the roomba?

thanks

2 Likes

Has anybody managed to get a working cleaning map on Hassio/RPi?
I’m not sure how to satisfy the dependencies suggested in this thread

  • run pip install in the homeassistant container or
  • provide all binaries in a custom_component

all of a sudden yesterday, my HASS can not connect to my Roomba; Lots of errors and it completely breaks the HASS restart. I have had to disable the device in my config.

2019-08-04 12:18:03 ERROR (SyncWorker_9) [roomba.roomba.Roomba] Attempting new Connection# 1
2019-08-04 12:18:04 ERROR (SyncWorker_9) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused
2019-08-04 12:18:04 ERROR (SyncWorker_9) [roomba.roomba.Roomba] Attempting new Connection# 2
2019-08-04 12:18:05 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform arlo is taking over 10 seconds.
2019-08-04 12:18:05 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform yr is taking over 10 seconds.
2019-08-04 12:18:05 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform transport_nsw is taking over 10 seconds.
2019-08-04 12:18:05 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform systemmonitor is taking over 10 seconds.
2019-08-04 12:18:05 ERROR (SyncWorker_9) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused
2019-08-04 12:18:05 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform darksky is taking over 10 seconds.
2019-08-04 12:18:05 ERROR (SyncWorker_9) [roomba.roomba.Roomba] Attempting new Connection# 3
2019-08-04 12:18:05 ERROR (MainThread) [homeassistant.components.yr.sensor] Retrying in 17 minutes:
2019-08-04 12:18:05 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error in data received
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 207, in feed_ssldata
    self._sslobj.unwrap()
  File "/usr/local/lib/python3.7/ssl.py", line 767, in unwrap
    return self._sslobj.shutdown()
ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2609)
2019-08-04 12:18:06 ERROR (SyncWorker_9) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused
2019-08-04 12:18:06 ERROR (SyncWorker_9) [roomba.roomba.Roomba] Unable to connect
2019-08-04 12:18:06 ERROR (MainThread) [homeassistant.setup] Error during setup of component light
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 153, in _async_setup_component
    hass, processed_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/light/__init__.py", line 246, in async_setup
    await component.async_setup(config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 112, in async_setup
    await asyncio.wait(tasks)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 363, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 456, in _wait
    await waiter
concurrent.futures._base.CancelledError
2019-08-04 12:18:07 ERROR (MainThread) [homeassistant.setup] Error during setup of component cover
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 153, in _async_setup_component
    hass, processed_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/cover/__init__.py", line 100, in async_setup
    await component.async_setup(config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 112, in async_setup
    await asyncio.wait(tasks)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 363, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 456, in _wait
    await waiter
concurrent.futures._base.CancelledError
2019-08-04 12:18:07 ERROR (MainThread) [homeassistant.components.sensor] darksky: Error on device update!
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 380, in async_device_update
    await self.hass.async_add_executor_job(self.update)
concurrent.futures._base.CancelledError
2019-08-04 12:18:07 ERROR (MainThread) [homeassistant.components.sensor] darksky: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 571, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1775, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/roomba/vacuum.py", line 84, 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 "/srv/homeassistant/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
    sys.exit(1)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 366, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2019-08-04 12:18:08 ERROR (MainThread) [homeassistant.components.sensor] darksky: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 571, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1775, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/roomba/vacuum.py", line 84, 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 "/srv/homeassistant/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
    sys.exit(1)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 366, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError
2019-08-04 12:18:08 ERROR (MainThread) [homeassistant.setup] Error during setup of component sensor
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 571, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1775, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/roomba/vacuum.py", line 84, 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 "/srv/homeassistant/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
    sys.exit(1)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/setup.py", line 153, in _async_setup_component
    hass, processed_config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/sensor/__init__.py", line 42, in async_setup
    await component.async_setup(config)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_component.py", line 112, in async_setup
    await asyncio.wait(tasks)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 363, in wait
    return await _wait(fs, timeout, return_when, loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 456, in _wait
    await waiter
concurrent.futures._base.CancelledError
2019-08-04 12:18:08 ERROR (MainThread) [homeassistant.components.sensor] darksky: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 571, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1775, in _run_once
    handle._run()
  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/roomba/vacuum.py", line 84, 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 "/srv/homeassistant/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
    sys.exit(1)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 366, in async_device_update
    await self.parallel_updates.acquire()
  File "/usr/local/lib/python3.7/asyncio/locks.py", line 474, in acquire
    await fut
concurrent.futures._base.CancelledError```

I moved my confiiguation from a pi to a mac mini (right now on 0.97.2) and started getting this, complete with the HA startup crash described by others. I tried @diplix’s solution involving putting the forked roomba.py into <config>/custom_components/vacuum and it didn’t work.
Could this actually be a permissions problem or missing directory? I ask because moving from a Pi where it was working fine to a different platform caused the issue.

I actually was using a Mac Mini when I ran into the issue as well. I migrated to a Docker install a few months back, and when I added my Roomba it all worked fine.

Interesting! Must be something about the file structure or maybe a missing dependency.