Open nellering opened 4 years ago
You have a very old version, the latest version of Password
is 1.2.6. (yours Using Password version 1.2.2
)
Also, make sure you have no other connection to the Roomba at all (ie the app), Roomba only allows one MQTT connection at a time.
I'm getting the same error. Not sure what the relationship is between MQTT and the app, but I force closed the app on my phone and I still get the error.
pi@pi1:~$ roomba
CV or numpy module not found, falling back to PIL
CV or numpy module not found, falling back to PIL
[I 2019-12-21 15:00:47,333] *******************
[I 2019-12-21 15:00:47,336] * Program Started *
[I 2019-12-21 15:00:47,337] *******************
[I 2019-12-21 15:00:47,338] Roomba.py Version: 1.2.6
[I 2019-12-21 15:00:47,340] Python Version: 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.2.0]
[I 2019-12-21 15:00:47,341] Paho MQTT Version: 1.5.0
[I 2019-12-21 15:00:47,342] PIL Version: 5.4.1
[I 2019-12-21 15:00:47,344] <CNTRL C> to Exit
[I 2019-12-21 15:00:47,345] Roomba 980 MQTT data Interface
[I 2019-12-21 15:00:47,348] reading info from config file ./config.ini
[W 2019-12-21 15:00:47,350] 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-12-21 15:00:47,351] Using Password version 1.2.6
waiting on port: 5678 for data
[W 2019-12-21 15:00:47,354] supplied address 255.255.255.255 does not match discovered address 192.168.1.21, using discovered address...
[W 2019-12-21 15:00:47,464] supplied address 255.255.255.255 does not match discovered address 192.168.1.172, using discovered address...
found 1 Roomba(s)
Make sure your robot (US-Roomba) at IP 192.168.1.172 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-...",
"robotname": "US-Roomba",
"ip": "192.168.1.172",
"mac": "...",
"sw": "3.3.47",
"sku": "R677020",
"nc": 1,
"proto": "mqtt",
"cap": {
"ota": 1,
"eco": 1,
"svcConf": 1
}
}
Roomba (US-Roomba) IP address is: 192.168.1.172
Connection Error [Errno 111] Connection refused
Traceback (most recent call last):
File "/home/pi/.local/bin/roomba", line 10, in <module>
sys.exit(main())
File "/home/pi/.local/lib/python3.7/site-packages/roomba/__main__.py", line 485, in main
Password(file=arg.configfile)
File "/home/pi/.local/lib/python3.7/site-packages/roomba/password.py", line 41, in __init__
self.get_password()
File "/home/pi/.local/lib/python3.7/site-packages/roomba/password.py", line 138, in get_password
wrappedSocket.send(packet)
File "/usr/lib/python3.7/ssl.py", line 986, in send
return super().send(data, flags)
BrokenPipeError: [Errno 32] Broken pipe
The relationship between MQTT and the app is that the app will try to connect to the Roomba locally via MQTT to control it. If it can't connect via MQTT, it falls back to using a remote connection via AWS - you can tell it's done this because the app displays a "globe" icon in the top right corner.
The Roomba only allows one connection via MQTT. Once the Roomba believes that an MQTT connection has been established, it refuses all other connections.
If you run Roomba980-Python in this case, you get the:
Connection Error [Errno 111] Connection refused
Message.
Even if the app is closed, the Roomba may still believe that the MQTT connection is present. You may have to reset the Roomba, and reconnect WiFi. Hopefully this will clear the MQTT connection.
Once Roomba980-Python successfully connects, you can then connect via the app, and you should get the "globe" icon to show it's connected remotely.
I have 3 Roombas (S9+, Braava Jet M6, and a wifi connected one that doesn't do mapping). This is the output I get when I start the program on Ubuntu. I've also tried this on Windows.