home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.11k stars 29.79k forks source link

HASS does not start when it can not contact my roomba #16069

Closed jurgenweber closed 4 years ago

jurgenweber commented 6 years ago

I am reopening; https://github.com/home-assistant/home-assistant/issues/12019

Home Assistant release with the issue:

/srv/homeassistant/bin/python3 /srv/homeassistant/bin/hass --version
0.76.1
# /srv/homeassistant/bin/python3 --version
Python 3.5.3
# cat /etc/debian_version
9.4

Last working Home Assistant release (if known):

Operating environment (Hass.io/Docker/Windows/etc.): hassbian using hass-scripts, etc.

Component/platform: component/roomba

Description of problem: as per; https://github.com/home-assistant/home-assistant/issues/12019 I still see this issue.

Additional information: I have tried a few things to try and debug this. Firstly: TCP on the network is fine, I can ping and telnet to port 8883 and sometimes find it open.

two issues really:

odin6346 commented 6 years ago

I have the same issue too, only way to get the front-end to start is by commenting out the roomba component.

jurgenweber commented 5 years ago

I have worked out/debugged that only one thing can be connected to the roomba at a time on a TCP level. If you go and hold down the home/clean button on your unit for 10seconds and all of the icons start flash, the roomba will restart... then in the same moment start up HASS, it will work.

Still the main issue here is when it can not connect it should not stop HASS from starting/locking it up.. It should just fail and try again later.

jtscott commented 5 years ago

Me too, logs below:

2018-10-01 01:15:02 ERROR (SyncWorker_3) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused 
2018-10-01 01:15:02 ERROR (SyncWorker_3) [roomba.roomba.Roomba] Attempting new Connection# 1
2018-10-01 01:15:03 ERROR (SyncWorker_3) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused 
2018-10-01 01:15:03 ERROR (SyncWorker_3) [roomba.roomba.Roomba] Attempting new Connection# 2
2018-10-01 01:15:04 ERROR (SyncWorker_3) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused 
2018-10-01 01:15:04 ERROR (SyncWorker_3) [roomba.roomba.Roomba] Attempting new Connection# 3
2018-10-01 01:15:05 ERROR (SyncWorker_29) [concurrent.futures] exception calling callback for <Future at 0x7f6ef0d32eb8 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 417, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "uvloop/loop.pyx", line 1258, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 603, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 607, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 636, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed
2018-10-01 01:15:05 ERROR (SyncWorker_23) [concurrent.futures] exception calling callback for <Future at 0x7f6ef0e2ef28 state=finished returned NoneType>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 417, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "uvloop/loop.pyx", line 1258, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 603, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 607, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 636, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed
2018-10-01 01:15:07 ERROR (SyncWorker_22) [concurrent.futures] exception calling callback for <Future at 0x7f6ef0d32d30 state=finished raised RuntimeError>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/arlo.py", line 87, in hub_refresh
    dispatcher_send(hass, SIGNAL_UPDATE_ARLO)
  File "/usr/src/app/homeassistant/helpers/dispatcher.py", line 58, in dispatcher_send
    hass.loop.call_soon_threadsafe(async_dispatcher_send, hass, signal, *args)
  File "uvloop/loop.pyx", line 1258, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 603, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 607, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 636, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/_base.py", line 324, in _invoke_callbacks
    callback(self)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 417, in _call_set_state
    dest_loop.call_soon_threadsafe(_set_state, destination, source)
  File "uvloop/loop.pyx", line 1258, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 603, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 607, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 636, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed
2018-10-01 01:17:07 ERROR (Thread-5) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
2018-10-01 01:17:07 ERROR (Thread-5) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/util/async_.py", line 29, in asyncio_run
    return loop.run_until_complete(main)
  File "uvloop/loop.pyx", line 1442, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1435, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1344, in uvloop.loop.Loop.run_forever
  File "uvloop/loop.pyx", line 486, in uvloop.loop.Loop._run
  File "uvloop/loop.pyx", line 403, in uvloop.loop.Loop._on_idle
  File "uvloop/cbhandles.pyx", line 66, in uvloop.loop.Handle._run
  File "/usr/src/app/homeassistant/components/vacuum/roomba.py", line 99, in async_setup_platform
    yield from hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/roomba/roomba.py", line 283, in connect
    sys.exit(1)
SystemExit: 1
jtscott commented 5 years ago

@pschmitt would you mind taking a look at this one?

jurgenweber commented 5 years ago

interesting in the last few versions it starts now but now there are just these crazy loop errors and the whole thing just stops. Yeah, why jtscott has posted. Exactly like that.

glance- commented 5 years ago

My guess is that the wierd errors are because https://github.com/pschmitt/roombapy does odd sys.exit(1) on some failures. Thats kinda rude when used as a library.

ferdyvi commented 5 years ago

The problem is in the roomba library. I've fixed, installing all the missing requirements (start the roomba.py on a shell to see the detailed error message), then I've dowloaded and replaced the homeassistant roomba files with the https://github.com/NickWaterton/Roomba980-Python ones.

aderusha commented 5 years ago

I'm seeing the same behavior here too. Rebooted Hass, never came back, finally tracked it down to Roomba. Disabling all references to roomba from Hass returns everything to normal.

ferdyvi commented 5 years ago

Try to install the library that I've linked above

cmsimike commented 5 years ago

@ferdinandovivacqua I've tried: pip install --upgrade --force-reinstall git+https://github.com/NickWaterton/Roomba980-Python.git

however that did not seem to solve the issue. Still running into problems starting my hass instance with the roomba. Am I missing something?

cmsimike commented 5 years ago

For what it's worth, my specific issue, seemingly, was a stray hass process that didn't terminate before the upgrade. Killing off that process and restarting hass seemed to fix my roomba issue.

I also pressed the home button on my roomba then started hass, so unsure if that helped. I did try that before and it didn't. I think the stray hass process was my specific issue.

cmsimike commented 5 years ago

my home assistant now segfaults and won't start when my roomba component is active. if i remove it from my config, it starts up no problem

ferdyvi commented 5 years ago

@ferdinandovivacqua I've tried: pip install --upgrade --force-reinstall git+https://github.com/NickWaterton/Roomba980-Python.git

however that did not seem to solve the issue. Still running into problems starting my hass instance with the roomba. Am I missing something?

you have to replace the roomba.py in /deps/lib/python3.6/site-packages/roomba

balloobbot commented 5 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

cmsimike commented 5 years ago

For my case, I needed to rebuild the virtualenv hass was installed into and it fixed my roomba issue no problem

jtscott commented 5 years ago

Still broken for me on 0.89. I verified my connection by using the roomba pallet in node-red without any issue.

2019-03-07 14:53:07 ERROR (SyncWorker_31) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused
2019-03-07 14:53:07 ERROR (SyncWorker_31) [roomba.roomba.Roomba] Attempting new Connection# 1
2019-03-07 14:53:08 ERROR (SyncWorker_31) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused
2019-03-07 14:53:08 ERROR (SyncWorker_31) [roomba.roomba.Roomba] Attempting new Connection# 2
2019-03-07 14:53:09 ERROR (SyncWorker_31) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused
2019-03-07 14:53:09 ERROR (SyncWorker_31) [roomba.roomba.Roomba] Attempting new Connection# 3
2019-03-07 14:53:10 ERROR (SyncWorker_31) [roomba.roomba.Roomba] Error: [Errno 111] Connection refused
2019-03-07 14:53:10 ERROR (SyncWorker_31) [roomba.roomba.Roomba] Unable to connect
2019-03-07 14:53:10 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up platform roomba
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 "uvloop/loop.pyx", line 1440, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1433, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1342, in uvloop.loop.Loop.run_forever
  File "uvloop/loop.pyx", line 484, in uvloop.loop.Loop._run
  File "uvloop/loop.pyx", line 401, in uvloop.loop.Loop._on_idle
  File "uvloop/cbhandles.pyx", line 64, in uvloop.loop.Handle._run
  File "/usr/src/app/homeassistant/components/vacuum/roomba.py", line 91, 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 283, in connect
    sys.exit(1)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 409, in wait_for
    await waiter
concurrent.futures._base.CancelledError
2019-03-07 14:53:10 ERROR (MainThread) [homeassistant.helpers.entity] Update for alarm_control_panel.arlohub fails
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 "uvloop/loop.pyx", line 1440, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1433, in uvloop.loop.Loop.run_until_complete
  File "uvloop/loop.pyx", line 1342, in uvloop.loop.Loop.run_forever
  File "uvloop/loop.pyx", line 484, in uvloop.loop.Loop._run
  File "uvloop/loop.pyx", line 401, in uvloop.loop.Loop._on_idle
  File "uvloop/cbhandles.pyx", line 64, in uvloop.loop.Handle._run
  File "/usr/src/app/homeassistant/components/vacuum/roomba.py", line 91, 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 283, in connect
    sys.exit(1)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 348, in async_device_update
    await self.hass.async_add_executor_job(self.update)
concurrent.futures._base.CancelledError
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/src/app/homeassistant/util/logging.py", line 88, in _process
    self._queue.get(), self.loop).result()
  File "/usr/local/lib/python3.7/concurrent/futures/_base.py", line 430, in result
    raise CancelledError()
concurrent.futures._base.CancelledError

2019-03-07 14:53:12 ERROR (SubscribeMessageWorker) [pubnub] take message interrupted: Event loop is closed
Exception in thread SubscribeMessageWorker:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/site-packages/pubnub/workers.py", line 24, in run
    self._take_message()
  File "/usr/local/lib/python3.7/site-packages/pubnub/pubnub.py", line 352, in _take_message
    self._process_incoming_payload(msg)
  File "/usr/local/lib/python3.7/site-packages/pubnub/workers.py", line 84, in _process_incoming_payload
    self._listener_manager.announce_message(pn_message_result)
  File "/usr/local/lib/python3.7/site-packages/pubnub/managers.py", line 204, in announce_message
    callback.message(self._pubnub, message)
  File "/usr/local/lib/python3.7/site-packages/pubnubsubhandler.py", line 185, in message
    func(json.loads(json_data))
  File "/usr/src/app/homeassistant/components/wink/__init__.py", line 676, in _pubnub_update
    self.schedule_update_ha_state()
  File "/usr/src/app/homeassistant/helpers/entity.py", line 316, in schedule_update_ha_state
    self.hass.add_job(self.async_update_ha_state(force_refresh))
  File "/usr/src/app/homeassistant/core.py", line 246, in add_job
    self.loop.call_soon_threadsafe(self.async_add_job, target, *args)
  File "uvloop/loop.pyx", line 1256, in uvloop.loop.Loop.call_soon_threadsafe
  File "uvloop/loop.pyx", line 601, in uvloop.loop.Loop._call_soon
  File "uvloop/loop.pyx", line 605, in uvloop.loop.Loop._call_soon_handle
  File "uvloop/loop.pyx", line 634, in uvloop.loop.Loop._check_closed
RuntimeError: Event loop is closed

/usr/local/lib/python3.7/threading.py:951: RuntimeWarning: coroutine 'Entity.async_update_ha_state' was never awaited
  del exc_type, exc_value, exc_tb
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
cmsimike commented 5 years ago

@jtscott I know roombas only allow one MQTT connection. Are you 100% sure nothing is connecting to your roomba via mqtt?

If you change the connection from being direct to cloud, does it work?

jtscott commented 5 years ago

Hi @cmsimike the component will connect to the roomba I estimate 1/50 times and start successfully. However after 1-2 hours HASS will crash with the same previous log messages. I also forced continuous mode in yaml (even though that is default) and had the same results last night unfortunately. Worked for a few hours then crashed, or just refused to start HASS.

cmsimike commented 5 years ago

Error: [Errno 111] Connection refused

To me, this sounds like some contention between your roomba's connections. If you're sure nothing is connecting to the roomba, try factory resetting it? If hass says it can't connect to your roomba, then there is something up with the roomba that is preventing connection. I don't think there is anything on hass' side that can change that.

cbulock commented 5 years ago

Regardless of the cause of why Home Assistant can't connect to the Roomba, it doesn't seem like failure to connect should cause Home Assistant to fail to boot.

jtscott commented 5 years ago

@cmsimike Not really the case, I can integrate with node-red-contrib-roomba980-fw2 consistently while still using the irobot app. And as @cbulock mentioned it shouldn't crash a running HASS or prevent HASS from starting.

cmsimike commented 5 years ago

I was specifically focusing on the inability to connect since that was the debugging discussion we were having (and i never suggested we close this issue otherwise), but I agree that hass should not crash in this case.

cmsimike commented 5 years ago

@jtscott You can have two kinds of connections - one uses MQTT, the other uses cloud. Once something connects to the roomba's MQTT then nothing can directly and must go through the cloud.

I currently have my hass instance setup to directly connect to MQTT and my app uses the cloud. It probably won't surprise me to find out the nodered thing uses the available mqtt slot which is causing your hass issue.

GuitarSkater commented 5 years ago

Is this still an issue you are experiencing? Can you please try upgrading to the latest version of Home Assistant (0.90) and report back if this is still a problem? Thanks!

manos commented 5 years ago

Confirmed, the roomba library is still causing an exit(). This just started happening for me, and I'm on 0.91.3 now.

GuitarSkater commented 5 years ago

Confirmed, the roomba library is still causing an exit(). This just started happening for me, and I'm on 0.91.3 now.

how do you have your roomba set up? I just purchased an i7 roomba over the weekend, and all of mine are still communicating fine and listening to app commands and node-red automations with ver 91.4

cbulock commented 5 years ago

@GuitarSkater have you had issues when the Roomba is dead? This issue occurs when the Roomba is offline

GuitarSkater commented 5 years ago

@cbulock well that makes sense. I personally havent experienced any issues like that in the past year. if and when one of the roomba's die (I have a 690, 960, and an i7) I get the typical "entity not found" in HA. Even when reloading the pi that HA is running on and a roomba is dead or didnt make it back to the charger, i have never had it not boot up all the way. I really havent seen it spaz out with the exception of using the app to factory reset it, and then having to get the new blid. Im starting to wonder if its the koalazak or dorita980 mod not being loaded correctly or communicating with HA in the right fashion.

aLTeReGo-SWI commented 5 years ago

I'm also having this issue with Roomba running HA 92.2. I was able to boot by adding 'continuous: false' to my 'Vacuum' configuration. However, while HA will boot Roomba is 'unresponsive' in the Home Assistant. Roomba works through both the native app, as well as Alexa though. Any idea why this stopped working in HA or how to fix it?

chilman408 commented 5 years ago

having the same issue with roomba i7 on HA. hope this gets fixed soon...cannot connect to roomba at all

brianewman commented 5 years ago

I have a fix for this, but I'm not sure where to submit it.

Edit /usr/local/lib/python3.7/site-packages/roomba/roomba.py and change two instances of PROTOCOL_TLSv1 to PROTOCOL_TLS

The fix seems to be needed in NickWaterton/Roomba980-Python but HA is using an old version of that. Do we need to open an issue there and then fix this issue by upgrading the version used in HA? Or is there a reason we're not using the latest version of NickWaterton/Roomba980-Python?

jurgenweber commented 5 years ago

The fix seems to be needed in NickWaterton/Roomba980-Python but HA is using an old version of that. Do we need to open an issue there

I would think so.

and then fix this issue by upgrading the version used in HA?

Yes

Or is there a reason we're not using the latest version of NickWaterton/Roomba980-Python?

That is a good question, I think components have code owners that can be pinged.. Not sure.

aLTeReGo-SWI commented 4 years ago

I'm having the same issue with HASS 0.98

2019-09-13 20:42:53 ERROR (SyncWorker_9) [roomba.roomba.Roomba] Error: [Errno 104] Connection reset by peer 
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
2019-09-13 20:42:58 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up platform roomba
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
  File "/usr/src/homeassistant/homeassistant/components/roomba/vacuum.py", line 108, in async_setup_platform
    await hass.async_add_job(roomba.connect)
  File "/usr/local/lib/python3.7/site-packages/roomba/roomba.py", line 283, in connect
caseyburkhardt commented 4 years ago

@brianewman Great find! PROTOCOL_TLSv1 -> PROTOCOL_TLS did the trick for me after a great deal of searching and prodding.

I would be great to get some clarity on how to get this patched officially. Seems like folks have been shouting into a void for a while on this.

chilman408 commented 4 years ago

@brianewman Great find! PROTOCOL_TLSv1 -> PROTOCOL_TLS did the trick for me after a great deal of searching and prodding.

I would be great to get some clarity on how to get this patched officially. Seems like folks have been shouting into a void for a while on this.

I would appreciate this as well. I'm using a Hassio virtualbox image and there is no documentation on even how to logon so I can't do anything....

dshokouhi commented 4 years ago

it looks like the parent library that HA uses has this fix already: https://github.com/pschmitt/roombapy/blob/master/roomba/roomba.py#L261

Someone here should test the latest version and submit a PR to HA to bump the library after testing it.

Edit: sorry had the protocols switched, submit a PR to that library and once published to pypi bump the library in HA.

GuitarSkater commented 4 years ago

I am going to check it out. I never had issues until version .100.x

brianewman commented 4 years ago

@dshokouhi, I don't see the fix in the parent library. It still has PROTOCOL_TLSv1.

nullvar2000 commented 4 years ago

So, changing those two lines didn't fix the problem for me. Did you do anything else, besides restarting HA? I set continuous to false and at least HA will start, but the Roomba just shows up as unavailable.

brianewman commented 4 years ago

Since I don't know how to get this patched officially, I started looking for an automated way to apply the fix whenever my HA container is rebuilt (upgrades, etc.).

I'm currently running HA under docker with compose, so I added the following to the home-assistant section in my docker-compose.yml file. The sed command removes the "v1" on the two TLS lines.

    command: bash -c "sed -i -E \"s/_TLSv1/_TLS/g\" `find / -name roomba.py -print` && python3 -m homeassistant --config /config"

The whole section looks like this:

  homeassistant:
    container_name: home-assistant
    image: homeassistant/intel-nuc-homeassistant:stable
    volumes:
      - homeassistant:/config
    environment:
      - TZ=America/Chicago
    restart: always
    network_mode: host
    command: bash -c "sed -i -E \"s/_TLSv1/_TLS/g\" `find / -name roomba.py -print` && python3 -m homeassistant --config /config"
caseyburkhardt commented 4 years ago

It appears that HA has been updated to use roombapy 1.4.2. My upgrade to 0.103.0 went smoothly, and HA came back up without the need for any manual patching.

glance- commented 4 years ago

I grew tired and fixed sys.exit thingie: https://github.com/pschmitt/roombapy/commit/8d72854445e470f75f3321164cd0eca9a3e0be76

stale[bot] commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.