Roomba Plugin - Discontinued

JaceJenkins
Posts: 59
Joined: Fri Oct 16, 2015 6:41 am

Re: Roomba Plugin - beta tests

Post by JaceJenkins »

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.
JaceJenkins
Posts: 59
Joined: Fri Oct 16, 2015 6:41 am

Re: Roomba Plugin - beta tests

Post by JaceJenkins »

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!
JaceJenkins
Posts: 59
Joined: Fri Oct 16, 2015 6:41 am

Re: Roomba Plugin - beta tests

Post by JaceJenkins »

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?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

Post by FlyingDiver »

Not a clue. I never use AppleScript.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
JaceJenkins
Posts: 59
Joined: Fri Oct 16, 2015 6:41 am

Re: Roomba Plugin - beta tests

Post by JaceJenkins »

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?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

Post by FlyingDiver »

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
JaceJenkins
Posts: 59
Joined: Fri Oct 16, 2015 6:41 am

Re: Roomba Plugin - beta tests

Post by JaceJenkins »

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!
JaceJenkins
Posts: 59
Joined: Fri Oct 16, 2015 6:41 am

Re: Roomba Plugin - beta tests

Post by JaceJenkins »

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

http://forums.indigodomo.com/viewtopic. ... 794#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?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

Post by FlyingDiver »

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
JaceJenkins
Posts: 59
Joined: Fri Oct 16, 2015 6:41 am

Re: Roomba Plugin - beta tests

Post by JaceJenkins »

Makes sense, good to know.
avanti
Posts: 7
Joined: Mon Jan 02, 2017 5:06 pm

Re: Roomba Plugin - beta tests

Post by avanti »

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 4643 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?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

Post by FlyingDiver »

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
avanti
Posts: 7
Joined: Mon Jan 02, 2017 5:06 pm

Re: Roomba Plugin - beta tests

Post by avanti »

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.
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Roomba Plugin - beta tests

Post by FlyingDiver »

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
avanti
Posts: 7
Joined: Mon Jan 02, 2017 5:06 pm

Re: Roomba Plugin - beta tests

Post by avanti »

IMG_7957.jpg
IMG_7957.jpg (96.08 KiB) Viewed 4610 times
Typed that IP address about 100 times. :?
Locked

Return to “Discontinued Plugins”