iRoomba iRobot Plugin

Posted on
Mon Oct 08, 2018 2:23 pm
Different Computers offline
User avatar
Posts: 1900
Joined: Jan 02, 2016
Location: East Coast

Re: iRoomba 980 iRobot Plugin

Suddenly my wife thinks a Roomba is a good idea.

Anyone know if the Costco Roomba 985 is compatible? Most likely a Costco only model number to avoid comparison shopping.

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Mon Oct 08, 2018 2:35 pm
ckeyes888 offline
Posts: 2101
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: iRoomba 980 iRobot Plugin

Just bought the 985 from Costco. It actually works better from Indigo then from its own app, which even when working I find very lacking.
It’s one major fault is it’s cliff sensors which see dark areas in carpets etc. as drop offs and cause it to error out and stop cleaning. I’m told the sensors can be covered with something white to fool them but haven’t tried it yet.

Carl

Posted on
Mon Oct 08, 2018 3:16 pm
EricMcM offline
Posts: 11
Joined: May 13, 2016

Re: iRoomba 980 iRobot Plugin

Thanks for the quick response. They are indeed pretty new and I just got this one. The house mapping is pretty cool. Here is the log. Happy to try stuff if it will help.

Thanks!

----
Stopped plugin "iRobot-Roomba 0.2.6"
Starting plugin "iRobot-Roomba 0.2.6" (pid 41058)
iRobot-Roomba
iRobot-Roomba ================================================ Initializing New Plugin Session =================================================
iRobot-Roomba Plugin name: iRobot-Roomba
iRobot-Roomba Plugin version: 0.2.6
iRobot-Roomba Plugin ID: com.GlennNZ.indigoplugin.irobot
iRobot-Roomba Indigo version: 7.1.1
iRobot-Roomba Python version: 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
iRobot-Roomba Python Directory: /System/Library/Frameworks/Python.framework/Versions/2.7
iRobot-Roomba ==================================================================================================================================
iRobot-Roomba Debug logLevel = 10
Started plugin "iRobot-Roomba 0.2.6"
iRobot-Roomba Starting Roomba
iRobot-Roomba Debug updateFrequency = 86400.0
iRobot-Roomba Debug statusFrequency = 600.0
iRobot-Roomba Debug deviceStartComm called for Downstairs Roomba
iRobot-Roomba Debug checkALlRoombas called.
iRobot-Roomba Debug self.connected equals:False& self.continuous equals:True
iRobot-Roomba Debug Continuous ON and not connected..
iRobot-Roomba Debug getRoombaInfo for Downstairs Roomba
iRobot-Roomba Debug connecting Roomba Device: Downstairs Roomba
iRobot-Roomba Debug Using config file: /Users/<username>/Documents/Indigo-iRobotRoomba/<IP of roomba>-config.ini
iRobot-Roomba Debug CONTINUOUS connection
iRobot-Roomba Debug Reading Config File: <IP of roomba>-config.ini
iRobot-Roomba Debug Reading config file... /Users/<username>/Documents/Indigo-iRobotRoomba/<IP of roomba>-config.ini
iRobot-Roomba Debug reading info from config file /Users/<username>/Documents/Indigo-iRobotRoomba/<IP of roomba>-config.ini
iRobot-Roomba Debug Sections ['<IP of roomba>']
iRobot-Roomba Debug Posting DECODED data
iRobot-Roomba Debug Connecting: Downstairs Vac : <IP of roomba> : :<blid> : <password>
iRobot-Roomba Debug Connecting Downstairs Vac
iRobot-Roomba Debug Seting TLS
iRobot-Roomba Debug MQTT Client Succesfully setup
iRobot-Roomba Debug Client Connect Running now Downstairs Vac
iRobot-Roomba Debug Client LoopStart Running now Downstairs Vac
iRobot-Roomba Debug Roomba Connected Downstairs Vac
iRobot-Roomba Debug Roomba Connected with result code 2
iRobot-Roomba Debug Please make sure your blid and password are correct Downstairs Vac

Posted on
Mon Oct 08, 2018 3:54 pm
GlennNZ offline
Posts: 599
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

EricMcM wrote:
Thanks for the quick response. They are indeed pretty new and I just got this one. The house mapping is pretty cool. Here is the log. Happy to try stuff if it will help.

Thanks!

----
Stopped plugin "iRobot-Roomba 0.2.6"
Starting plugin "iRobot-Roomba 0.2.6" (pid 41058)
iRobot-Roomba
iRobot-Roomba ================================================ Initializing New Plugin Session =================================================
iRobot-Roomba Plugin name: iRobot-Roomba
iRobot-Roomba Plugin version: 0.2.6
iRobot-Roomba Plugin ID: com.GlennNZ.indigoplugin.irobot
iRobot-Roomba Indigo version: 7.1.1
iRobot-Roomba Python version: 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]
iRobot-Roomba Python Directory: /System/Library/Frameworks/Python.framework/Versions/2.7
iRobot-Roomba ==================================================================================================================================
iRobot-Roomba Debug logLevel = 10
Started plugin "iRobot-Roomba 0.2.6"
iRobot-Roomba Starting Roomba
iRobot-Roomba Debug updateFrequency = 86400.0
iRobot-Roomba Debug statusFrequency = 600.0
iRobot-Roomba Debug deviceStartComm called for Downstairs Roomba
iRobot-Roomba Debug checkALlRoombas called.
iRobot-Roomba Debug self.connected equals:False& self.continuous equals:True
iRobot-Roomba Debug Continuous ON and not connected..
iRobot-Roomba Debug getRoombaInfo for Downstairs Roomba
iRobot-Roomba Debug connecting Roomba Device: Downstairs Roomba
iRobot-Roomba Debug Using config file: /Users/<username>/Documents/Indigo-iRobotRoomba/<IP of roomba>-config.ini
iRobot-Roomba Debug CONTINUOUS connection
iRobot-Roomba Debug Reading Config File: <IP of roomba>-config.ini
iRobot-Roomba Debug Reading config file... /Users/<username>/Documents/Indigo-iRobotRoomba/<IP of roomba>-config.ini
iRobot-Roomba Debug reading info from config file /Users/<username>/Documents/Indigo-iRobotRoomba/<IP of roomba>-config.ini
iRobot-Roomba Debug Sections ['<IP of roomba>']
iRobot-Roomba Debug Posting DECODED data
iRobot-Roomba Debug Connecting: Downstairs Vac : <IP of roomba> : :<blid> : <password>
iRobot-Roomba Debug Connecting Downstairs Vac
iRobot-Roomba Debug Seting TLS
iRobot-Roomba Debug MQTT Client Succesfully setup
iRobot-Roomba Debug Client Connect Running now Downstairs Vac
iRobot-Roomba Debug Client LoopStart Running now Downstairs Vac
iRobot-Roomba Debug Roomba Connected Downstairs Vac
iRobot-Roomba Debug Roomba Connected with result code 2
iRobot-Roomba Debug Please make sure your blid and password are correct Downstairs Vac



Thanks

Try this one

Version 0.3.0
https://github.com/Ghawken/Indigo-iRobotRoomba

Download from main page and install - is version 0.3.0

Will need to get the password again from the iRoomba and may pay to delete the config file if any issues prior.

Probably some other changes in the information received will 'may' cause other issues - but this is the beginning of overcoming the connection issue currently.

Post any debug connection/get password logs if ongoing issues..

Glenn

Posted on
Mon Oct 08, 2018 5:08 pm
EricMcM offline
Posts: 11
Joined: May 13, 2016

Re: iRoomba 980 iRobot Plugin

no joy. The log is identical, except that the result code on the connect is now 4 instead of 2.

I verified by removing the config, the device, and the plugin and starting over.

Thanks!

Posted on
Mon Oct 08, 2018 5:11 pm
GlennNZ offline
Posts: 599
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

EricMcM wrote:
no joy. The log is identical, except that the result code on the connect is now 4 instead of 2.

I verified by removing the config, the device, and the plugin and starting over.

Thanks!


Sorry - it is really hard doing this blind.

Can you send the debug log of the attempt at getting password - the i7 returns different things during this than the 980.

G

Posted on
Mon Oct 08, 2018 5:15 pm
EricMcM offline
Posts: 11
Joined: May 13, 2016

Re: iRoomba 980 iRobot Plugin

sorry, is this the part you need?


iRobot-Roomba Debug getRoombaPassword called: 1511468957
iRobot-Roomba File should equal:/Users/<username>/Documents/Indigo-iRobotRoomba/<ip>-config.ini
iRobot-Roomba Debug waiting on port: 5678 for data
iRobot-Roomba Debug found 1 Roombas
iRobot-Roomba Make sure your robot (Downstairs Vac) at IP <ip> 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.
iRobot-Roomba Debug Received: {
"robotname": "Downstairs Vac",
"sku": "i755020",
"nc": 0,
"ver": "3",
"proto": "mqtt",
"ip": "<ip>",
"hostname": "iRobot-<host>",
"sw": "lewis+1.2.7+lewis-day-0-ota+9",
"robotid": "<id>",
"mac": "50:14:79:<dev id>",
"cap": {
"pp": 0,
"sched": 1,
"log": 2,
"ota": 2,
"area": 1,
"binFullDetect": 1,
"prov": 3,
"maps": 3,
"pose": 1,
"eco": 1,
"dockComm": 1,
"edge": 0,
"svcConf": 1,
"multiPass": 2,
"5ghz": 1
}
}
iRobot-Roomba Debug

Roomba (Downstairs Vac) IP address is: <IP>
iRobot-Roomba blid is: <blid>
iRobot-Roomba Password=> <passwd>
iRobot-Roomba Debug Using cfgfile:/Users/<username>/Documents/Indigo-iRobotRoomba/<IP>-config.ini
iRobot-Roomba Saved Device Config File/Password. Click OK to continue.

Posted on
Mon Oct 08, 2018 5:22 pm
GlennNZ offline
Posts: 599
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

Thanks

Have you added the <IP> and <blid> and <passwd> bits?

Are they all there? - because previously the error was no blid and no password? (which is what hopefully 0.3.0 fixes)
(Can you PM the un-edited log)

That actually looks fine - so seems to connect. May be other issues such as control.

G

Posted on
Mon Oct 08, 2018 5:41 pm
EricMcM offline
Posts: 11
Joined: May 13, 2016

Re: iRoomba 980 iRobot Plugin

yes, I removed the juicy bits. The connection does seem fine for that part (getting the password). It's during a regular connect where it gives the error.

Your comment prompted me to look a bit closer at the config. In the previous version, the blid was empty. In your new test version, it is fine. However, in both versions, there is an extra character (^@) at the end of the password (that character was not displayed in the log during password discovery). I removed this from the config and restarted the plugin, and now it is working.

Thanks!

Posted on
Mon Oct 08, 2018 5:44 pm
GlennNZ offline
Posts: 599
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

EricMcM wrote:
yes, I removed the juicy bits. The connection does seem fine for that part (getting the password). It's during a regular connect where it gives the error.

Your comment prompted me to look a bit closer at the config. In the previous version, the blid was empty. In your new test version, it is fine. However, in both versions, there is an extra character (^@) at the end of the password (that character was not displayed in the log during password discovery). I removed this from the config and restarted the plugin, and now it is working.

Thanks!


That good news - because if it was a change in the mqtt handling - we were out of luck.

Can you PM me the produced config file and the working one - and should be able to work backwards to remove and see where the extra characters come from (presume it is a line-return or similiar...)

G

Posted on
Mon Oct 08, 2018 6:28 pm
EricMcM offline
Posts: 11
Joined: May 13, 2016

Re: iRoomba 980 iRobot Plugin

It is a null (^@ as represented on command line an vi). May be an unpacking error in the library. Starting at line 213 in roomba.py I used partition to strip the null:


Code: Select all
                self.logger.info('Password=> %s <= Yes, all this string.' % str(data[7:]).partition(b'\0')[0])


                Config = configparser.ConfigParser()
                Config.add_section(addr)
                Config.set(addr,'blid',blid)
                Config.set(addr,'password',str(data[7:]).partition(b'\0')[0])


Once I saw this, I did look at the previous log and noticed that the "Yes, all this string" part did not show up in the log (consistent with there being a null in the string).

This is a workaround, but it shouldn't do anything if there is no null in the data (which I am presuming is the case for the other roomba models since they work with the existing code).

Posted on
Mon Oct 08, 2018 7:06 pm
GlennNZ offline
Posts: 599
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

EricMcM wrote:
It is a null (^@ as represented on command line an vi). May be an unpacking error in the library. Starting at line 213 in roomba.py I used partition to strip the null:
Code: Select all
                self.logger.info('Password=> %s <= Yes, all this string.' % str(data[7:]).partition(b'\0')[0])
                Config = configparser.ConfigParser()
                Config.add_section(addr)
                Config.set(addr,'blid',blid)
                Config.set(addr,'password',str(data[7:]).partition(b'\0')[0])


Once I saw this, I did look at the previous log and noticed that the "Yes, all this string" part did not show up in the log (consistent with there being a null in the string).
This is a workaround, but it shouldn't do anything if there is no null in the data (which I am presuming is the case for the other roomba models since they work with the existing code).


Probably part of the tracking down the issue was not having the full log - as the 'Yes all this string' and the extra character would have illustrated the additional password output being received.

I'm glad it is working for you - I am slightly reluctant to post potentially breaking changes for everyone else without actually seeing any of the output received - but agree partition would seem to work by removing the first part of string prior to this null entry; with no exception if no null characters.

Presume iroomba has changed to having a null-terminated password for some reason.

Glennb

Posted on
Mon Oct 08, 2018 7:44 pm
EricMcM offline
Posts: 11
Joined: May 13, 2016

Re: iRoomba 980 iRobot Plugin

yep, I agree. I was just passing on what I saw, and I'm perfectly happy with this workaround (and many thanks for the plugin!).

I posted the whole log for the password discovery and only removed sensitive information without touching anything else, and the "Yes, all this string" was missing (the print was cut off by the null in the string).

Thanks for your help!

Posted on
Mon Oct 08, 2018 7:58 pm
GlennNZ offline
Posts: 599
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

EricMcM wrote:
yep, I agree. I was just passing on what I saw, and I'm perfectly happy with this workaround (and many thanks for the plugin!).
I posted the whole log for the password discovery and only removed sensitive information without touching anything else, and the "Yes, all this string" was missing (the print was cut off by the null in the string).
Thanks for your help!


No problem at all! Thanks for your help. It is the bug bear I'm sure of any developer is the log-less support questions!
But you fixed the problem yourself so well done! I'll retire now....

I have added the partition to version 0.3.1 now up on github; hopefully won't cause any backward issues and will test when back home

Thanks

Glenn

Posted on
Tue Oct 09, 2018 1:29 am
GlennNZ offline
Posts: 599
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

Thanks for all the help

Have posted
Version 0.3.1
With fixes for compatibility with iRoomba just released i7 Robot line.

May be some further testing needed - but first reports good.

In PluginStore.

Glenn

Page 4 of 9 1, 2, 3, 4, 5, 6, 7 ... 9

Who is online

Users browsing this forum: No registered users and 1 guest