ahwman Posted June 22, 2016 Posted June 22, 2016 I'm trying to add some of my IFTTT commands created within the ISY portal with an application on my Apple Watch to send HTTP commands. However, when attempting to trigger the commands using the URL copied from within the ISY portal, I get an error "Cannot get...." I could simply use local HTTP commands directly to my ISY, however I then cannot use them outside of my LAN. Thanks for the help, Chuck
Scottmichaelj Posted June 23, 2016 Posted June 23, 2016 I'm trying to add some of my IFTTT commands created within the ISY portal with an application on my Apple Watch to send HTTP commands. However, when attempting to trigger the commands using the URL copied from within the ISY portal, I get an error "Cannot get...." I could simply use local HTTP commands directly to my ISY, however I then cannot use them outside of my LAN. Thanks for the help, Chuck You have to send the username and password in the url with the maker channel.
ahwman Posted June 23, 2016 Author Posted June 23, 2016 You have to send the username and password in the url with the maker channel. I already have IFTTT working using the ISY portal links without needing to send user/pass. What I'm trying to do is send get requests from my Apple Watch. That said, I was able to figure it out... Thanks, Chuck
Scottmichaelj Posted June 23, 2016 Posted June 23, 2016 I already have IFTTT working using the ISY portal links without needing to send user/pass. What I'm trying to do is send get requests from my Apple Watch. That said, I was able to figure it out... Thanks, Chuck How did you resolve it? Someone might want to know in the future.
MWareman Posted June 23, 2016 Posted June 23, 2016 Requests have to be POSTed to the portal. Make sure you are not making GET requests (the default).
ahwman Posted June 23, 2016 Author Posted June 23, 2016 How did you resolve it? Someone might want to know in the future. It was a simple matter of replacing the "@" with "%40" in the ISY portal email address. Example: john@doe.com becomes john%40doe.com. For some reason the "@" causes the URL address to fail... Chuck
MWareman Posted June 23, 2016 Posted June 23, 2016 (edited) @ has special meaning in the URI - going between the username:password combination and the host. It's a delimiter. So, when you need to use it in the username or password field, it must be url encoded. That being said - you shouldn't need to use the username and password when making api calls to the ISY Portal. Get your IFTTT key and generate URLs with the key embedded - works like a champ! Edited June 23, 2016 by MWareman
ahwman Posted June 23, 2016 Author Posted June 23, 2016 @ has special meaning in the URI - going between the username:password combination and the host. It's a delimiter. So, when you need to use it in the username or password field, it must be url encoded. That being said - you shouldn't need to use the username and password when making api calls to the ISY Portal. Get your IFTTT key and generate URLs with the key embedded - works like a champ! When I try it using the key in a browser, I get an error. However, they work fine using the Maker channel. Which is why I switched back to using a user name and password.
MWareman Posted June 23, 2016 Posted June 23, 2016 Using a browser results in a 'GET' request. It requires a POST request to work with the key. I do this all the time from Tasker on Android.
ahwman Posted June 23, 2016 Author Posted June 23, 2016 Using a browser results in a 'GET' request. It requires a POST request to work with the key. I do this all the time from Tasker on Android. That explains it. Unfortunately the app on my Apple Watch doesn't support post requests, so I guess I'll have to continue using the alternate method... Thanks, Chuck
Recommended Posts