iRoomba iRobot Plugin

Posted on
Tue May 23, 2017 11:40 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

iRoomba iRobot Plugin

Hi all,

Image

New iRoomba Robot Plugin to support the iRoomba mqtt communication protocol. (as of firmware v.2.2.9-1 29th December 2017). This was helped a lot by a recent python library for roomba control.

Models Supported: Confirmed in this post by other users.
- 980 Model https://store.irobot.com/default/roomba ... 80020.html
- 985 Model
- i7 and i7+ Model https://store.irobot.com/default/roomba ... 15020.html
- j7, j7+ combo


Currently - have it functioning well and it enables a continuous connection to one or more iroomba

The benefit of continuous connection is status is updated immediately - so can trigger events to occur which happen within a few seconds; Status is immediately updated.
The library I am using also supports mapping/drawing a map of cleaning - which I would imagine would look good on a control page. (I haven't worked through those aspects as yet - but have it on a todo list)

Installation:

If
Indigo 7 Only:
Needs paho-mqtt for python installed via terminal window:
Within a terminal Window:
Code: Select all
 sudo pip install paho-mqtt 


Or if using version of Indigo 2022.1 and python 3 version of plugin 0.9.13+
Code: Select all
pip3 install paho-mqtt


Or if on latest Indigo 2023.2 + version, and python 3 plugin version of 0.9.35+
Does not need any libraries installed (well actually we need one more, aiohttp and paho-matt) but Indigo will manage this on install/or update!
So no terminal commands needed = just double click bundle to install.

https://www.indigodomo.com/pluginstore/132/
or
https://github.com/Ghawken/Indigo-iRobotRoomba

Setup

For this plugin to work correctly you irobot needs to have a fixed IP address so to know whom it is. Assign your iroomba a fixed IP address; either a router level (would be my recommendation) or within iroomba setup.

Install the plugin.

Configure the Plugin:
Image

Create your iroomba Device
Image

&
Edit Settings

Image

Roomba IP Address: Enter the IP address (fixed ideally) of your iroomba robot

This can be a slightly tricky part as need to be quick between activating iroomba with holding Home button (four notes confirm) and pressing the Get Password button.
Indigo will also give a timeout error (as communication takes longer than allowed). This can be ignored.
This will possibility take a couple of goes to establish communication.

It then saves the communication password to a IP address based config file and will use this file if you happen to delete you device.


Status

The plugin reports the following status - and this is updated live in the setting of continuous communication.

Image


Hopefully all straightforward
batPct - Battery Percentage
Binfull - true or false
Cycle - the cycle iroomba is currently performing
Error Code/Error Texts if any
RechargeM - time to be recharged
SqfFT - Square Feet cleaned
X & Y - Current Position
deviceStatus - running etc.

Actions

The plugin supports the following actions to control you iroomba.

Image




What could go wrong:

1. Connection fails with a 'Broken Pipe' Error:

Debug info may display the following info about your iroomba during the Get Password connection phase:
Code: Select all
iRobot-Roomba Debug Received: {
"robotname": "pmgk roomba rdc ",
"sku": "R980020",
"nc": 0,
"ver": "2",
[b]"proto": "http",[/b]
"ip": "192.168.1.13",
"hostname": "Roomba-",
[b]"sw": "v1.6.4", [/b]
"mac": "
}


This means that your iroomba is on very old software 1.6.4 and is still using its old http protocol. The iroomba automatically update when connected to cloud after a short period of time (unless blocked at firewall level).
This plugin only works on the newer firmware version.
Wait it out and your iroomba will be updated and try again.

2. If you do not have a fixed IP address for your device it will lose its connection when this is updated by your dhcp server. Set it to fixed.

3. Occasionally if the plugin loses its connection to iroomba it will restart the plugin itself to reestablish. It does this automatically with no user input required.




Glenn
Last edited by GlennNZ on Sat Oct 29, 2022 7:36 pm, edited 14 times in total.

Posted on
Thu Aug 31, 2017 2:23 pm
RAID5 offline
Posts: 104
Joined: Jan 16, 2015
Location: Sweden

Re: iRoomba 980 iRobot Plugin

Hi

Does this plugin only work with 980 or does it also work with for example 696 that also have iRobot home app?

RAID5 "A happy Swede addicted to automation"

Posted on
Thu Aug 31, 2017 10:23 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

As far as I understand it should work with all Wi-Fi enabled Roombas (980, 960, 890, 690)

But obviously untested.

Posted on
Wed Dec 27, 2017 6:49 pm
pmgendon offline
Posts: 35
Joined: Apr 20, 2015

Re: iRoomba 980 iRobot Plugin

Hi Glen,

I just updated to 0.2.1 and I can't connect to the roomba, I,m sure I have the right IP address (192.168.1.13 ) and this is the log:

iRobot-Roomba Debug getRoombaPassword called: 1397712158
iRobot-Roomba Debug file should equal:/Users/++++/Documents/Indigo-iRobotRoomba/192.1668.1.13-config.ini
iRobot-Roomba Debug waiting on port: 5678 for data
iRobot-Roomba Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 301, in getRoombaPassword
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 78, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 118, in get_password
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 90, in receive_udp
gaierror: (8, 'nodename nor servname provided, or not known')

can you help me with this problem.

best!!

Posted on
Wed Dec 27, 2017 7:03 pm
pmgendon offline
Posts: 35
Joined: Apr 20, 2015

Re: iRoomba 980 iRobot Plugin

tried rebooting my mac, here's a revised version of the log

Dec 27, 2017, 7:59:25 PM
iRobot-Roomba Debug getRoombaPassword called: 531666929
iRobot-Roomba Debug file should equal:/Users/-----/Documents/Indigo-iRobotRoomba/192.168.1.13-config.ini
iRobot-Roomba Debug waiting on port: 5678 for data
iRobot-Roomba Debug found 1 Roombas
iRobot-Roomba Make sure your robot (pmgk roomba rdc ) at IP 192.168.1.13 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": "pmgk roomba rdc ",
"sku": "R980020",
"nc": 0,
"ver": "2",
"proto": "http",
"ip": "192.168.1.13",
"hostname": "Roomba-6977840021932810",
"sw": "v1.6.4",
"mac": "F0:03:8C:53:35:3D"
}
iRobot-Roomba Debug

Roomba (pmgk roomba rdc ) IP address is: 192.168.1.13
iRobot-Roomba Debug Connection Error [Errno 61] Connection refused
iRobot-Roomba Error getting password. Follow the instructions and try again.
iRobot-Roomba Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 301, in getRoombaPassword
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 78, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 157, in get_password
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 687, in send
error: [Errno 32] Broken pipe

Posted on
Wed Dec 27, 2017 7:03 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

pmgendon wrote:
Hi Glen,

I just updated to 0.2.1 and I can't connect to the roomba, I,m sure I have the right IP address (192.168.1.13 ) and this is the log:

iRobot-Roomba Debug getRoombaPassword called: 1397712158
iRobot-Roomba Debug file should equal:/Users/++++/Documents/Indigo-iRobotRoomba/192.1668.1.13-config.ini
iRobot-Roomba Debug waiting on port: 5678 for data
iRobot-Roomba Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 301, in getRoombaPassword
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 78, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 118, in get_password
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 90, in receive_udp
gaierror: (8, 'nodename nor servname provided, or not known')

can you help me with this problem.

best!!


Sure.

Sorry the documentation is a bit lacking. (on the to do list)

From the log it would appear that you have the IP address wrong - 192.1668.1.13 - note the extra 6.

As per the window - need to hold down the home button until 4 notes are played and then click Get Password (really quickly!). Can try to press just before - but often needs a few goes.

Glenn

Posted on
Wed Dec 27, 2017 7:07 pm
pmgendon offline
Posts: 35
Joined: Apr 20, 2015

Re: iRoomba 980 iRobot Plugin

thanks for the reply, i feel dumb for that extra 6 :evil: .

this is the new error I'm getting:

Dec 27, 2017, 7:59:25 PM
iRobot-Roomba Debug getRoombaPassword called: 531666929
iRobot-Roomba Debug file should equal:/Users/++++/Documents/Indigo-iRobotRoomba/192.168.1.13-config.ini
iRobot-Roomba Debug waiting on port: 5678 for data
iRobot-Roomba Debug found 1 Roombas
iRobot-Roomba Make sure your robot (pmgk roomba rdc ) at IP 192.168.1.13 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": "pmgk roomba rdc ",
"sku": "R980020",
"nc": 0,
"ver": "2",
"proto": "http",
"ip": "192.168.1.13",
"hostname": "Roomba-6977840021932810",
"sw": "v1.6.4",
"mac": "F0:03:8C:53:35:3D"
}
iRobot-Roomba Debug

Roomba (pmgk roomba rdc ) IP address is: 192.168.1.13
iRobot-Roomba Debug Connection Error [Errno 61] Connection refused
iRobot-Roomba Error getting password. Follow the instructions and try again.
iRobot-Roomba Error Error in plugin execution UiAction:

Traceback (most recent call last):
File "plugin.py", line 301, in getRoombaPassword
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 78, in __init__
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/iRobot-Roomba.indigoPlugin/Contents/Server Plugin/roomba.py", line 157, in get_password
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 687, in send
error: [Errno 32] Broken pipe

Posted on
Wed Dec 27, 2017 7:08 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

pmgendon wrote:
"robotname": "pmgk roomba rdc ",
"sku": "R980020",
"nc": 0,
"ver": "2",
"proto": "http",
"ip": "192.168.1.13",
"hostname": "Roomba-6977840021932810",
"sw": "v1.6.4",
"mac": "F0:03:8C:53:35:3D"
}
iRobot-Roomba Debug

Roomba (pmgk roomba rdc ) IP address is: 192.168.1.13
iRobot-Roomba Debug Connection Error [Errno 61] Connection refused
iRobot-Roomba Error getting password. Follow the instructions and try again.
iRobot-Roomba Error Error in plugin execution UiAction:
e


Thanks for this. Was writing another reply when this came through.

The interesting thing is the 'proto' http (!) and the sw of 1.6.4
You are on now quite old software for iRobot (is it blocked from connecting to the internet? As typically hard to stop it updating to new 2.2.9-1 sw)

This plugin won't work on that old version of software.

FlyerDiver - older plugin - still should work though.

Finding it now.
https://github.com/FlyingDiver/Indigo-Roomba

Although as soon as updates to newer software will die. If a new purchase would just leave alone for a few hours/day and will be on 2.2.9-1 software before you know it. Set up this plugin then.


Glenn

Posted on
Wed Dec 27, 2017 7:11 pm
pmgendon offline
Posts: 35
Joined: Apr 20, 2015

Re: iRoomba 980 iRobot Plugin

Awesome, thanks, it's a new purchase, i'll wait for the upgrade.

cheers, thanks for your help.

happy holidays!!

Posted on
Wed Dec 27, 2017 10:45 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

pmgendon wrote:
Awesome, thanks, it's a new purchase, i'll wait for the upgrade.

cheers, thanks for your help.

happy holidays!!


Cool. Thanks. Let me know how you go.
If have one only would enable the “continuous connection” option in plugin config.
Thats how I run it and going well.

Keep meaning to add as default on - will do so on 0.22!
Glenn


Sent from my iPhone using Tapatalk

Posted on
Thu Dec 28, 2017 11:12 am
pmgendon offline
Posts: 35
Joined: Apr 20, 2015

Re: iRoomba 980 iRobot Plugin

It works great!

I binded a keypad button to the start the roomba and now I'm wondering how can I turn the button off once the roomba is done cleaning. I can't figure out how the status function works.

thanks

pm

Posted on
Thu Dec 28, 2017 3:03 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

iRoomba 980 iRobot Plugin

pmgendon wrote:
It works great!

I binded a keypad button to the start the roomba and now I'm wondering how can I turn the button off once the roomba is done cleaning. I can't figure out how the status function works.

thanks

pm

Hi
You mean a control page button?

The iRobot has separate action commands for start, stop etc. Mainly because there is also dock as command. I will create a action that toggles start/dock depending on status. I have a control page with status and then seperate buttons for start, resume, stop and dock.

The plugin has actions - create a Acton group - iRobot-Roomba actions, select your device and then - select from stop, start, dock or resume.

As I said I need to complete the documentation! Any questions ask away; as it make that process easier.
(have made a start and updated the first page)

Glenn

Posted on
Mon Jan 01, 2018 4:58 pm
tatrog offline
Posts: 39
Joined: Nov 16, 2013

Re: iRoomba 980 iRobot Plugin

Communication Error and plugin keep restarting. New Roomba 980
I installed via PIP the Mqtt package and I get the following debug logs. Help please? I tried to install Mqtt again but it tells be that install has been satisfied. Thanks!


Stopped plugin "iRobot-Roomba 0.2.2"
Starting plugin "iRobot-Roomba 0.2.2" (pid 638)
iRobot-Roomba Debug logLevel = 10
Started plugin "iRobot-Roomba 0.2.2"
iRobot-Roomba Starting Roomba
iRobot-Roomba Debug updateFrequency = 86400.0
iRobot-Roomba Debug statusFrequency = 600.0
iRobot-Roomba Debug deviceStartComm called for Roomba Marvin
iRobot-Roomba Debug Continuous ON and not connected..
iRobot-Roomba Debug getRoombaInfo for Roomba Marvin
iRobot-Roomba Debug connecting Roomba Device: Roomba Marvin
iRobot-Roomba Debug Using config file: /Users/gerrytatro/Documents/Indigo-iRobotRoomba/192.168.55.230-config.ini
iRobot-Roomba Debug CONTINUOUS connection
iRobot-Roomba Debug Reading Config File: 192.168.55.230-config.ini
iRobot-Roomba Debug Reading config file... /Users/gerrytatro/Documents/Indigo-iRobotRoomba/192.168.55.230-config.ini
iRobot-Roomba Debug reading info from config file /Users/gerrytatro/Documents/Indigo-iRobotRoomba/192.168.55.230-config.ini
iRobot-Roomba Debug Sections ['192.168.55.230']
iRobot-Roomba Debug Posting DECODED data
iRobot-Roomba Debug Connecting: Marvin : 192.168.55.230 : bnfCuSe3xXYIJhSX
iRobot-Roomba Debug Connecting Marvin
iRobot-Roomba Debug Please install paho-mqtt '<sudo> pip install paho-mqtt' to use this library
iRobot-Roomba Debug Client Connect Running now Marvin
iRobot-Roomba Debug Connection Roomba Error: 'NoneType' object has no attribute 'connect'
iRobot-Roomba Debug Attempting new Connection# 1
iRobot-Roomba Debug Connecting: Marvin : 192.168.55.230 : bnfCuSe3xXYIJhSX
iRobot-Roomba Debug Connecting Marvin
iRobot-Roomba Debug Please install paho-mqtt '<sudo> pip install paho-mqtt' to use this library
iRobot-Roomba Debug Client Connect Running now Marvin
iRobot-Roomba Debug Connection Roomba Error: 'NoneType' object has no attribute 'connect'
iRobot-Roomba Debug Attempting new Connection# 2
iRobot-Roomba Debug Connecting: Marvin : 192.168.55.230 : bnfCuSe3xXYIJhSX
iRobot-Roomba Debug Connecting Marvin
iRobot-Roomba Debug Please install paho-mqtt '<sudo> pip install paho-mqtt' to use this library
iRobot-Roomba Debug Client Connect Running now Marvin
iRobot-Roomba Debug Connection Roomba Error: 'NoneType' object has no attribute 'connect'
iRobot-Roomba Debug Attempting new Connection# 3
iRobot-Roomba Debug Connecting: Marvin : 192.168.55.230 : bnfCuSe3xXYIJhSX
iRobot-Roomba Debug Connecting Marvin
iRobot-Roomba Debug Please install paho-mqtt '<sudo> pip install paho-mqtt' to use this library
iRobot-Roomba Debug Client Connect Running now Marvin
iRobot-Roomba Debug Connection Roomba Error: 'NoneType' object has no attribute 'connect'
iRobot-Roomba Debug Unable to connect Marvin
iRobot-Roomba Debug Setting restart switch....

Posted on
Mon Jan 01, 2018 6:02 pm
GlennNZ offline
User avatar
Posts: 1552
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: iRoomba 980 iRobot Plugin

tatrog wrote:
Communication Error and plugin keep restarting. New Roomba 980
I installed via PIP the Mqtt package and I get the following debug logs. Help please? I tried to install Mqtt again but it tells be that install has been satisfied. Thanks!

iRobot-Roomba Debug Please install paho-mqtt '<sudo> pip install paho-mqtt' to use this library
..


Sorry to hear about your troubles.
Can you post the contents of :
Users/gerrytatro/Documents/Indigo-iRobotRoomba/192.168.55.230-config.ini

But it does look like paho-mqtt is not installed.

This is the code block causing the error:

Code: Select all
HAVE_MQTT=False
try:
    import paho.mqtt.client as mqtt
    HAVE_MQTT=True
except ImportError:

if not HAVE_MQTT:
       self.plugin.logger.debug(u"Please install paho-mqtt '<sudo> pip install paho-mqtt' to use this library")
        return False



It is possible you have two versions of python and you haven't installed it for the verison Indigo is using.

Away from Mac at moment - but could try below.
python2.7 -m pip install paho-mqtt



Thanks




Sent from my iPhone using Tapatalk

Posted on
Tue Jan 09, 2018 10:16 pm
pmgendon offline
Posts: 35
Joined: Apr 20, 2015

Re: iRoomba 980 iRobot Plugin

Hey !

thanks for the awesome work with this plugin.

Now I'm getting the following errors when running the start and dock commands:

Jan 9, 2018, 11:13:27 PM
Action Group roomba - ++ - rdc - start
iRobot-Roomba Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 544, in startRoombaAction
File "plugin.py", line 569, in RoombaAction
AttributeError: 'NoneType' object has no attribute 'send_command'

Action Group roomba - ++ - rdc - dock
iRobot-Roomba Error Error in plugin execution ExecuteAction:

Traceback (most recent call last):
File "plugin.py", line 556, in dockRoombaAction
File "plugin.py", line 569, in RoombaAction
AttributeError: 'NoneType' object has no attribute 'send_command'

the actions are not performed.

cheers!

pm

Who is online

Users browsing this forum: No registered users and 12 guests