Please help me with 'Hey Siri, Open the Gate'

Posted on
Sat Nov 17, 2018 1:24 pm
gadgetnut offline
User avatar
Posts: 137
Joined: Nov 03, 2005
Location: San Juan Islands

Please help me with 'Hey Siri, Open the Gate'

Greetings, all. My goal is to turn on a Virtual Device in Indigo from my Apple Watch or iPhone using Siri. I want to be able to say, "Hey Siri, Open the Gate," etc.

I'm new to Shortcuts, Python, etc. I've read the Indigo Scripting Tutorial, I've read the threads in this forum category. Could someone help me please by outlining a beginners' level detailed steps to get this Shortcut running?

On the host iMac running Indigo server, from Terminal I can run this snippet and it turns on the Virtual Device "Drive Gate" (which in turn controls a contact closure on an Insteon I/O Lint-Controller on a motorized drive entrance gate and the gate movement is working:

indigo.device.turnOn(1796254136) #

Couple questions: When creating the Shortcut on iPhone, at "Add options from the bottom to build your shortcut," which Scripting option do you start with? Also, if I need SSH server enabled on the iMac, where/how do I do that? I'm open to installing Pythonista on the iPhone, if that's convenience. I will mostly be invoking this command while on WiFi on my own LAN but I might want to invoke it from WAN, as well, if that changes anything.

Lots of exciting and intriguing possibilities in the works! Many thanks!

Posted on
Tue Nov 20, 2018 6:50 am
anyone offline
User avatar
Posts: 125
Joined: Apr 03, 2011
Location: Norfolk, VA

Re: Please help me with 'Hey Siri, Open the Gate'

Couple questions: When creating the Shortcut on iPhone, at "Add options from the bottom to build your shortcut," which Scripting option do you start with? Also, if I need SSH server enabled on the iMac, where/how do I do that? I'm open to installing Pythonista on the iPhone, if that's convenience. I will mostly be invoking this command while on WiFi on my own LAN but I might want to invoke it from WAN, as well, if that changes anything.


As a solution for when you are connected to your LAN, you can configure your iPhone and Siri to perform the action you discussed, with a single Siri Shortcut Action; "Run Script Over SSH". That is the scripting option you would start with.

SSH needs to be enabled on your iMac running. On your iMac -> System Preference -> Sharing, then check “Remote Login”.

To avoid frustration, test that you can SSH into your iMac running Indigo from another Mac. To SSH into a device, the format would be: "ssh username@192.168.1.55"

You will be prompted for the password for that username. The very first time you log in, you will be asked host to accept a public key from the remote host, answer YES.

Example of logging in for the first time:

Code: Select all
ed@carl:~$ ssh ed2@192.168.7.141

The authenticity of host '192.168.7.141 (192.168.7.141)' can't be established.
ECDSA key fingerprint is SHA256:AZ4v3ThpS/R0nPVcaa1I/614UDgM4Ir49TwCnXs/oQI.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.7.141' (ECDSA) to the list of known hosts.
Password:

Last login: Thu Jun 16 06:59:05 2016
user@computer:~ ed2$



Once you're able to SSH into your iMac from another machine, then build the shortcut as shown below, and then test that. Ensure you input your username and password. The same ones you tested as instructed above when SSHng form another machine.
Attachments
IMG_3107.png
IMG_3107.png (45.17 KiB) Viewed 3812 times

Posted on
Tue Nov 20, 2018 8:34 am
jalves offline
Posts: 744
Joined: Jun 16, 2013

Re: Please help me with 'Hey Siri, Open the Gate'

I'm able do to this with my garage door. It had nothing to do with shortcuts or python. I just added my garage opener Indigo device to HomeKit Bridge. Then included that device my the Home app on my iPhone. Now all I have to do when approaching home is to say "Hey Siri...Open the Garage Door".

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Posted on
Tue Nov 20, 2018 8:38 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Please help me with 'Hey Siri, Open the Gate'

jalves wrote:
I'm able do to this with my garage door. It had nothing to do with shortcuts or python. I just added my garage opener Indigo device to HomeKit Bridge. Then included that device my the Home app on my iPhone. Now all I have to do when approaching home is to say "Hey Siri...Open the Garage Door".

+1 to this. By all means use this as an opportunity to learn iOS Shortcuts, but if this is your only use case, you will get a quicker response to add it to HKB.

Posted on
Tue Nov 20, 2018 9:49 am
gadgetnut offline
User avatar
Posts: 137
Joined: Nov 03, 2005
Location: San Juan Islands

Re: Please help me with 'Hey Siri, Open the Gate'

Hello, all. @anyone, thanks very much for providing these detailed instructions. It's my first foray into Siri Shortcuts and I will work on it! :)

@jalves and @siclark thanks for the suggestion to use HomeKit Bridge. This was super easy to set up and in five minutes I have it working. Now my drive gate is opening by saying Siri, turn on Drive Gate. Siri says "Done" and the gate opens.

I noticed this also works over cellular data when my iPhone is not on the LAN: Siri acknowledgment changed from "Done" to "Command Sent" and it there was a bit of a delay but it worked. This Siri command also works from my Apple Watch.

I can remember to say, "Siri, turn on Drive Gate." But is there a way to get this to work by saying, "Siri, Open the Gate"? Maybe with a Shortcut? :)

Really appreciate the assistance! Cheers!

Posted on
Tue Nov 20, 2018 9:53 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Please help me with 'Hey Siri, Open the Gate'

Yes, I forgot to say, the other major advantage with HKB is that you dont need to mess around with VPNs etc if away from your house.

Try changing the device type of your virtual device to something else. I have a virtual device that controls my gate lock. I changed it from an on/off device to a lock mechanism and now I can say lock and unlock gate.
I think the door type or maybe garage door opener type might let you say open and close. Have a play.

Posted on
Tue Nov 20, 2018 10:09 am
jalves offline
Posts: 744
Joined: Jun 16, 2013

Re: Please help me with 'Hey Siri, Open the Gate'

gadgetnut wrote:
Hello, all. @anyone, thanks very much for providing these detailed instructions. It's my first foray into Siri Shortcuts and I will work on it! :)

@jalves and @siclark thanks for the suggestion to use HomeKit Bridge. This was super easy to set up and in five minutes I have it working. Now my drive gate is opening by saying Siri, turn on Drive Gate. Siri says "Done" and the gate opens.

I noticed this also works over cellular data when my iPhone is not on the LAN: Siri acknowledgment changed from "Done" to "Command Sent" and it there was a bit of a delay but it worked. This Siri command also works from my Apple Watch.

I can remember to say, "Siri, turn on Drive Gate." But is there a way to get this to work by saying, "Siri, Open the Gate"? Maybe with a Shortcut? :)

Really appreciate the assistance! Cheers!

Glad you got it working so quickly!

My garage door device responds to the "Open" command. I'd agree with @siclark's suggestion to try a different HKB device type.

Oh, and yes, using Siri over cellular works just fine. Typically I'm not yet connected to my home wifi when I request Siri to open the garage door. It works in about 10 seconds from issuing the command.

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Posted on
Tue Nov 20, 2018 10:17 am
gadgetnut offline
User avatar
Posts: 137
Joined: Nov 03, 2005
Location: San Juan Islands

Re: Please help me with 'Hey Siri, Open the Gate'

I got Siri to open the gate by setting up the Gate Opener as a Switch in HomeKit Accessory Server and saying "Siri turn on the Drive Gate."

Within the HomeKit Accessory Server I deleted the device Gate Opener and re-added it as both Garage Door Opener and again as a Lock Mechanism. When I say "Siri, open the drive gate," it replies "your garage door is opening, ask me about its status in a few minutes" but the gate does not open. Thoughts?

Posted on
Tue Nov 20, 2018 10:29 am
jalves offline
Posts: 744
Joined: Jun 16, 2013

Re: Please help me with 'Hey Siri, Open the Gate'

That's a puzzle. My garage door is not set up as a lock so my situation is different than yours. Perhaps if you only set it up as one device? I know Siri also works on locks since I'm also able to control my two Kwikset locks.

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Posted on
Tue Nov 20, 2018 11:31 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Please help me with 'Hey Siri, Open the Gate'

Try just doing one device. When I set mine up as a lock mechanism, often Siri replies that she is unable to unlock it, I think because it doesnt sent the correct response, but the lock does open, ie the virtual device is turned on (on = unlocked in my virtual device) .

Posted on
Tue Nov 20, 2018 11:47 am
gadgetnut offline
User avatar
Posts: 137
Joined: Nov 03, 2005
Location: San Juan Islands

Re: Please help me with 'Hey Siri, Open the Gate'

I apologize, my last post was confusing- I did not have two devices set up at the same time. I meant that I added the device first and only as a garage door opener. I said, "Siri, open the Drive Gate" and Siri replied "your garage door is opening" but the gate did not move. When that didn't work I deleted the device in the HomeKit Accessory Server and added the device again this time as a lock mechanism. I asked Siri to "Open the Drive Gate" and nothing happened. Thus I reverted back to a Switch device and when I say "Siri, turn on Drive Gate " it's working.

BTW, the actual Insteon appliance that operates the drive gate is a I/O Linc-Controller (multiple dry contact relay) and I created a Virtual (On-Off) Device in Indigo called Drive Gate which controls the I/O Linc-Controller by Action Group, which I had been using with Alexa.

The device I'm controlling with the HomeKit Accessory Server is this Virtual Device, "Drive Gate."

Thanks, again, everyone. I'm super happy getting this working with "Siri, turn on the drive gate." Hopefully someday I can adjust the language so I can say "Open the drive gate."

Now envision me riding my bike home, and as I ride down the alley approaching the gate, I speak into my Watch, the gate opens, and I roll in. "Holy Access Control, Batman!" :lol:

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest