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

Roomba Intergration - Unable to connect to Roomba #94419

Open poelleke opened 1 year ago

poelleke commented 1 year ago

The problem

I am trying to add the Roomba integration. I had to find the password myself for this. but when I enter this I get the message that it cannot connect.

What version of Home Assistant Core has the issue?

core-2023.6.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

iRobot Roomba and Braava

Link to integration documentation on our website

https://www.home-assistant.io/integrations/roomba/

Diagnostics information

2023-06-11 09:06:24.799 INFO (roombapy) [roombapy.remote_client] Connecting to 192.168.1.16, attempt 1 of 3 2023-06-11 09:06:25.585 INFO (Thread-1763 (_thread_main)) [roombapy.roomba] Connecting to Roomba 192.168.1.16 2023-06-11 09:06:25.585 ERROR (Thread-1763 (_thread_main)) [roombapy.roomba] Roomba 192.168.1.16 connection error, code Bad username or password 2023-06-11 09:06:25.586 WARNING (Thread-1763 (_thread_main)) [roombapy.roomba] Unexpectedly disconnected from Roomba 192.168.1.16, code Not authorised 2023-06-11 09:06:26.070 INFO (roombapy) [roombapy.remote_client] Connecting to 192.168.1.16, attempt 1 of 3 2023-06-11 09:06:27.368 INFO (Thread-1764 (_thread_main)) [roombapy.roomba] Connecting to Roomba 192.168.1.16 2023-06-11 09:06:27.368 ERROR (Thread-1764 (_thread_main)) [roombapy.roomba] Roomba 192.168.1.16 connection error, code Bad username or password 2023-06-11 09:06:27.369 WARNING (Thread-1764 (_thread_main)) [roombapy.roomba] Unexpectedly disconnected from Roomba 192.168.1.16, code Not authorised 2023-06-11 09:06:27.908 INFO (roombapy) [roombapy.remote_client] Connecting to 192.168.1.16, attempt 1 of 3 2023-06-11 09:06:29.173 INFO (Thread-1765 (_thread_main)) [roombapy.roomba] Connecting to Roomba 192.168.1.16 2023-06-11 09:06:29.173 ERROR (Thread-1765 (_thread_main)) [roombapy.roomba] Roomba 192.168.1.16 connection error, code Bad username or password 2023-06-11 09:06:29.174 WARNING (Thread-1765 (_thread_main)) [roombapy.roomba] Unexpectedly disconnected from Roomba 192.168.1.16, code Not authorised 2023-06-11 09:06:29.662 INFO (roombapy) [roombapy.remote_client] Connecting to 192.168.1.16, attempt 1 of 3 2023-06-11 09:06:31.581 INFO (roombapy) [roombapy.remote_client] Connecting to 192.168.1.16, attempt 1 of 3 2023-06-11 09:06:31.738 ERROR (roombapy) [roombapy.remote_client] Can't connect to 192.168.1.16, error: [Errno 111] Connection refused 2023-06-11 09:06:31.738 INFO (roombapy) [roombapy.remote_client] Connecting to 192.168.1.16, attempt 2 of 3 2023-06-11 09:06:31.741 ERROR (roombapy) [roombapy.remote_client] Can't connect to 192.168.1.16, error: [Errno 111] Connection refused 2023-06-11 09:06:31.741 INFO (roombapy) [roombapy.remote_client] Connecting to 192.168.1.16, attempt 3 of 3 2023-06-11 09:06:31.750 ERROR (roombapy) [roombapy.remote_client] Can't connect to 192.168.1.16, error: [Errno 111] Connection refused 2023-06-11 09:06:31.750 ERROR (roombapy) [roombapy.remote_client] Unable to connect to 192.168.1.16 2023-06-11 09:06:31.751 WARNING (roombapy) [roombapy.roomba] Unexpectedly disconnected from Roomba 192.168.1.16, code Unable to connect to Roomba at 192.168.1.16

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

klavergne commented 8 months ago

I have a Roomba i7, and I have not had issues until recently. It was appearing in HA as normal, and still is. But when I press the "clean" button in the HA dashboard, it does nothing. I turned on debug logs in the iRobot integration and reloaded it, and I got a lot of errors in the logs. Below is what I got:

2024-01-15 09:08:00.107 DEBUG (SyncWorker_2) [roombapy.remote_client] Setting TLS certificate
2024-01-15 09:08:00.108 DEBUG (SyncWorker_2) [roombapy.roomba] CONTINUOUS connection
2024-01-15 09:08:00.112 DEBUG (MainThread) [homeassistant.components.roomba] Initialize connection to vacuum
2024-01-15 09:08:00.115 INFO (SyncWorker_11) [roombapy.remote_client] Connecting to {IP address}, attempt 1 of 3
2024-01-15 09:08:00.209 ERROR (SyncWorker_11) [roombapy.remote_client] Can't connect to {IP address}, error: [Errno 111] Connection refused
2024-01-15 09:08:00.209 INFO (SyncWorker_11) [roombapy.remote_client] Connecting to {IP address}, attempt 2 of 3
2024-01-15 09:08:00.214 ERROR (SyncWorker_11) [roombapy.remote_client] Can't connect to {IP address}, error: [Errno 111] Connection refused
2024-01-15 09:08:00.215 INFO (SyncWorker_11) [roombapy.remote_client] Connecting to {IP address}, attempt 3 of 3
2024-01-15 09:08:00.221 ERROR (SyncWorker_11) [roombapy.remote_client] Can't connect to {IP address}, error: [Errno 111] Connection refused
2024-01-15 09:08:00.221 ERROR (SyncWorker_11) [roombapy.remote_client] Unable to connect to {IP address}
2024-01-15 09:08:00.223 DEBUG (MainThread) [homeassistant.components.roomba] Error to connect to vacuum: Unable to connect to Roomba at {IP address}

That just keeps repeating in the logs, because it tried to reload the integration repeatedly.

I have been trying to get a list of all the "room ids" (I don't remember what they are actually called) for the rooms in my house, so that I can use HA to start vacuuming individual rooms. I had been able to use dorita980 to do that until a couple of days/months ago. (I had not tried for a while until last week.) Now I can't get it to connect. I get the same "connection refused" error directly from dorita980. (I'm not sure what the relationship is between this HA integration and that project, if there is one, but I thought I would mention it, since the results are the same. I have also submitted an issue to that project.)

Roomba i7 Software Version: 22.52.10

kotasd commented 6 months ago

Is this issue even being worked? It appears to be known problem for quite some time with lots of potential workarounds that seem to not work in the end. Same issues with J5.

Orhideous commented 6 months ago

Is this issue even being worked?

@kotasd Yes, right now (no joke).

kotasd commented 6 months ago

Is this issue even being worked?

@kotasd Yes, right now (no joke).

Great, I was about to just write off my Roomba being HA controlled.

aBlindReefer commented 5 months ago

I’m not able to connect a j7+ either (Latest haos). I’ve tried the Roomba980 repository instructions as well. Not complaining and I appreciate the time and effort that goes into these things but just for comparison (just for reference as they were able to get through whatever changes happened with this model) the Homeseer plugin asks for your iRobot account user name and password at startup (not blid and password). This would be a nice addition as opposed to having to use ssh/terminal, python, and additional GitHub repositories to enter this information.

ObJuanK commented 5 months ago

I was able to connect to and issue commands to my J7+ using dority 980 this repo to get the BLID and password. From my computer I created a myapp.js file as the repo suggests and I was able to issue it a command to clean and dock etc... Using the same password in HA I get a "Failed to connect" error identical to this

Not really helpful I dont think, but some log entries from HA during the attempt

2024-03-22 19:45:51.977 ERROR (roombapy) [roombapy.remote_client] Can't connect to 10.55.100.17
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/roombapy/remote_client.py", line 80, in connect
    self._open_mqtt_connection()
  File "/usr/local/lib/python3.12/site-packages/roombapy/remote_client.py", line 108, in _open_mqtt_connection
    self.mqtt_client.reconnect()
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1044, in reconnect
    sock = self._create_socket_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/socket.py", line 852, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.12/socket.py", line 837, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
Dommify01 commented 5 months ago

Good morning, any news on integration with the J9+? I see that the problem remains, failure to change the password... Any ideas?

quadcom commented 5 months ago

Just posted this in another thread, similar situation.

https://github.com/home-assistant/core/issues/112544#issuecomment-2048024362

RonaldvE commented 3 months ago

I figured out my problem. I was not allowing UDP traffic on my firewall. After I corrected that issue, I was able to get it to connect.

This solved it for me as well! Forwarding for Port 443 was set as TCP only and after allowing Both (TCP and UDP) my Roomba 980 connected instantly!

quadcom commented 3 months ago

I figured out my problem. I was not allowing UDP traffic on my firewall. After I corrected that issue, I was able to get it to connect.

This solved it for me as well! Forwarding for Port 443 was set as TCP only and after allowing Both (TCP and UDP) my Roomba 980 connected instantly!

I'm confused, what are you forwarding 443 to? The vac? Your HA server? Why would opening your FW to HTTPS traffic allow internal network traffic to get this working. This makes no sense.

aarnaegg commented 3 months ago

I'll give this a try today. For months I have still not been able to connect my J9+ to HA. HA can see it, but can never connect.

tuupos commented 2 months ago

Solution found for J7/J9

https://github.com/home-assistant/core/issues/112544#issuecomment-2211699957