NickWaterton / Roomba980-Python

Python program and library to control iRobot Roomba 980 Vacuum Cleaner
MIT License
361 stars 103 forks source link

Get Password returns SSL Error: No cipher can be selected #82

Closed rodenj1 closed 3 years ago

rodenj1 commented 3 years ago

So I have had my Roomba connected to HA for quite a while. Suddenly it stopped working. I deleted it from HA and then tried to re-add it, but with no success. I was thinking it was maybe a password issue, but when I run the get password I get the below error. BTW, I have killed the Roomba app on my phone, Roomba has been deleted from HA and I reset the roomba and still no success getting the password.

Thank you for the help!

python3 ./roomba/getpassword.py -R 192.168.0.232 CV or numpy module not found, falling back to PIL waiting on port: 5678 for data found 1 Roomba(s) Make sure your robot (Moe) at IP 192.168.0.232 is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light. Press Enter to continue... Received: { "ver": "3", "hostname": "Roomba-6945050C01309700", "robotname": "Moe", "ip": "192.168.0.232", "mac": "80:A5:89:21:7A:78", "sw": "v2.4.13-119", "sku": "R98----", "nc": 0, "proto": "mqtt", "cap": { "pose": 1, "ota": 2, "multiPass": 2, "carpetBoost": 1, "pp": 1, "binFullDetect": 1, "langOta": 1, "maps": 1, "edge": 1, "eco": 1, "svcConf": 1 } } Roomba (Moe) IP address is: 192.168.0.232 Traceback (most recent call last): File "./roomba/getpassword.py", line 39, in main() File "./roomba/getpassword.py", line 36, in main Password(arg.roombaIP,file=arg.configfile) File "/Users/rodenj/Projects/Roomba980-Python/roomba/password.py", line 41, in init self.get_password() File "/Users/rodenj/Projects/Roomba980-Python/roomba/password.py", line 131, in get_password sock, ssl_version=ssl.PROTOCOL_TLS, ciphers='DEFAULT@SECLEVEL=1') #ciphers='HIGH:!DH:!aNULL' may work as well File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1218, in wrap_socket context.set_ciphers(ciphers) ssl.SSLError: ('No cipher can be selected.',)

NickWaterton commented 3 years ago

This is obviously an ssl error, in that the Roomba is trying to negotiate an ssl cipher that your local version of ssl does not support.

Do you know what has changed recently? eg Roomba S/W V2.4.13-119 seems odd, the latest I have seen is 2.4.6-3 June 15th 2018 (on my R9800). What is the date on yours? What version of ssl do you have installed? have you tried updating it to the latest? and what OS are you on?

rodenj1 commented 3 years ago

So it looks like the Roomba was updated to V2.4.13-119 on April 8th, 2020. I am 100% sure it was working post update because I am able to see the battery history in HA all the way up to Aug. 17th

I am running the getpassword from MacOS 10.15.6 and running "openssl version" shows "LibreSSL 2.8.2"

How I noticed the issue initially was I updated my HA to 0.114.2 and post that I started seeing the connection issue to the roomba. I have since backed that version of HA out to 0.113.3 and tried to re-add the roomba and it failed. However, I JUST tried a down rev HA again, did the re-add and it worked! I think did the upgrade to 0.114.2 and it still works... So Wierd. FYI, I am running HA in a Docker container. After I got it back and working in HA again, I tried the getpassword from the Mac again and it continues to fail with the previous error.

NickWaterton commented 3 years ago

So the MacOS issue has probably always been there, and is not the reason the HA Upgrade caused a problem.

I don't know what the issue was with HA (I use OpenHab), it may have been something totally different from the SSL issue on the Mac. You would have to look at the logs for Roomba in the HA container.

rodenj1 commented 3 years ago

Thank you! I ended up trying getpassword from a windows system and it seems to work fine. I believe this is a mac issue. Thank you for your help.

alexhermida commented 3 years ago

Just to comment in case some has the same issue, as the comment in the code tells, configuring ciphers='HIGH:!DH:!aNULL' worked fine for me in MacOS Catalina.