Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roomba Connection error: Error: [Errno 111] Connection refused #4

Open
ThirstyThursten opened this issue Aug 19, 2021 · 14 comments
Open

Comments

@ThirstyThursten
Copy link

ThirstyThursten commented Aug 19, 2021

Hey Filip (or anyone who can help me),

I love the work you did here, thanks for that!

I followed the guide to the letter, checked everything twice.

But I keep getting an error while trying to connect. The config is populated correctly (atleast I think so.)
The Service is running correctly and shows as active for both the Mosquitto and Roomba service.

Here is the Debug info:

/usr/bin/python3 /home/pi/domoticz/plugins/Roomba/roomba --configfile /home/pi/domoticz/plugins/Roomba/config.ini --topic /roomba/feedback/# --broker localhost --brokerFeedback /roomba/feedback --mapPath '' --mapSize '' --log '' --debug 
CV or numpy module not found, falling back to PIL
CV or numpy module not found, falling back to PIL
[I 2021-08-19 12:02:47,663] *******************
[I 2021-08-19 12:02:47,663] * Program Started *
[I 2021-08-19 12:02:47,664] *******************
[I 2021-08-19 12:02:47,664] Roomba.py Version: 1.2.9
[I 2021-08-19 12:02:47,664] Python Version: 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
[I 2021-08-19 12:02:47,664] Paho MQTT Version: 1.5.1
[I 2021-08-19 12:02:47,665] PIL Version: 5.4.1
[D 2021-08-19 12:02:47,665] -- DEBUG Mode ON -
[I 2021-08-19 12:02:47,665] <CNTRL C> to Exit
[I 2021-08-19 12:02:47,665] Roomba 980 MQTT data Interface
[I 2021-08-19 12:02:47,667] reading info from config file /home/pi/domoticz/plugins/Roomba/config.ini
[I 2021-08-19 12:02:47,670] connecting to broker
[I 2021-08-19 12:02:47,686] Creating Roomba object 192.168.x.x
[I 2021-08-19 12:02:47,686] connecting Roomba 192.168.x.x
Error: [Errno 111] Connection refused 
Attempting new Connection to Roomba (#1)
Error: [Errno 111] Connection refused 
Attempting new Connection to Roomba (#2)
Error: [Errno 111] Connection refused 
Attempting new Connection to Roomba (#3)
Error: [Errno 111] Connection refused 
Unable to connect to Roomba Kara
Not able to connect to Kara: exiting service!!
[D 2021-08-19 12:02:51,082] Broker disconnected

NOTE: The IP address in the original file is correct, I obfuscated it.

I do have a Roomba S9+ so maybe that's the problem? maybe they changed something in the backend?

I hope you can help me out! If you need any more info let me know! 😃

Thanks in advance!
Greetings,
Thursten

EDIT I noticed I made a typo!! I have the Roomba S9+ (9550), self emptying vacuum with DustBin Current Firmware version is: 3.18.11

@Tankyspanky
Copy link

Tankyspanky commented Aug 19, 2021

Just a thought,
You DID run the file to get the password to enter in the config?
I tried it on mine but then it stays "on" the green light didnt go out anymore

Or maybe something with user rights ?
when you start it with sudo ?

@ThirstyThursten
Copy link
Author

Just a thought,
You DID run the file to get the password to enter in the config?
I tried it on mine but then it stays "on" the green light didnt go out anymore

Or maybe something with user rights ?
when you start it with sudo ?

Yeah I did, the config file is populated, including a Password and other stuff.
What do you mean with the "on" and green light?
When I did the connect thing on my i9+ I held the HOME button on the device itself, then lightring went blue and sort of pulsing, at that moment I saw the command for the password get a response and the Roomba said something like dundundun"The device is set up and ready for use" or something like that.
After that I checked the the config and as I said it was indeed populated.

Created the service file, enabled it and started it. It's active and running, added the device to Domoticz but the batterypercentage was zero and the status was null or something..

That's where I got suspicious and restarted the Domoticz, the Roomba service and the mosquitto service.
All report back as Active(running). Through sudo systemctl status {servicename}.

I don't know what else to do. I don't think sudo is gonna help, I feel like the either the Roomba isn't accepting the connection or the password might be wrong or something..
I noticed in the code that the password to connect is decoded and parsed from some base64 stuff. I don't know if the i9+ stores the password differently.

Than again, it got all the info, like the passwd, Robot name I believe serialnumber or something like the all from the setting up/password script. During the installation.

Any tips or ideas?
Ps. Sorry for the text wall.. 😅

@FilipDem
Copy link
Owner

FilipDem commented Aug 20, 2021 via email

@Tankyspanky
Copy link

Tankyspanky commented Aug 25, 2021

Hey,
I have a 680 i believe.
This is my config file: (Name is the machine is from my wife not me haha

[192.168.0.100]
blid = 3176480C41344670
password = :1:*************************************
data = {'cap': {'eco': 1, 'ota': 1, 'svcConf': 1},
'hostname': 'Roomba-3176480C41344670',
'ip': '192.168.0.100',
'mac': 'D0:C5:XX:XX:XX:46',
'nc': 0,
'proto': 'mqtt',
'robotname': 'Zuigslet',
'sku': 'R671040',
'sw': '3.5.62',
'ver': '3'}

I have 3 buttons in domoticzz ( Start/stop) State and Battery ( only battery level never worked)

Hmm do you have set a user/pw for the Roomba on your Mqtt ??
Or do you use mqtt without a user file

@FilipDem
Copy link
Owner

FilipDem commented Aug 26, 2021 via email

@ThirstyThursten
Copy link
Author

ThirstyThursten commented Aug 26, 2021

Hey Filip,
You back from holiday yet?
If you want we can continue troubleshooting in Dutch, that's also fine by me.

I have have the devices all in my Domoticz Dashboard yeah, however batterylevel is shown as 0% but Kara is at her homebase so that's ridiculous.
Is there anyway to see if it's connected and working, without starting a vacuumjob?

@Tankyspanky, I have not set anything custom for mqtt aside from the config changes in the readme of this plugin. Did I need anything else?

@FilipDem
Copy link
Owner

FilipDem commented Aug 26, 2021 via email

@ThirstyThursten
Copy link
Author

Hey Filip,
Yeah the buttons are red.. :(
I think it has something to do with that connection refused..
I don't understand how though, the config file is being used and is populated.

Any logging that I can share to help troubleshoot? I can share my config.ini if it helps?

Thanks again for helping and thinking with me! :)

@ThirstyThursten
Copy link
Author

image

This is the result of sudo systemctl status roomba

And this is my config.ini (ofcourse I took the sensitive info out).

All the places where it says {...} has normal information.

[192.168.1{...}]
blid = 1A{...}
password = :1:1{...}
data = {'cap': {'5ghz': 1,
	         'area': 1,
	         'binFullDetect': 2,
	         'carpetBoost': 1,
	         'dockComm': 1,
	         'eco': 1,
	         'edge': 0,
	         'lang': 2,
	         'langOta': 0,
	         'log': 2,
	         'maps': 3,
	         'multiPass': 2,
	         'ota': 2,
	         'pmaps': 5,
	         'pose': 1,
	         'pp': 0,
	         'prov': 3,
	         'sched': 1,
	         'svcConf': 1,
	         'tLine': 2,
	         'team': 1,
	         'tileScan': 1},
	 'hostname': 'iRobot-1A{...}',
	 'ip': '192.168.1{...}',
	 'mac': '50:{...}',
	 'nc': 0,
	 'proto': 'mqtt',
	 'robotid': '1A{...}',
	 'robotname': 'Kara',
	 'sku': 's955840',
	 'sw': 'soho+3.14.16+soho-release-121+22',
	 'ver': '3'}

@FilipDem
Copy link
Owner

Hi,
If there is no connection, I cannot do very much from my side.
I would first try if it works at MQTT level... Normally you should be able to get all the info back with a simple MQTT client.
You can use mosquitto_sub -v -t /roomba/feedback/# for this.
More information can be found on https://github.com/NickWaterton/Roomba980-Python as I referred to in my Readme.
When this works you are a step further. Then you can use the Roomba Python module as explained in the chapter "Create ROOMBA Client to get information and forward to MQTT Broker" of my Readme.
And the next step is then to make it available in Domoticz.

As long as the first step is not working (trying with a standard MQTT client), it is not worth to go further.

Filip

@Tankyspanky
Copy link

Hi,
Duno if its possible to set by the proto "mqtt" a username and pw ?
Because ive got now some lightswitches with a "username" & "password"
so there is no more mqtt anonymus
maybe i created the problem for myself there, before it was working

grtz

Aad

@ThirstyThursten
Copy link
Author

Hi, If there is no connection, I cannot do very much from my side. I would first try if it works at MQTT level... Normally you should be able to get all the info back with a simple MQTT client. You can use mosquitto_sub -v -t /roomba/feedback/# for this. More information can be found on https://github.com/NickWaterton/Roomba980-Python as I referred to in my Readme. When this works you are a step further. Then you can use the Roomba Python module as explained in the chapter "Create ROOMBA Client to get information and forward to MQTT Broker" of my Readme. And the next step is then to make it available in Domoticz.

As long as the first step is not working (trying with a standard MQTT client), it is not worth to go further.

Filip

Hey man,
Thanks for getting back at me, sorry for the late reply!

I installed NickWatertons version (the latest) and followed his steps, installed the dependencies and ran the roomba.py in his folder and it worked! I got a connection and got a complete and full log with working connection etc.
Is there a way to integrate your plugin part with his script?
So I could also use his map and such?
Or how can I make this work now? Both generated configs are identical. There must be a difference in the way they set up the connection I think?

@FilipDem
Copy link
Owner

For the plugin, please read the instructions in the readme. If not clear, let me know.
For the last step, create a directory in the plugins, and copy the files... If you then add the hardware, the devices should be created. As I don't see any useful application for the map, I haven't integrated this.

@ThirstyThursten
Copy link
Author

For the plugin, please read the instructions in the readme. If not clear, let me know. For the last step, create a directory in the plugins, and copy the files... If you then add the hardware, the devices should be created. As I don't see any useful application for the map, I haven't integrated this.

Yeah, but the thing is, your version of roomba.py can't get a connection up.. I don't know what exactly is different in his way of connecting amd your way of connecting.
But your roomba.py still gives errors and doesn't connect if I run the ./roomba.py manually. Nicks version does.

I don't know if following the steps in the readme again is gonna change anything cause the config.ini files are the same in both yours and his folder (automatically generated).
So in your version it still keeps hanging on the connecting to the Roomba, while Nick's script is connecting.
After that is fixed it would be the moment to check on the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants