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
73.52k stars 30.71k forks source link

Roomba 980 #117039

Open Chauvis opened 6 months ago

Chauvis commented 6 months ago

The problem

Hello, Sorry for my broken english I can't add a roomba 980 to the integration. the password is not automatically recovered and when I enter the one recovered with the BLID, home assistant tells me connection failure. Thank you

What version of Home Assistant Core has the issue?

Core

What was the last working version of Home Assistant Core?

Core-2024.5.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Roomba

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 6 months ago

Hey there @pschmitt, @cyr-ius, @shenxn, @xitee1, @orhideous, mind taking a look at this issue as it has been labeled with an integration (roomba) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `roomba` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign roomba` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


roomba documentation roomba source (message by IssueLinks)

ransombot commented 6 months ago

You will need to pair your roomba with the phone application and setup an account/password with irobot. Then you

 ./password.py <login> <password>

from https://github.com/NickWaterton/Roomba980-Python That being the email and password you just created.

Then you grab only the letters from the password line..

Obfuscated example:

       "password": ":1:234567890:aBcDeFgHiKl",

Your password would be aBcDeFgHiKl

I may be misremembering and it includes 23456890 I was throwing spaghetti at the wall and don't remember what I literally just did. I do know that it didn't work till after I did the reset the wifi with the buttons per the prompting but only after having entered the password. It could have been my phone timed out though.. Might turn it off when trying to set it up or fully uninstall the app to be sure it's not hanging on in the background it will break it if it's running.

Not everything like the documentation https://www.home-assistant.io/integrations/roomba/#manually-retrieving-your-credentials shows.

Note if is already registered you will have to reset the firmware by pressing all 3 buttons for about 10 seconds, then pair the app by pressing the 2 buttons listed (home and spot clean), Might need to repeat that a few times till the app sees it and prompts you again to reset the firmware and it will communicate properly for the password script to function as 980+ models need an updated firmware to communicate as the SSH was expired.

scyto commented 5 months ago

@ransombot i am hitting same issue with a R98---- aka 980 (i have added a j755020 and i755020 and j655020 just fine) and whether i use the one you suggested or https://github.com/koalazak/dorita980 the password returned from the cloud login for the 980 just doesn't work with the integration; note the 980 was working in the past too, i had to remove it and re-add it as it had stopped working at some point....

i have tried rebooting the 980, made sure it is pingable, made sure the app isn't open on the phone, etc etc - any ideas?

 "30F8891redacted": {
    "password": ":1:redacted",
    "sku": "R98----",
    "softwareVer": "v2.4.17-138",
    "name": "MIL",
    "cap": {
      "pose": 1,
      "ota": 2,
      "multiPass": 2,
      "carpetBoost": 1,
      "pp": 1,
      "binFullDetect": 1,
      "langOta": 1,
      "maps": 1,
      "edge": 1,
      "eco": 1,
      "svcConf": 1
    },
    "digiCap": {},
    "svcDeplId": "v011",
    "user_cert": false
  },

This is the logging error:

2024-06-10 18:03:21.811 ERROR (roombapy) [roombapy.remote_client] Can't connect to 192.168.1.129
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/roombapy/remote_client.py", line 93, in connect
    self._open_mqtt_connection()
  File "/usr/local/lib/python3.12/site-packages/roombapy/remote_client.py", line 121, 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
ThinkingParadox commented 5 months ago

Having the same issue with my 960. I was able to pair my i5 with no issues but the 960 refuses to connect. They are both on the same network. Tried a factory reset on the 960. Is it possibly a timeout issue or is my 960 using an old version of TLS or ciphers? Looks like there are a lot of open issues about the same topic that have been closed with no fix. Any chance we might get this fixed? This was working for my 960 a while back and it broke. When it broke is beyond me.

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/roombapy/remote_client.py", line 93, in connect
    self._open_mqtt_connection()
  File "/usr/local/lib/python3.12/site-packages/roombapy/remote_client.py", line 121, 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
ThinkingParadox commented 4 months ago

Interesting development. I was able to set up the integration when the 960 was running a job and with the irobot app running! I used the password path to do the integration.

scyto commented 4 months ago

Interesting development. I was able to set up the integration when the 960 was running a job and with the irobot app running! I used the password path to do the integration.

so i am clear, so i should try running a job, keep app open and then try entering the password in hass?

--edit-- no bueno for me, what else did you do before running the job...?

also here are some extra logs... you can see it connected AND got MQTT messages - whatever this is, it isn't password related -its something else....

https://github.com/pschmitt/roombapy/issues/322

ThinkingParadox commented 4 months ago

I am not sure if the factory reset I did helped but I did factory reset. When I did my factory reset, I used the irobot app to set up the roomba again. I closed the app and I pulled the new password and gave it to home assistant but had the same timeout issue again. I ended up running a job and a bit later I remembered a post a while back of someone saying they tried it when it was running a job with successful results. I tried it and it worked.

Also I didn't press the home and spot clean when asked during the integration setup since it was cleaning so it timed out on the first attempt of auto setup. It presents the password prompt after.

RobvanHamersveld commented 4 months ago

I have the same issue. I had to reset the roomba (an 960) to factory defaults because I needed to change the WiFi network. But I'm now unable to add the robot into Home Assistant. Before the reset it was working and connected to HA for over 3 years without any issue. I am able to get the password by using this procedure: https://github.com/koalazak/dorita980#how-to-get-your-usernameblid-and-password but no luck connecting it to home assistant.

scyto commented 4 months ago

Here were my steps that fixed it.

  1. factory reset
  2. retrieve password from cloud service
  3. start manual cleaning job
  4. terminate app
  5. delete auto discovered entry in hass
  6. add new roomba from the existing card
  7. selected roomba ip as detected
  8. entered password

(note i tried 1 and 2 several times and that didn't work so one of the other steps is key)

dgomes commented 3 months ago

can confirm, password was only accepted while cleaning (started from the app)

Model: R981040

Tamqs commented 3 months ago

Can confirm as well, i added my R98---- while cleaning started from the app. Thank you @scyto for solution :)

Zigouarch commented 2 months ago

Thanks, Since hours i tried to add 980 and with Manual start cleaning, It take my password !

Tinsus commented 2 months ago

I can confirm, it only accepts password from dorita980 while a manual cleaning job runs (sku: R980040 SoftwareVer: v2.4.17-138)

AuroreVgn commented 1 week ago

Hi all,

By mixing several topics, I found a solution (mainly thanks to @alebr001) for my Roomba 960. Here are the steps I did:

  1. I download on a Linux device (= accessible through SSH) the roomba component from official HA Git
  2. modify three files:
    • const.py: DEFAULT_DELAY = 100 instead of DEFAULT_DELAY = 1
    • _configflow.py: continuous=True instead of continuous=False
    • manifest.json: adding version tag like "version"=20241026 in order to override official HA integration
  3. trough Terminal use scp to copy all files from roomba component to /homeassistant/custom_components/roomba
  4. restart HA
  5. check if you have the "custom component" logo on iRobot integration
  6. retry to add your iRobot device

I added my 960 with the password I get from Dorita980 without out pressing 'Home' and 'Spot' buttons and..... it's works!