iOS Shortcuts?

Posted on
Fri Sep 27, 2019 8:32 am
citysnaps offline
Posts: 44
Joined: Jul 13, 2016

iOS Shortcuts?

I just learned about iOS shortcuts. And that the latest iOS update supports geographic iPhone location.

Since my iPhone is always with me, I'd like to create a shortcut that would generate Indigo triggers whenever I leave the house and automatically perform certain actions; ie enable my cameras, handle lights, etc. And the n when I return, perform other actions; disable cameras, turn on certain lights, etc.

Is there a way to set an Indigo variable based upon an iOS Shortcut action via a plugin? I searched and couldn't find one.

Thanks!

...........................
Brad
Urban photoblog: www.citysnaps.net

Posted on
Fri Sep 27, 2019 8:50 am
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

I used shortcuts to execute an ssh command works well.
There should be a command that does an html call.

Go into shortcuts and do a search

I have not found a list of short cut commands in the web. Only in shortcuts you can find then




Sent from my iPhone using Tapatalk

Posted on
Fri Sep 27, 2019 1:05 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

played around a little:

this works:

put this into the script filed of an ssh short cut on your iphone
/usr/bin/curl -u xxx:xxx --digest -X PUT -d value="abc" http://127.0.0.1:8176/variables/testd

where xxx:xxx is userid:password of your indigo server

and "abc" is the string you like to send to variable "testd"

and the "User" and "Password" in the ssh fields are the server login uid/pwd


Karl
Attachments
Screen Shot 2019-09-27 at 15.12.56.png
Screen Shot 2019-09-27 at 15.12.56.png (105.17 KiB) Viewed 4556 times

Posted on
Fri Sep 27, 2019 4:07 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

and this should trigger an action:
Code: Select all
/usr/bin/curl -u xxx:xxx --digest -X  EXECUTE http://127.0.0.1:8176/actions/name%20of%20Action


with >>name%20of%20Action< = "name of Action"

see: https://wiki.indigodomo.com/doku.php?id=indigo_s_restful_urls for more examples


using ssh has the advantage that with opening port22 to your indigo server and a getting a dns name for your router
you then can do the ssh from anywhere in the world. And ssh is pretty secure.

instead of 192.168.1.x you put eg "thisIsmydnsName.net" into the ssh Hostname field

Karl

Posted on
Fri Sep 27, 2019 4:24 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

or you could check if you are connected to you home network and if not =="yours" send message or do the ssh --> curl --> indigo server thing to tell indigo that your phone is not at home:
Screen Shot 2019-09-27 at 17.22.47.png
Screen Shot 2019-09-27 at 17.22.47.png (54.39 KiB) Viewed 4536 times

Posted on
Fri Sep 27, 2019 4:26 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

the only bad thing about short cuts in iOS is that you have to enter / set / configure everything on your phone.. no editing on your mac

getting the hang of it ..

Karl

Posted on
Fri Sep 27, 2019 4:38 pm
citysnaps offline
Posts: 44
Joined: Jul 13, 2016

Re: iOS Shortcuts?

Thanks Karl - appreciate it!

When I get home later on I'll try getting the above to work.

...........................
Brad
Urban photoblog: www.citysnaps.net

Posted on
Fri Sep 27, 2019 5:45 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

w iOS 13.1 short cuts

==> you can now do an "arrive at location automation" :

in shortcuts
- select automation (not my shortcuts)
- add create "personal automation" item,
- choose arrive at .. set location,
- and add the ssh action described above

then the indigo action will execute when the iphone gets into the perimeter ring around your location.

that is really cool


Karl
Attachments
Screen Shot 2019-09-27 at 18.42.26.png
Screen Shot 2019-09-27 at 18.42.26.png (83.39 KiB) Viewed 4503 times

Posted on
Fri Sep 27, 2019 6:47 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

Just tried this returning from shopping

..and it works.


Sent from my iPhone using Tapatalk

Posted on
Fri Sep 27, 2019 7:51 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

But :::: For automated actions like arrival: you need to click on ok when it runs.
That kills it from my perspective.


Starting shortcuts manually though works fine.

Karl



Sent from my iPhone using Tapatalk

Posted on
Fri Sep 27, 2019 8:55 pm
citysnaps offline
Posts: 44
Joined: Jul 13, 2016

Re: iOS Shortcuts?

kw123 wrote:
But :::: For automated actions like arrival: you need to click on ok when it runs.
That kills it from my perspective.


Starting shortcuts manually though works fine.

Karl



Sent from my iPhone using Tapatalk


I've been playing around with iOS automations (Arrival -> Speak some text) and discovered the same thing. Poking around trying to find out why I need to RUN the automation I found this Apple document that confirmed: https://support.apple.com/guide/shortcuts/enable-or-disable-a-personal-automation-apd602971e63/3.1/ios/13.1

That's such a disappointment. If I need to tap RUN when I arrive home, I might as well access my Indigo Touch control page on my phone and turn on the lights.

Hope Apple reconsiders having to manually run an arrival automation.

...........................
Brad
Urban photoblog: www.citysnaps.net

Posted on
Fri Sep 27, 2019 9:41 pm
kw123 offline
User avatar
Posts: 8366
Joined: May 12, 2013
Location: Dallas, TX

Re: iOS Shortcuts?

the advantage compared to the indigo app is : it pops up = 1 "ok" click ,
-- or you do siri: say "hey siri home" and the action happens
vs

Indigo app: you need to open the app, go through menus, then click on action button = 3 + steps

still not as I like to see it .

Karl

Posted on
Sat Sep 28, 2019 1:26 am
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: iOS Shortcuts?

Have you tried linking to HomeKit? I’ve previously had some success with triggering HomeKit devices through the Home App on arrival and departure.

Posted on
Sat Sep 28, 2019 6:29 am
jlambert121 offline
Posts: 30
Joined: Feb 10, 2012

Re: iOS Shortcuts?

It would be great if indigo touch had app shortcuts available as well vs ssh that would use the reflector if needed. Even basic variable manipulation would let you take action on the server based on the variable change.

Posted on
Sat Sep 28, 2019 6:36 am
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: iOS Shortcuts?

To expand on previous post, you can create automation in the home app to switch on homekit appliances on arrival home (way). I don’t think that requires you to unlock your phone. And if you have an indigo action instead of a HomeKit device set up in HomeKit bridge you can make all sorta of things happen.

Who is online

Users browsing this forum: No registered users and 7 guests

cron