JCDinPGH Posted January 19, 2017 Share Posted January 19, 2017 (edited) 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 January 19, 2017 by JCDinPGH Quote Link to comment
stusviews Posted January 19, 2017 Share Posted January 19, 2017 (edited) 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 January 19, 2017 by stusviews Quote Link to comment
JCDinPGH Posted January 19, 2017 Author Share Posted January 19, 2017 (edited) 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 January 19, 2017 by JCDinPGH Quote Link to comment
andyf0 Posted January 19, 2017 Share Posted January 19, 2017 (edited) 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 January 19, 2017 by andyf0 Quote Link to comment
Michel Kohanim Posted January 19, 2017 Share Posted January 19, 2017 Hi JCDinPGH, Please also checkout: http://wiki.universal-devices.com/index.php?title=ISY_Portal_Geo_Fencing With kind regards, Michel Quote Link to comment
JCDinPGH Posted January 19, 2017 Author Share Posted January 19, 2017 Thanks for all of your help. For some reason, I was missing the IFTTT part and thought this could be done outside of using IFTTT. Quote Link to comment
andyf0 Posted January 19, 2017 Share Posted January 19, 2017 (edited) 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 January 19, 2017 by andyf0 Quote Link to comment
jtara92101 Posted January 19, 2017 Share Posted January 19, 2017 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? Quote Link to comment
larryllix Posted January 19, 2017 Share Posted January 19, 2017 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. Quote Link to comment
andyf0 Posted January 19, 2017 Share Posted January 19, 2017 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. Quote Link to comment
jtara92101 Posted January 19, 2017 Share Posted January 19, 2017 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". Quote Link to comment
JCDinPGH Posted January 24, 2017 Author Share Posted January 24, 2017 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. Quote Link to comment
jtara92101 Posted January 24, 2017 Share Posted January 24, 2017 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. Quote Link to comment
JCDinPGH Posted January 24, 2017 Author Share Posted January 24, 2017 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? Quote Link to comment
jtara92101 Posted January 24, 2017 Share Posted January 24, 2017 (edited) 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 January 24, 2017 by jtara92101 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.