Sample syntax for Indigo Action

Posted on
Wed Nov 18, 2015 6:03 pm
roquej offline
User avatar
Posts: 609
Joined: Jan 04, 2015
Location: South Florida, USA

Sample syntax for Indigo Action

Is there a sample syntax on how to use Home Remote with Indigo?

Thank you in advance.

JP

Posted on
Thu Nov 19, 2015 12:35 pm
jay (support) offline
Site Admin
User avatar
Posts: 18212
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sample syntax for Indigo Action

You use the RESTful API from the Home Remote app. At some point, it would be nice to get some specific examples/screenshots of Indigo action settings to help everyone along (hint hint to anyone that's got a bunch already done)... :P

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Nov 20, 2015 12:45 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sample syntax for Indigo Action

I've not upgraded to the digest auth yet so you'll have to wait for me to scrub out the password from any screen captures before I can do any.

Anyone else?


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 20, 2015 11:57 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Sample syntax for Indigo Action

howartp wrote:
I've not upgraded to the digest auth yet so you'll have to wait for me to scrub out the password from any screen captures before I can do any. ...


How does digest authentication work. Currently I have the userid/password in the URL. Is there somewhere else to input this info so that it can be removed from the URL?

Posted on
Fri Nov 20, 2015 2:07 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sample syntax for Indigo Action

I've not looked yet, but there's a button/field somewhere that you put auth details in separate to the URL.

It didn't work in first releases, but Gary has fixed it for Indigo.


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 20, 2015 4:03 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Sample syntax for Indigo Action

Right, sorted.

Remove the auth from your URLs so you just get eg:

Code: Select all
http://192.168.3.2:8176/devices/Bedroom Fan?toggle=1&_method=put


Now hit the Post/Put button, hit Username : Pass, and put your username : pass into the data box with colon but NO spaces. (This forum turns colon P into a smiley face!)

Et voila.

I'll copy more samples in a minute for the earlier poster.


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 20, 2015 4:26 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Sample syntax for Indigo Action

Code: Select all
http://192.168.3.2:8176/devices/Lounge TV?toggle=1&_method=put

http://192.168.3.2:8176/devices/Study Light?toggle=1&_method=put

http://192.168.3.2:8176/devices/Study Light?isOn=0&_method=put

http://192.168.3.2:8176/devices/Study Light?isOn=1&_method=put

http://192.168.3.2:8176/actions/Sleep_On?_method=execute

http://192.168.3.2:8176/actions/Radio On Mornings?_method=execute

There we go.

I don't have any variable commands in my Home Remote, but there's Device Toggle, On, Off and Execute Action Groups there.

Note you DO include spaces of device names etc in the URLs in this app; most you have to URLEncode them, but Gary does it for you. :-)


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 20, 2015 4:28 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Sample syntax for Indigo Action

(That mess looks ok on web view if you're currently reading in Tapatalk)

Posted on
Wed Nov 25, 2015 7:17 am
Gary_BBGames offline
Posts: 164
Joined: Sep 14, 2015

Re: Sample syntax for Indigo Action

Thanks again Peter. I will be writing up some documentation at some point that will cover this. There is quite a lot of knowledge that is not really written anywhere at the moment.

Posted on
Fri Nov 27, 2015 3:41 pm
manders offline
Posts: 23
Joined: Jun 23, 2013

Re: Sample syntax for Indigo Action

Yes, I like it... particularly the giant leap this give in native integration with IOS (Today screen, etc)

I've managed to get it going with just a little fiddling about; I notice that the example shows direct access to the indigo server using it's IP address.

Does this app work with Indigo Reflector? Otherwise you mist expose your indigo box to the internet to operate remotely or in non-wifi covered areas of the house.

Posted on
Sat Nov 28, 2015 3:14 am
Gary_BBGames offline
Posts: 164
Joined: Sep 14, 2015

Re: Sample syntax for Indigo Action

Hi Manders, whilst I can't answer your Reflector question I hope someone else here can.

Another solution is to use Home Remote: Remote. It's a relay from one copy of Home Remote (outside your network for example, to one inside your network, running on your same Mac Server as you use Indigo on).

You need to get the Mac version which is another £1.49 (but then you are covered for iOS, watch OS tvOS and OS X) and then set up Home a Remote: Remote on the iOS version. It will sync with the OS X version and they will communicate over a SSL secured socket connection. The action is never sent over the network, just an ID for it. You can set up an SSID black list in iOS app so that you don't send the remote command when you are already at homE, but when you are outside of the network it will relay the command to your home and call the action, with no port forwarding or exposure of your internal network resource to the outside world.

Posted on
Sat Nov 28, 2015 12:04 pm
dejees offline
Posts: 13
Joined: Apr 07, 2013
Location: Copley, OH

Re: Sample syntax for Indigo Action

Just general questions trying to use this with Indigo. I set it up on the iPad using the IOS app just to toggle a light on/off. It works, but i noticed in the Indigo log I always get two entries when activating the action...

WebServer request to toggle device "Dining Room" from 192.168.2.64
WebServer access denied "http://192.168.2.27:8176/devices/Dining Room" from dejees @ 192.168.2.64

Is this normal, expected? I am curious why I get the denied first, then the second saying request to toggle. I have the user:password set in the put screen, Data: field with Name:Pass selected. I assume this is supposed to be the way you do it. Any comments appreciated. Documentation, detailed to Indigo, would be greatly appreciated. Thanks in advance!

Posted on
Sat Nov 28, 2015 12:19 pm
Gary_BBGames offline
Posts: 164
Joined: Sep 14, 2015

Re: Sample syntax for Indigo Action

Hi, from what I can establish the first request gets a digest authentication challenge from the server, and is denied. When the app gets denied it responds with the authorisation and then succeeds.

From testing it seemed to disappear once the authorisation had been competed.

Posted on
Sat Nov 28, 2015 1:38 pm
finkej offline
User avatar
Posts: 26
Joined: Jan 28, 2012
Location: Troy NY

Re: Sample syntax for Indigo Action

It appears that you should NOT escape spaces in devices names (Living%20Room) - as the REST API doesn't seem to recognize the device - so just let the app do it, and things appear to work fine,

Posted on
Sat Nov 28, 2015 1:47 pm
Gary_BBGames offline
Posts: 164
Joined: Sep 14, 2015

Re: Sample syntax for Indigo Action

The app does indeed do any escaping you need.

I have found a bug (Sod's law after the email goes out) that stops Home Remote: Remote functionality from working.

A fix has been submitted to Apple and an expedited review requested.

Sorry for this trouble. I can provide a test flight build that fixes this issue to anyone that requires it.

Who is online

Users browsing this forum: No registered users and 3 guests