Jump to content

Integration with Locative (or similar) ?


JCDinPGH

Recommended Posts

I'm looking for examples (full url edited for security of course) on how to add a link into Locative so I can have Locative turn on/off lights based on my location. 

I can get the url for different scenes/devices from the portal, but the ON and OFF buttons don't seem to have a direct url or else I am doing something wrong.  I am just looking for some examples, or even better detailed instructions on how to add a direct link into Locative to run a program, like "All Lights ON".

Edited by JCDinPGH
Link to comment

Can you be more specific about you goal? Do you mean various lights depending on your away from home location or certain lights when you're near home.

Edited by stusviews
Link to comment

I'm looking to execute a Scene via the portal as I approach my home. For example I have a scene called "All Lights" that contains several key devices like living room and dining room and I would like a direct url pointing to "All Lights on".

Edited by JCDinPGH
Link to comment

OK, I'll give it a shot:

 

Log into the portal

Click on Select Tool, highlight over Connectivity then select IFTTT

Click on Add "SCENE"

Type in an Event Name, e.g. Approaching

Click on the drop down menu and select All Lights ON

Click on the bar below the word Action and Select ON

Click on Save

There will be a tiny blue arrow to the left of your Event Name, click on it and it will display the URL to POST.

If you want to turn the scene OFF create a new event with a different Event Name, e.g. Leaving, select the same scene and set Action to OFF.

 

Enter that URL into Locative, make it a POST. Authentication is not required.

 

I'm assuming you know your way around around Locative.

 

Personally, I prefer to set a state variable to 0 and 1 for leaving / approaching. That way you can test the variable in programs to perform multiple actions. It allows for growth as you become more comfortable with how it works without having to create multiple events in the portal.

Edited by andyf0
Link to comment

Nooo ... Don't be confused by UDI terminology. You don't need IFTTT services. In your mind replace ISY Portal IFTTT section with "Create URL into ISY Portal".

 

IFTTT is not needed. The IFTTT portal section is merely used for creating web URLs into the portal and your ISY. I think we were all confused by this in the beginning.

Edited by andyf0
Link to comment

As Andy has pointed-out, the IFTTT section isn't necessarily just for IFTTT. The "inbound" part of it can be (mis)used by ANY service app or service.

 

I'm a bit confused, though, why this is thought necessary for Locative integration. Why not just use the rEST API? 

Link to comment

As Andy has pointed-out, the IFTTT section isn't necessarily just for IFTTT. The "inbound" part of it can be (mis)used by ANY service app or service.

 

I'm a bit confused, though, why this is thought necessary for Locative integration. Why not just use the rEST API?

What were you thinking to bridge Alexa to the rest interface?

 

Sent from a tiny keyboard. Response may be brief.

Link to comment

As Andy has pointed-out, the IFTTT section isn't necessarily just for IFTTT. The "inbound" part of it can be (mis)used by ANY service app or service.

 

I'm a bit confused, though, why this is thought necessary for Locative integration. Why not just use the rEST API? 

 

Because I hadn't thought of that :) Also, wouldn't REST require direct access to the ISY with Port Forwarding in the router etc. Wouldn't that expose your username & password to snooping? (that was for MWareman) Might be too much for some folks. As you can see I don't know much about REST.

Link to comment

Andy, as I understand it, rEST isn't limited to direct access to the ISY - it is available through the portal.

 

But now I see the purpose of the IFTTT inbound API - it allows use of a token rather than user ID/password. And the token has limited scope to performing one action only.

 

User ID/password would be protected inside of SSL (though there is a small potential security issue with this) but I wouldn't want to provide user ID/password to a third-party service. It might be OK in a trusted app, but I see the "IFTTT".

Link to comment

Definitely learning a lot from all of you. Keep it coming! I do have one more question. If I follow the instructions from post #4 but choose a program to start at IF instead of just a scene, will the THEN and ELSE also execute when triggered or just the IF? I am trying to create an entry that executes in Locative as I'm approaching my home, but only if if is actually dark out, otherwise it does nothing.

Link to comment

 If I follow the instructions from post #4 but choose a program to start at IF instead of just a scene, will the THEN and ELSE also execute when triggered or just the IF? I am trying to create an entry that executes in Locative as I'm approaching my home, but only if if is actually dark out, otherwise it does nothing.

 

It will act like any other IF invocation - it will evaluate the condition, and run either the THEN or ELSE depending on the result.

 

But I would suggest you don't activate a scene OR run a program. Just set a variable. Then you can write a program or programs that make use of the variable.

Link to comment

It will act like any other IF invocation - it will evaluate the condition, and run either the THEN or ELSE depending on the result.

 

But I would suggest you don't activate a scene OR run a program. Just set a variable. Then you can write a program or programs that make use of the variable.

 

If I went the variable route, wouldn't I have to have a program executing over and over while checking the state of the variable and then performing actions based on the state of the variable?

Link to comment

If I went the variable route, wouldn't I have to have a program executing over and over while checking the state of the variable and then performing actions based on the state of the variable?

 

That's not how ISY programs work. They do not "execute over and over". They are asynchronous.

 

Programs only run when the state of any of the variables that the IF examines change. (Or when they are manually run or triggered by another program.) They are perfectly efficient for monitoring state changes.

Edited by jtara92101
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...