Roomba Plugin - Discontinued

Posted on
Fri Dec 30, 2016 10:23 am
JaceJenkins offline
Posts: 52
Joined: Oct 16, 2015

Re: Roomba Plugin - beta tests

Upgraded and now I am error free. I like the change to move the get password to the device too.

How can I tell if the Roomba is actively cleaning with a trigger? My ultimate goal is to turn the Roomba off if we arrive home and the Roomba is cleaning and turn it on when we leave home if it is not cleaning. I have the presence stuff all done, I just need a way to detect what the Roomba is doing.

Posted on
Fri Dec 30, 2016 10:41 am
JaceJenkins offline
Posts: 52
Joined: Oct 16, 2015

Re: Roomba Plugin - beta tests

Figured it out. I am using a trigger on Phase become run to set a variable that Roomba is on or Phase changes from run to set a Variable that Roomba is off

Then when my presence Triggers fire, I can test if its off or off before taking action. Perfect. Thanks so much!

Posted on
Fri Dec 30, 2016 12:04 pm
JaceJenkins offline
Posts: 52
Joined: Oct 16, 2015

Re: Roomba Plugin - beta tests

Ok last tast is to iMessage any ErrorText the Roomba Might get. I have this line of code in my AppleScript, but it doesnt seem to pickup to property.

Code: Select all
set ErrorValue to ErrorText of device "Roomba 980"


Code: Select all
script error: Can’t get ErrorText of device "Roomba 980". (-1728)


Any ideas?

Posted on
Fri Dec 30, 2016 12:05 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

Not a clue. I never use AppleScript.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Dec 30, 2016 12:09 pm
JaceJenkins offline
Posts: 52
Joined: Oct 16, 2015

Re: Roomba Plugin - beta tests

Is there a list of properties of the device? I assume the list of actions I see in a Device Change Trigger is the name of all the properties a device can have?

Posted on
Fri Dec 30, 2016 12:17 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

States, not properties, using the correct Indigo terminology. But might be the same thing as far as AppleScript is concerned. You can see the actual values of all the device states by dragging up on the pane divider in the main Indigo window when a device is selected. They're labeled as "Custom States", below the "Device Details" section.

What are you actually using AppleScript for? You shouldn't need AS for simple triggering actions, and for any complex logic Python is probably better.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Dec 30, 2016 12:31 pm
JaceJenkins offline
Posts: 52
Joined: Oct 16, 2015

Re: Roomba Plugin - beta tests

Ah, States, I think thats what I am looking for. And yes I see now by draggin up you can see all the custom states you have created. nice.

I am using Applescript to send iMessage notifications. Here is the code snippet.

Code: Select all
set ErrorValue to ErrorText of device "Roomba 980" --This is the line I am trying to get working, I am hoping to set the current ErrorText to the ErrorValue variable

set theMessage to "The Roomba detected and Error"
set theMessage to theMessage & " " & ErrorValue
tell application "Messages"
   
   activate
   
   set theBuddy1 to buddy "Me"
   
   set thisChat to make new text chat with properties {participants:{theBuddy1}}
   set thisMessage to send theMessage to thisChat
   
end tell


I think the part I am missing, is how to query a "Custom State". I can query built in Indigo states all day long. I'll keep hunting.

Once again, thanks for all the great work!

Posted on
Fri Dec 30, 2016 1:14 pm
JaceJenkins offline
Posts: 52
Joined: Oct 16, 2015

Re: Roomba Plugin - beta tests

Ok, So i found out, that ApplesScript cannot read custom devices states.

viewtopic.php?p=45794#p45794

All is not lost though. What I can do is use Python to grab the value of ErrorText of the Roomba and push that into an IndigoVariable. Then I can read that variable from AppleScript and dynamically pass the ErrorText into the notification. Got it working

Quick Python Question, is there a way to address devices and variables by name vs their IndigoID?

Posted on
Fri Dec 30, 2016 1:17 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

JaceJenkins wrote:
Quick Python Question, is there a way to address devices and variables by name vs their IndigoID?


Yes, but if the name changes everything will break. The IndigoID will never change (unless you delete the device).

dev = indigo.devices["Roomba"]
var = indigo.variables["atHome"]

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Dec 30, 2016 1:23 pm
JaceJenkins offline
Posts: 52
Joined: Oct 16, 2015

Re: Roomba Plugin - beta tests

Makes sense, good to know.

Posted on
Mon Jan 02, 2017 5:17 pm
avanti offline
Posts: 7
Joined: Jan 02, 2017

Re: Roomba Plugin - beta tests

Hi,
I just installed this plugin for my new Roomba (thanks!). Installed and runs fine, but it will not let me enter the device's IP address:

roombadialog.jpg
roombadialog.jpg (104.92 KiB) Viewed 4034 times


The IP address is correct, confirmed both by my router and the Roomba app. Doesn't matter whether the roomba is on or whether it is in discovery mode.

Here's the log:
Roomba Debug validateDeviceConfigUi called
Roomba Debug validateDeviceConfigUi: RequestException: HTTPSConnectionPool(host='192.168.0.17', port=443): Max retries exceeded with url: /umi (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10ca528d0>, 'Connection to 192.168.0.17 timed out. (connect timeout=3.0)'))

The app on my phone works fine. Any ideas?

Posted on
Mon Jan 02, 2017 5:39 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

Did you put it in discovery mode and then click on "Get Password"?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jan 02, 2017 6:00 pm
avanti offline
Posts: 7
Joined: Jan 02, 2017

Re: Roomba Plugin - beta tests

Yes.I have the flashing green WiFi fan. Wasn't clear to me whether setting the IP and getting the password was a single operation or two separate ones. I tried both. If I enter the IP address and press Get Password, I get the following:

Roomba Debug getRoombaPassword called
Roomba Error Unable to get Roomba Password. Ensure Roomba IP address is correct.

Posted on
Mon Jan 02, 2017 7:05 pm
FlyingDiver offline
User avatar
Posts: 7221
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

Can you post a screenshot of the Wi-Fi Details page in the iRobot app?

Also, make sure you don't have any leading or trailing spaces or other invisible character in the IP address field.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jan 02, 2017 7:56 pm
avanti offline
Posts: 7
Joined: Jan 02, 2017

Re: Roomba Plugin - beta tests

IMG_7957.jpg
IMG_7957.jpg (96.08 KiB) Viewed 4001 times


Typed that IP address about 100 times. :?

Who is online

Users browsing this forum: No registered users and 1 guest