NickWaterton / Roomba980-Python

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

Password issue: Socket Error: ('The read operation timed out',) #61

Open Trynius opened 5 years ago

Trynius commented 5 years ago

I'm having immense trouble trying to extract the BLID and password from my Roomba. I've run this from 2 different machines running bash for windows. I've removed the app from my phone completely, rebooted the robot, and I still can't get it to work. This is the output I receive each time.

Received: { "robotname": "Roomba", "sku": "R675020", "nc": 0, "ver": "3", "proto": "mqtt", "ip": "10.105.20.217", "hostname": "Roomba-3192C21860517830", "sw": "3.3.47", "mac": "DC:F5:05:25:DE:96", "cap": { "eco": 1, "ota": 1, "svcConf": 1 } } Roomba (Roomba) IP address is: 10.105.20.217 Socket Error: ('The read operation timed out',) Error getting password, receive 2 bytes. Follow the instructions and try again.

FYI, this is a Roomba 690.

NickWaterton commented 5 years ago

The last version of Roomba firmware 3.0.11 changed the way the encryption works (slightly). This was patched and uploaded a couple of weeks ago.

You need to post your full output, including all version numbers, so that I can tell what you are running. You need to be running V1.2.5 of roombapassword for it to work.

Trynius commented 5 years ago

Thanks for the quick response Nick, here's my full output trying the entire script:

jacomil@NUC:~/Roomba980-Python$ python roomba -R 10.105.20.217 CV or numpy module not found, falling back to PIL PIL module not found, maps are disabled CV or numpy module not found, falling back to PIL PIL module not found, maps are disabled [I 2019-10-28 11:08:53,088] [I 2019-10-28 11:08:53,088] Program Started [I 2019-10-28 11:08:53,089] [I 2019-10-28 11:08:53,090] Roomba.py Version: 1.2.5 [I 2019-10-28 11:08:53,090] Python Version: 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0] [I 2019-10-28 11:08:53,090] Paho MQTT Version: 1.4.0 [I 2019-10-28 11:08:53,091] to Exit [I 2019-10-28 11:08:53,091] Roomba 980 MQTT data Interface [I 2019-10-28 11:08:53,092] reading info from config file ./config.ini [W 2019-10-28 11:08:53,093] No roomba or config file defined, I will attempt to discover Roombas, please put the Roomba on the dock and follow the instructions: [I 2019-10-28 11:08:53,093] Using Password version 1.2.5 waiting on port: 5678 for data found 1 Roomba(s) Make sure your robot (Roomba) at IP 10.105.20.217 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: { "robotname": "Roomba", "sku": "R675020", "nc": 0, "ver": "3", "proto": "mqtt", "ip": "10.105.20.217", "hostname": "Roomba-3192C21860517830", "sw": "3.3.47", "mac": "DC:F5:05:25:DE:96", "cap": { "eco": 1, "ota": 1, "svcConf": 1 } } Roomba (Roomba) IP address is: 10.105.20.217 Socket Error: ('The read operation timed out',) Error getting password, receive 2 bytes. Follow the instructions and try again. [I 2019-10-28 11:09:26,371] reading info from config file ./config.ini [E 2019-10-28 11:09:26,372] No Roombas found! You must specify RoombaIP, blid and roombaPassword to run this program, or have a config file, use -h to show options.

Trynius commented 5 years ago

For what it's worth, I do notice that once I hit the enter key, the green wifi light changes to white immediately after getting the above data and the console sits at "Roomba (Roomba) IP address is: 10.105.20.217" for about 10 seconds before presenting the error.

NickWaterton commented 5 years ago

You're running the latest version, so it should be fine.

This problem is 99% of the time caused by having more than one mqtt connection at the same time (which roomba does not allow). I know you think you have removed all connections, the problem is that roomba doesn't think so., ie roomba still thinks there is a current mqtt connection, even though there isn't.

Getting the initial information does not use mqtt, but getting the password does.

The usual solution is to force close the app on your phone, turn off the wifi on your phone. Reset the roomba by long pressing the "Start" button,

If that doesn't work, reset roomba wifi by long pressing the "home" button.

I'm thinking its not a TLS issue, as you are getting a timeout. timeout is usually the mqtt connection problem. It's hard to troubleshoot though, as I don't have a version 3 roomba.