Open lolento opened 5 years ago
You mean i7 as in the processor? That has nothing to do with your issue. You need to check carefully your pre-reqs (python versions, paho mqtt version etc.) Can you show your output?
i7 and i7+ are new models. i7+ is just i7 with a dirt bin base.
Here is the output I'm getting:
[I 2018-10-05 14:13:51,435]
[I 2018-10-05 14:13:51,436] Program Started
[I 2018-10-05 14:13:51,436]
[I 2018-10-05 14:13:51,436] Roomba.py Version: 1.2.3
[I 2018-10-05 14:13:51,436] Python Version: 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 15:51:26) [MSC v.1900 32 bit (Intel)]
[I 2018-10-05 14:13:51,436] Paho MQTT Version: 1.4.0
[I 2018-10-05 14:13:51,436] CV Version: 3.4.3
[I 2018-10-05 14:13:51,437] PIL Version: 5.3.0
[I 2018-10-05 14:13:51,437]
Ah, OK.
Looks like it’s working, there is a python 3 error in the output (Json string vs bytes), that is probably the problem.
What platform/OS are you using? Is there a possibility of using python 2.7 to get the blid/password?
The program is written in 2.7, and it’s patched for the myriad versions of 3.x with all their incompatibilities. String vs byte is one of them.
I’ll take a look at fixing that, but it might take me a while to get to it.
Nick Waterton P.Eng Sent from my iPhone
On Oct 5, 2018, at 5:16 PM, lolento notifications@github.com<mailto:notifications@github.com> wrote:
i7 and i7+ are new models. i7+ is just i7 with a dirt bin base.
Here is the output I'm getting:
[I 2018-10-05 14:13:51,435] [I 2018-10-05 14:13:51,436] Program Started [I 2018-10-05 14:13:51,436] [I 2018-10-05 14:13:51,436] Roomba.py Version: 1.2.3 [I 2018-10-05 14:13:51,436] Python Version: 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 15:51:26) [MSC v.1900 32 bit (Intel)] [I 2018-10-05 14:13:51,436] Paho MQTT Version: 1.4.0 [I 2018-10-05 14:13:51,436] CV Version: 3.4.3 [I 2018-10-05 14:13:51,437] PIL Version: 5.3.0 [I 2018-10-05 14:13:51,437] to Exit [I 2018-10-05 14:13:51,437] Roomba 980 MQTT data Interface [I 2018-10-05 14:13:51,437] reading info from config file ./config.ini [W 2018-10-05 14:13:51,437] No roomba or config file defined, I will attempt to discover Roombas, please put the Roomba on the dock and follow the instructions: [I 2018-10-05 14:13:51,437] Using Password version 1.2.2 waiting on port: 5678 for data [W 2018-10-05 14:13:51,438] supplied address 255.255.255.255 does not match discovered address 192.168.2.116, using discovered address... [W 2018-10-05 14:13:51,517] supplied address 255.255.255.255 does not match discovered address 192.168.2.12, using discovered address... json decode error: the JSON object must be str, not 'bytes' RECEIVED: %s (b'{"ver":"3","hostname":"iRobot-E21988B837404711A2301616CC00009C","robotname":' b'"Roomba","robotid":"E21988B837404711A2301616CC00009C","ip":"192.168.2.12","m' b'ac":"50:14:79:0F:1A:26","sw":"lewis+1.2.7+lewis-day-0-ota+9","sku":"i755020"' b',"nc":0,"proto":"mqtt","cap":{"binFullDetect": 1, "dockComm": 1, "maps": 3, ' b'"edge": 0, "area": 1, "eco": 1, "multiPass": 2, "pose": 1, "pp": 0, "5ghz": ' b'1, "prov": 3, "sched": 1, "svcConf": 1, "ota": 2, "log": 2}}') No Roombas found, try again... [I 2018-10-05 14:14:01,519] reading info from config file ./config.ini [E 2018-10-05 14:14:01,520] No Roombas found! You must specify RoombaIP, blid and roombaPassword to run this program, or have a config file, use -h to show options.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/NickWaterton/Roomba980-Python/issues/39#issuecomment-427501138, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALCUZ0CoOPQNaNWE2gcG0bqSchkP0MFCks5uh8w6gaJpZM4XK054.
Unsubscribe from GE's commercial electronic messages: http://sc.ge.com/*casl-unsubscribe Désabonner des messages électroniques commerciaux de GE: http://sc.ge.com/*lcap-desabonnement
Thx so much.
I'm using this on windows but have a nas box that can run docker which can give this a try on Python 2.7
You can run python 2.7 on a Windows too - that’s what I do. Most platforms have 2.7 and 3.x at the same time, you can choose which to run.
It’s just that to debug 3.x issues I have to spin up a VM to check it out, and that takes a while. The main program should work as its tested with 3.5, but I already have my credentials, so I haven’t tested out the whole discovery process with every version of 3.x.
Nick Waterton P.Eng Sent from my iPhone
On Oct 6, 2018, at 12:39 PM, lolento notifications@github.com<mailto:notifications@github.com> wrote:
Thx so much.
I'm using this on windows but have a nas box that can run docker which can give this a try on Python 2.7
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/NickWaterton/Roomba980-Python/issues/39#issuecomment-427588049, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALCUZ02VNGLwUJmtXiRh7yoCilg8_WSyks5uiNzCgaJpZM4XK054.
Unsubscribe from GE's commercial electronic messages: http://sc.ge.com/*casl-unsubscribe Désabonner des messages électroniques commerciaux de GE: http://sc.ge.com/*lcap-desabonnement
Hello,
I got a bit further with Python 2.7. However, it says BLID = None
c:\Python27>python2 -m roomba -R 192.168.2.109
[I 2018-10-06 15:23:49,653]
[I 2018-10-06 15:23:49,653] Program Started
[I 2018-10-06 15:23:49,653]
[I 2018-10-06 15:23:49,653] Roomba.py Version: 1.2.3
[I 2018-10-06 15:23:49,653] Python Version: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
[I 2018-10-06 15:23:49,653] Paho MQTT Version: 1.2.3
[I 2018-10-06 15:23:49,653] CV Version: 3.4.3
[I 2018-10-06 15:23:49,653] PIL Version: 5.3.0
[I 2018-10-06 15:23:49,653]
@NickWaterton
Few simple changes get the library working with the i7
First: Hostname is now iRobot - previously iRoomba "hostname": "iRobot-E21988B837404711A2301616CC00009C",
Change:
password.py line 117
if hostname[0] == 'Roomba':
blid = hostname[1]
to
if hostname[0] == 'Roomba' or hostname[0]=='iRobot':
blid = hostname[1]
Second:
Password return now a null string attached to the end which needs to be removed.
password.py line 171
password = str(data[7:].decode())
Change to
password = str(data[7:]).partition(b'\0')[0]
Using python partition to split on the null return and take all the string before. (in my usage I don't use decode - which may impact this) Works with both i7 and 980.
Glenn
Thanks for that, Is there still a python 3.5 issue?
I've pushed a fixed version - can you try the password discovery out in python 3.5 again? (I think I fixed the 3.5 issue as well). Just rename your .ini file and try again.
Will do after I get home today.
Hi Nick,
I tried to do an upgrade to Roomba980-python via:
pip3 install git+https://github.com/NickWaterton/Roomba980-Python.git
the console is saying there is no upgrade....
Tried using: pip3 install Roomba980-Python==1.1.2
But console says the current version is 1.2.1 which is what I already have...
Yes, this is because I don't maintain the PyPi version of this (was packaged by someone else).
I have updated the pip version to 1.2.2, see if that upgrades now.
Ok, it got further in Python 3.5, but not as far as Python 2.7, here is what I'm getting:
[I 2018-10-09 20:15:52,909]
[I 2018-10-09 20:15:52,909] Program Started
[I 2018-10-09 20:15:52,910]
[I 2018-10-09 20:15:52,910] Roomba.py Version: 1.2.3
[I 2018-10-09 20:15:52,910] Python Version: 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 15:51:26) [MSC v.1900 32 bit (Intel)]
[I 2018-10-09 20:15:52,910] Paho MQTT Version: 1.4.0
[I 2018-10-09 20:15:52,910] CV Version: 3.4.3
[I 2018-10-09 20:15:52,910] PIL Version: 5.3.0
[I 2018-10-09 20:15:52,910]
Bloody bytes vs string I'm sure the python 3 people had a good reason for it but...
Anyway, pushed another fix, see how far it gets this time.
Thx, I tried to do a upgrade using pip but I guess the version wasn't updated...?
EDIT: I did a downgrade and then upgrade, so this is working with python 3.5 which is great.
this is what I get with the I7:
Connection Error EOF occurred in violation of protocol (_ssl.c:590)
Traceback (most recent call last):
File "./getpassword.py", line 39, in
I would need to know a lot more. What OS is this? what is the full output? Your libraries are probably out of date, especially if you are using python 2.7, many libraries (eg ssl) have not been updated in a long time.
It's possible that Roomba has implemented some new SSL security, but this would be the first time if they have.
Of course, the other possibility is that you already have a device connected to the Roomba (the app for instance). This is what causes 99% of the failures with Roomb.py connections.
This is a function of the Roomba itself, it only allows one connection at a time, so if the app is connected, nothing else can connect, and you get errors like this.
The app can still be connected even if it's closed.
I have Macos Mojave 10.14.6, I am using python 3.7 the last one. I have already tried again, turning off my mobile phone to be sure the app it is not runing, but I got the same error, please sorry for mi ignorance I do not know nothing about python I saw a youtube video to do this with terminal. This is the message I get
Make sure your robot (Roomba) at IP 192.168.1.67 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": "i755840",
"nc": 0,
"ver": "3",
"proto": "mqtt",
"ip": "192.168.1.67",
"hostname": "xxxxxxxx",
"sw": "lewis+1.6.6+lewis-day-0-ota+29",
"robotid": "xxxxxxxxx",
"mac": "50:14:79:06:49:06",
"cap": {
"pp": 0,
"svcConf": 1,
"sched": 1,
"log": 2,
"ota": 2,
"area": 1,
"binFullDetect": 1,
"prov": 3,
"maps": 3,
"pose": 1,
"eco": 1,
"dockComm": 1,
"edge": 0,
"team": 1,
"multiPass": 2,
"5ghz": 1
}
}
Roomba (Roomba) IP address is: 192.168.1.67
Connection Error EOF occurred in violation of protocol (_ssl.c:590)
Traceback (most recent call last):
File "./getpassword.py", line 39, in
Thanks for your help
https://github.com/zhouF96/Roomba980-Python/commit/ede7e95e5b10c7e1d52154815f96098859287365 fixed the SSL handshake for me
Is there anyway that I can help with making this compatible with i7?
I just gave this a try and it is not detecting the BLID or password....