Page 1 of 4

Sample syntax for Indigo Action

PostPosted: Wed Nov 18, 2015 6:03 pm
by roquej
Is there a sample syntax on how to use Home Remote with Indigo?

Thank you in advance.

JP

Re: Sample syntax for Indigo Action

PostPosted: Thu Nov 19, 2015 12:35 pm
by jay (support)
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

Re: Sample syntax for Indigo Action

PostPosted: Fri Nov 20, 2015 12:45 am
by howartp
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

Re: Sample syntax for Indigo Action

PostPosted: Fri Nov 20, 2015 11:57 am
by autolog
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?

Re: Sample syntax for Indigo Action

PostPosted: Fri Nov 20, 2015 2:07 pm
by howartp
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

Sample syntax for Indigo Action

PostPosted: Fri Nov 20, 2015 4:03 pm
by howartp
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

Re: Sample syntax for Indigo Action

PostPosted: Fri Nov 20, 2015 4:26 pm
by howartp
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

Sample syntax for Indigo Action

PostPosted: Fri Nov 20, 2015 4:28 pm
by howartp
(That mess looks ok on web view if you're currently reading in Tapatalk)

Re: Sample syntax for Indigo Action

PostPosted: Wed Nov 25, 2015 7:17 am
by Gary_BBGames
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.

Re: Sample syntax for Indigo Action

PostPosted: Fri Nov 27, 2015 3:41 pm
by manders
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.

Re: Sample syntax for Indigo Action

PostPosted: Sat Nov 28, 2015 3:14 am
by Gary_BBGames
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.

Re: Sample syntax for Indigo Action

PostPosted: Sat Nov 28, 2015 12:04 pm
by dejees
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!

Re: Sample syntax for Indigo Action

PostPosted: Sat Nov 28, 2015 12:19 pm
by Gary_BBGames
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.

Re: Sample syntax for Indigo Action

PostPosted: Sat Nov 28, 2015 1:38 pm
by finkej
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,

Re: Sample syntax for Indigo Action

PostPosted: Sat Nov 28, 2015 1:47 pm
by Gary_BBGames
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.