iRoomba iRobot Plugin

Posted on
Tue Dec 08, 2020 9:42 am
t-star offline
Posts: 80
Joined: Oct 26, 2007

Re: iRoomba iRobot Plugin

Start, Pause and dock work via plugin. have not tried anything else yet. looks good so far. As a note others. I did have to check the force SSL23 box for it to work.

Posted on
Wed Mar 10, 2021 1:50 pm
boekweg offline
Posts: 65
Joined: Oct 02, 2010
Location: Netherlands

Re: iRoomba iRobot Plugin

Hi Glenn, I have been using the iRoomba plugin for quite a while now and it works great and never fails on my 900 series. I have plugin 0.5.0
I bought another iRoomba i7 series for upstairs and it looks like I'm able to get it as a device in Indigo when I use the ssl checkbox, but the new created device only acts as a copy of my first 900 series. So If I start my 900 series machine I have two devices in Indigo that respond to it, but newly created device doesn't. Is there something that I have to alter to get two separate machines in Indigo? I Tried the later plugin version that I found in the user forum but that one does nt work at all on my roomba's.

- Paul

Posted on
Wed Mar 10, 2021 2:18 pm
GlennNZ offline
Posts: 830
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba iRobot Plugin

Hi,

That’s no good.

For you to run 2 or more iroombas that plugin has to connect/disconnect. In the plugin config setting there is a checkbox to enable multiple iroomba support. ‘Continuous connection;uncheck to enable multiple iroomba support’.

If haven’t stopped this - try this in first instance and if ongoing issues - PM me the a few logs/including getting password.

i7 is supported and should work...

Glenn


Sent from my iPad using Tapatalk

Posted on
Fri Mar 26, 2021 4:32 am
Argelix offline
Posts: 10
Joined: Dec 08, 2016

Re: iRoomba iRobot Plugin

Hi,

I just installed 0.5.6 on a new Indigo-installation on a new Mac Mini and hooked up a Roomba 980 and a Roomba s9+. Installing mqtt took quite a bit of trial error and getting the password for the 980 was a hassle. Somewhere (Indigo?) there is a 10s timeout and it seems to take a tiny bit over that. After about 20 tries it managed to fetch it though and since then everything kind of works.

I have an action to start both of them, it's seems to be pure luck if any of them start. The action to dock them both has the same problem; and it seems the s9+ needs to be paused first, I never got it to just dock. The 980 seems to have more communication problems, in both cases I would say the WiFi coverage should be good enough.

I turned on debug logging, two things stood out:

sometimes it prints "Error within RoombaAction:'NoneType' object has no attribute 'send_command'".

Here is the log of one action:

Code: Select all
 Action Group                    Start cleaning
 iRobot-Roomba Debug             startRoombaAction for Roomba - Top: Action : start
 iRobot-Roomba Debug             connecting Roomba Device: Roomba - Top
 iRobot-Roomba Debug             Using config file: /Users/dlorenz/Documents/Indigo-iRobotRoomba/192.168.178.1
 iRobot-Roomba Debug             CONTINUOUS connection
 iRobot-Roomba Debug             Reading Config File: 192.168.178.142-config.ini
 iRobot-Roomba Debug             Reading config file... /Users/dlorenz/Documents/Indigo-iRobotRoomba/192.168.1
 iRobot-Roomba Debug             reading info from config file /Users/dlorenz/Documents/Indigo-iRobotRoomba/19
 iRobot-Roomba Debug             Sections ['192.168.178.142']
 iRobot-Roomba Debug             Posting DECODED data
 iRobot-Roomba Debug             Connecting: Top Roomba  :  192.168.178.142  :  :1:1616662260:ejtcWX5r4nn5KghP
 iRobot-Roomba Debug             Connecting Top Roomba
 iRobot-Roomba Debug             Selecting the best SSL TLS Settings
 iRobot-Roomba Debug             s9 iRoomba VERSION:  Using Protocol SSLv23
 iRobot-Roomba Debug             MQTT Client Succesfully setup
 iRobot-Roomba Debug             Client Connect Running now Top Roomba
 iRobot-Roomba Debug             Client LoopStart Running now Top Roomba
 iRobot-Roomba Debug             Roomba Connected Top Roomba
 iRobot-Roomba Debug             Received COMMAND: start
 iRobot-Roomba Debug             Publishing Roomba Command : {"command": "start", "time": 1616755560, "initiat
 iRobot-Roomba Debug             disconnecting Roomba Device: Roomba - Top
 iRobot-Roomba Debug             {u'state': OrderedDict([(u'reported', OrderedDict([(u'batPct', 100), (u'batte
 iRobot-Roomba Debug             Disconnected From Roomba Top Roomba
 iRobot-Roomba Debug             getRoomba Info Running..
 iRobot-Roomba Debug             getRoombaInfo for Roomba - Top
 iRobot-Roomba Debug             connecting Roomba Device: Roomba - Top
 iRobot-Roomba Debug             Using config file: /Users/dlorenz/Documents/Indigo-iRobotRoomba/192.168.178.1
 iRobot-Roomba Debug             CONTINUOUS connection
 iRobot-Roomba Debug             Reading Config File: 192.168.178.142-config.ini
 iRobot-Roomba Debug             Reading config file... /Users/dlorenz/Documents/Indigo-iRobotRoomba/192.168.1
 iRobot-Roomba Debug             reading info from config file /Users/dlorenz/Documents/Indigo-iRobotRoomba/19
 iRobot-Roomba Debug             Sections ['192.168.178.142']
 iRobot-Roomba Debug             Posting DECODED data
 iRobot-Roomba Debug             Connecting: Top Roomba  :  192.168.178.142  :  :1:1616662260:ejtcWX5r4nn5KghP
 iRobot-Roomba Debug             Connecting Top Roomba
 iRobot-Roomba Debug             Selecting the best SSL TLS Settings
 iRobot-Roomba Debug             s9 iRoomba VERSION:  Using Protocol SSLv23
 iRobot-Roomba Debug             MQTT Client Succesfully setup
 iRobot-Roomba Debug             Client Connect Running now Top Roomba
 iRobot-Roomba Debug             Client LoopStart Running now Top Roomba
 iRobot-Roomba Debug             Roomba Connected Top Roomba
 iRobot-Roomba Debug             startRoombaAction for Roomba - Bottom: Action : start
 iRobot-Roomba Debug             Received COMMAND: start
 iRobot-Roomba Debug             Publishing Roomba Command : {"command": "start", "time": 1616755570, "initiat
 iRobot-Roomba Debug             disconnecting Roomba Device: Roomba - Bottom
 iRobot-Roomba Debug             {u'state': OrderedDict([(u'reported', OrderedDict([(u'batPct', 100), (u'batte
 iRobot-Roomba Debug             Disconnected From Roomba Top Roomba
 iRobot-Roomba Debug             disconnecting Roomba Device: Roomba - Top


In the end it is disconnecting from Roomba - Bottom, then Disconnected from Top Roomba and *then* disconnecting from Roomba - Top? Also, there never was a Disconnected from Bottom Roomba. Usually I would say there is some multithreading going on but as far as I understood the plugin can only ever talk to one Roomba at a time, so how can the logging be out of order? Maybe somewhere the next connection is started while the old one is still going on and that spills over? Just guessing...

I'd be happy to help analyzing/fixing these problems, I know just enough about programming to be dangerous :-)

Thanks,
Dix

Posted on
Fri Mar 26, 2021 4:54 pm
GlennNZ offline
Posts: 830
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba iRobot Plugin

That’s no good.

The get password bit is a bit of a pain - more so have to press the indigo button and the iroomba button combination within a few seconds of each other. The indigo dialog timeout doesn’t affect whether password got or not. But once done = done.

The other aspect - probably is the dual connection issue. I only have one, as went in another manufacturers direction. Was tempted by S9+ but stock non-existent and reviews about failures somewhat off-putting. Plus the price!

Would check update device frequency is high in config settings.
&
Continuous connection off (which seems to be despite the logging, which I need to check)

I’ll have a look and see if can make my one Roomba look like 2 to test. Currently based on IP address; but will see about modifying this bit temporality.

The first bit of what you have logged (below) - all makes sense - this is a command being sent, plugin connecting to iRoomba (because cannot stay connected), and sending command and then disconnecting.

Code: Select all
 Action Group                    Start cleaning
 iRobot-Roomba Debug             startRoombaAction for Roomba - Top: Action : start
 iRobot-Roomba Debug             connecting Roomba Device: Roomba - Top
 iRobot-Roomba Debug             Using config file: /Users/dlorenz/Documents/Indigo-iRobotRoomba/192.168.178.1
 iRobot-Roomba Debug             CONTINUOUS connection
 iRobot-Roomba Debug             Reading Config File: 192.168.178.142-config.ini
 iRobot-Roomba Debug             Reading config file... /Users/dlorenz/Documents/Indigo-iRobotRoomba/192.168.1
 iRobot-Roomba Debug             reading info from config file /Users/dlorenz/Documents/Indigo-iRobotRoomba/19
 iRobot-Roomba Debug             Sections ['192.168.178.142']
 iRobot-Roomba Debug             Posting DECODED data
 iRobot-Roomba Debug             Connecting: Top Roomba  :  192.168.178.142  :  :1:1616662260:ejtcWX5r4nn5KghP
 iRobot-Roomba Debug             Connecting Top Roomba
 iRobot-Roomba Debug             Selecting the best SSL TLS Settings
 iRobot-Roomba Debug             s9 iRoomba VERSION:  Using Protocol SSLv23
 iRobot-Roomba Debug             MQTT Client Succesfully setup
 iRobot-Roomba Debug             Client Connect Running now Top Roomba
 iRobot-Roomba Debug             Client LoopStart Running now Top Roomba
 iRobot-Roomba Debug             Roomba Connected Top Roomba
 iRobot-Roomba Debug             Received COMMAND: start
 iRobot-Roomba Debug             Publishing Roomba Command : {"command": "start", "time": 1616755560, "initiat
 iRobot-Roomba Debug             disconnecting Roomba Device: Roomba - Top
 iRobot-Roomba Debug             {u'state': OrderedDict([(u'reported', OrderedDict([(u'batPct', 100), (u'batte
 iRobot-Roomba Debug             Disconnected From Roomba Top Roomba


What follows is the usual connection after a period of time. Check your Plugin Config 'Update device status frequency (minutes)'
Set this to 10 minutes or so. That what is clashing here I believe...

On further looking I can see issue which will try to fix in 0.5.8 = does come about when already connected to one device and quickly send command to the other.
Changing the Update frequency here to a longer number will help and stop your example. But will see if I can more robustly fix.
(Unfortunately I can't test as one iroomba just rejects a 2nd separate connection attempt ...)

Clearly more and more 2-3-4 iroomba homes and have been a couple of issues on this front. Will see what I can come up with.
Looking now - its problematic to test without 2 iroombas but will see what can do.

On the other note of some commands failing to respond. The different models have different responses to different commands. Eg. Some dock only works if stopped first etc. so may need a combo of command stop-dock.

Edit:
See above pointers and can try 0.5.8 on github.
This is 0.5.8
https://github.com/Ghawken/Indigo-iRobo ... 1795644a32

0.5.8 is minor update but I believe will overcome most of the dual connection issues; by checking more robustly for device connected.

Below is far bigger update 0.6.0
Changes to continuous connection for all iRoombas connected; means instant commands and 60secondly updates of states for all devices

Can also have multiple devices for same iRoomba (not sure why would want to) and if Roomba Name is the same will all be duplicates. (caveat to this all iRoombas need to have distinct names set in their app - which yours do I see)

Pretty happy single device is working well with this version... but still hard to test two+ continuous connections. May still be some bugs, but believe the bulk of the work is done will just be sorting out the odd bug that I can't access.

Welcome to test and report back, and email PM/email/post debug log. (can drop back to 0.5.8 if this fails; nothing breaking on device front)
https://github.com/Ghawken/Indigo-iRobotRoomba


Glenn

Posted on
Sun Mar 28, 2021 2:40 am
Argelix offline
Posts: 10
Joined: Dec 08, 2016

Re: iRoomba iRobot Plugin

I had never changed the update frequency from 10 minutes.

I first tried the current (Sunday European morning, 0.6.2) version from GitHub, that didn't find either of the configuration files so I had to get password on both of them. Although that worked, the plugin practically went into a reset loop because it would not find one of the Roombas.

After 5 mins of that I downgraded to 0.5.8; no more reset loop and it seems to work much better than 0.5.6. On the first try one didn't start and on the second try the other paused but didn't dock. But I might have been too impatient, on try 3 and 4 I saw some commands being executed up to a minute later.

Posted on
Sun Mar 28, 2021 3:28 am
GlennNZ offline
Posts: 830
Joined: Dec 07, 2014
Location: Central Coast, Australia

iRoomba iRobot Plugin

Okay

Can you send me the debug log from 0.6.2? (of the reset loop? And may shed light as to why config files weren’t used)
(Should be saved in plug-in logs directory even if downgraded)

Will be something straightforward. May need to remove the reset (see below have done so blindly on 0.6.3)

But:

Any idea why it didn’t find the iroomba?

Nothing has changed with the config files - I have upgraded dev and prod machines back and forward versions and it has found and used them without skipping beat... Not sure why you had different behaviour. Presumably when went back to 0.5.8 didn't need to Get Password again? Still should be able to move up without needing to do this.

EDIT:
Timezones are going to be a bugger as usual
But can try 0.6.3 update just now

0.6.3
Code: Select all
Changes Plugin Restart code given multiple devices- checks every hour and if no connected iRoomba after 4 checks will restart plugin.py.
(Found was needed as often after days -weeks-months of connection something fails at one end or another.  Restarting plugin and resetting the iRoomba connection completely was the best fix.  Nothing else completely worked)


But
Nothing has changed with Config Files or there support.
If failing to load config file following upgrade may be OSX security?

Can check files contents and copy and past old ones as needed. (I swap them from one computer to another as needed, via copy/paste)

Occasionally after updating from github find get security alert from Big Sur and need to then run
Terminal Command below:

Code: Select all
sudo xattr -rd com.apple.quarantine /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7.5/Plugins


As mentioned the major changes in 0.6.0 line are done, no going back now (well not easily)
Will be some minor bugs which need 2 connected iRoombas to trouble suit but some debug logs should enable that fairly quickly I would guess...



Glenn

Posted on
Sun Mar 28, 2021 5:57 am
Argelix offline
Posts: 10
Joined: Dec 08, 2016

Re: iRoomba iRobot Plugin

unfortunately I didn't think to use debug for 0.6.2. No idea why it would not find the config files; going back to 0.5.8 I didn't need to do the passwords again.

I always get the security alerts, getting around it using system preferences, then reloading plugin and confirming once more, then it does run.

Testing 0.6.3: I didn't need to get the passwords again and there was no reset loop. But then, it finds both of them ok atm, seems to be stable. Trying it out the first time:

Code: Select all
   iRobot-Roomba Debug             startRoombaAction for Roomba - Top: Action : start
   iRobot-Roomba Debug             Roomba Name:Top Roomba
   iRobot-Roomba Debug             startRoombaAction for Roomba - Bottom: Action : start
   iRobot-Roomba Debug             Roomba Name:Bottom Roomba
   iRobot-Roomba Debug             Connecting: Bottom Roomba  :  192.168.178.74  :  :1:1496074962:mVfImUOLM2iVO2NQ
   iRobot-Roomba Debug             Connection Roomba Error: not all arguments converted during string formatting
   iRobot-Roomba Debug             Attempting new Connection# 1
   iRobot-Roomba Debug             Connecting: Bottom Roomba  :  192.168.178.74  :  :1:1496074962:mVfImUOLM2iVO2NQ
   iRobot-Roomba Debug             Connecting Bottom Roomba
   iRobot-Roomba Debug             Client Connect Running now Bottom Roomba
   iRobot-Roomba Debug             Connection Roomba Error: 61
   iRobot-Roomba Debug             Attempting new Connection# 2
   iRobot-Roomba Debug             Connecting: Bottom Roomba  :  192.168.178.74  :  :1:1496074962:mVfImUOLM2iVO2NQ
   iRobot-Roomba Debug             Connecting Bottom Roomba
   iRobot-Roomba Debug             Client Connect Running now Bottom Roomba
   iRobot-Roomba Debug             Client LoopStart Running now Bottom Roomba
   iRobot-Roomba Debug             Received COMMAND: start
   iRobot-Roomba Debug             Publishing Roomba Command : {"command": "start", "time": 1616938253, "initiator": "localApp"}
   iRobot-Roomba Debug             Roomba Connected Bottom Roomba


Top Roomba (The s9+) doesn't start at all, it seems as if the plugin doesn‘t communicate with it at all. Although the device has a valid status, even when trying the action again:

Code: Select all
  iRobot-Roomba Debug             startRoombaAction for Roomba - Top: Action : start
   iRobot-Roomba Debug             Roomba Name:Top Roomba
   iRobot-Roomba Debug             startRoombaAction for Roomba - Bottom: Action : start
   iRobot-Roomba Debug             Roomba Name:Bottom Roomba
   iRobot-Roomba Debug             Sending Command to myroomba:Bottom Roomba and action:start
   iRobot-Roomba Debug             Received COMMAND: start
   iRobot-Roomba Debug             Publishing Roomba Command : {"command": "start", "time": 1616938798, "initiator": "localApp"}


Same thing for stopping, only bottom roomba gets a command sent. I tried switching the order around and still only the Bottom Roomba got a command sent.
Reloading the plugin didn't change anything.

Posted on
Sun Mar 28, 2021 2:14 pm
GlennNZ offline
Posts: 830
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba iRobot Plugin

Ok

Not sure system preferences would cover everything within the plugin. The string format error is odd, as is the config file access issue.

Update to new version - 0.6.4 - add new DebugOther checkbox - keep this enabled to maximise information. Check this one below:

Image

When you the below "cannot be opened because the developer cannot be verified..." message
after downloading and updating plugin

Image

Whilst this message is on screen, from a terminal run (copy and paste) the mentioned command below. (provided running Indigo 7.5 - otherwise change to version.

Code: Select all
sudo xattr -rd com.apple.quarantine /Library/Application\ Support/Perceptive\ Automation/Indigo\ 7.5/Plugins


Once run, click Cancel on the image above. Indigo will show some red error messages, then reload the plugin and all should be up-to-date.

Are going to need some logs to get 2 connections working:
Old logs, including debug logs are saved in ‘Event logs folder’. Click the button to the top right of indigo log window and find the iroomba plugin folder.

Would suggest turning new log checkbox on.
Reload plugin, send a few commands to each iRoomba 10-20 seconds apparent and send me the log file? Either PM or upload somewhere that suits.


Thanks


Sent from my iPad using Tapatalk

Posted on
Mon Mar 29, 2021 12:58 am
Argelix offline
Posts: 10
Joined: Dec 08, 2016

Re: iRoomba iRobot Plugin

I sent a PM with the logs from yesterday and today with 0.6.4

Posted on
Tue Mar 30, 2021 1:18 am
GlennNZ offline
Posts: 830
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba iRobot Plugin

Hi all,

Though should update this thread before I forget. After above PM and a couple of logs have helped resolved the few minor multiple connection issues.

New version on GitHub - overcomes above issues on our testing.

Version 0.6.8
Allows multiple (unlimited) vacuums/mops iroomba devices each continuous connected and instantaneously command-able. Status updates flow every 60 seconds.
Adds ‘evac’ command to empty iRoomba into bin
Add check for unknown states in case, new states/new robots/mops.
Fix Action for getInfo (shouldn't really be needed as all states updated every 1 minute)

Welcome to test further before release.


Sent from my iPad using Tapatalk

Who is online

Users browsing this forum: No registered users and 1 guest