Jump to content

MobiLinc and Siri Integration with Siri Shortcuts and iOS 12!


InsteonNut

Recommended Posts

Posted

With today's release of iOS 12 and the new Siri Shortcuts app, here's how you can integrate your ISY with Siri and MobiLinc Connect so you can say things like: "Hey Siri, turn my lights on."

Easiest Method: IFTTT Webhook (Maker Channel)

Step 1: Add the Webhook (Formally Maker) IFTTT Channel to your IFTTT account.

Step 2: Go the documentation of the Webhook channel to find your API key and your URL path. 

https://maker.ifttt.com/trigger/{event}/with/key/{Your API Key from Webhook}

Step 3: In IFTTT, create a new applet with Webhook as the trigger and connect the action back to MobiLinc and your ISY by turning on a light, scene, program, security, etc when that webhook trigger is called.

Example Trigger to turn on the Dining Room Lights:

https://maker.ifttt.com/trigger/dining_room/with/key/{Your API Key from Webhook}

Step 4: Update your iPhone or iPad to iOS 12 released today.

Step 5: Download the new Siri Shortcuts app from the App Store. Search for "Shortcuts app."

Step 6: Create a new shortcut with the following two steps:
  1. URL
  2. Get Contents of URL

1. For the first URL Shortcut step,  enter in the URL from your Webhook:

https://maker.ifttt.com/trigger/dining_room/with/key/{Your API Key from Webhook}

2. For Get Contents of URL in the Siri Shortcuts step, the default "GET" parameter with no headers is correct. No changes are needed.

Step 7: Test your Shortcut by tapping the "Play" button at the top of the shortcut. You should see the results of the command in the Siri Shortcuts app.

Step 8: Tap the horizontal two switches just under the "Done" button to go into the settings for your shortcut.

Step 9: Give your Shortcut a Friendly Name: Example: "Dining Room"

Step 10: Tap "Add to Siri" and speak the phrase you want to use to trigger your Shortcut. Example: "Turn my Dining Room on."

Step 11: Tap Done to save.

Now you can say "Hey Siri, turn my dining room on" and Siri will run your shortcut and turn your dining room lights on. Repeat for anything you want to control in your home with Siri using the MobiLinc IFTTT Channel.

 

Option 2: Direct MobiLinc Connect integration:

Step 1: Update your iPhone or iPad to iOS 12 released today.

Step 2: Download the new Siri Shortcuts app from the App Store. Search for "Shortcuts app."

Step 3: Create a new shortcut with the following two steps:
  1. URL
  2. Get Contents of URL

1. For the first URL Shortcut step, we have an API available for the DIY user. If you have an active MobiLinc Connect account you can send and receive commands to your ISY through MobiLinc Connect with the following REST call:

https://mlnode.mobilincconnect.com/diy/isy/cmd?username={MobiLincConnectEmail}&password={MobiLincConnectPassword}&uuid={ISY-UUID}&command={RestCommand}

Replace the following parameters with your specific MobiLinc Connect account settings:

{MobiLincConnectEmail} = Your MobiLinc Connect email address. Example: myemail@gmail.com

{MobiLincConnectPassword} = Your MobiLinc Connect password. Example: mypassword

{ISY-UUID} = Your ISY's UUID without colons that is connected to your MobiLinc Connect account. Example: 0021b9123456

{RestCommand}* = Replace with any rest command that the ISY supports. The return result is the ISY rest return result. Example: nodes/20 1B 59 1/cmd/DOF (You must replace spaces with "%20" to work in Siri Shortcuts. Also, you must capitalize all letters in the node address.)

 

Full example to turn your kitchen light with an address of 20 1B 59 1 to ON:

https://mlnode.mobilincconnect.com/diy/isy/cmd?username=myemail@gmail.com&password=mypassword&uuid=0021b9123456&command=nodes/20%201B%2059%201/cmd/DON

*NOTE: For the rest command, /rest/ is assumed. Do not include /rest/ for the command. Simply start with the rest command to the ISY after /rest/.

For example, "command=nodes/20%201B%2059%201" will return the node information for device 20 1B 59 1.

**I'd recommend you copy/paste the above in the Notes app from your MAC (if you have one) and open on your iPhone to make entering the above a little easier**

2. For Get Contents of URL in the Siri Shortcuts step, the default "GET" parameter with no headers is correct. No changes are needed.

Step 4: Test your Shortcut by tapping the "Play" button at the top of the shortcut. You should see the results of the command in the Siri Shortcuts app.

Step 5: Tap the horizontal two switches just under the "Done" button to go into the settings for your shortcut.

Step 6: Give your Shortcut a Friendly Name: Example: "Kitchen On"

Step 7: Tap "Add to Siri" and speak the phrase you want to use to trigger your Shortcut. Example: "Turn my Kitchen on."

Step 8: Tap Done to save.

Now you can say "Hey Siri, turn my kitchen on" and Siri will run your shortcut and turn your kitchen lights on.

The DIY API isn't limited to just lights. You can send any REST command the ISY supports like Scenes, Programs, ELK security, or Variables to integrate exactly how you want with your iPhone/iPad/HomePod and Siri. HomeKit NOT required!

While the above works great, I understand there are a few steps to get Siri integrated. I've got Siri integration on my to-list with the MobiLinc app re-write currently underway to make this a single button tap to integrate lights, scenes, programs, into Siri.

Wes

Posted

Cool. Thanks Wes. It seems this works with the UDI Portal as well as directly with the ISY (if publicly exposed with a valid SSL certificate. A neat new function of IOS12 for sure...

I wonder if the password is kept on-device or synced. Because it’s a URL it’s not likely encrypted - so all should be aware of the possible security consequences to encoding a password into a URL (especially if synced between devices)

Otherwise, a slick solution to arbitrary API calls driven by Siri.

Posted

Thanks, MWareman!

I updated the topic with another option that is a little easier to configure using the IFTTT Webhook (formally known as Maker) Channel. Use your Webhook API Key as the URL Siri trigger to trigger into the vast ecosystem of IFTTT services including anything on your ISY via the MobiLinc IFTTT Channel. Very easy to set up and configure without having to understand any ISY REST commands.

Since Siri Shortcuts is an Apple app, my strong suspicion is that if they are doing device syncing/backup of your personal shortcuts it's done via iCloud and the iCloud encryption mechanism to protect your personal data. But, for those concerned about exposing creds in a URL, the Webhook + MobiLinc IFTTT Applet combination is simple, easy to set up, and just works when you are home or away.

Comments on local/direct IP:

Local/direct IP did seem to work over HTTP if you are only ever using Siri at home. This wouldn't work if outside your home network unless you exposed your HTTP port to your ISY which is very much NOT recommended. Also, your router would have to support IP Loopback which many routers do not.

HTTPS is a better option if you have external access exposed, but as you outlined you'd need a valid SSL cert which is non-trivial to set up plus your router still needs to support IP Loopback.

Wes

  • 2 months later...
Posted

There's got to be a simpler way! I've spent the better part of day trying BOTH of these methods to get Siri to turn on my lights. Neither worked. I followed all the steps and reached the end point of both. Siri then ran the shortcut but none of the devices responded. Any suggestions (other than going back to using the manual light switches)?

Posted

Hi @Jack1902

Start with IFTTT. Make sure you can use IFTTT and the "Button" widget offered by IFTTT to turn a device on and off. Once that is working, then you know the link between IFTTT and your ISY is solid and you can then focus on the webhook part before adding this to the Siri Shortcut working. In short, work backward from IFTTT to webhook to Siri to make sure each step is working. If you keep having trouble, please reach out to us for help via email: support@mobilinc.com and provide your ISY's UUID and screenshots of each of the configuration steps so we can see what you are doing and offer suggestions.

Wes

  • 3 months later...
Posted

I'm using the Siri Shortcuts method.  It took me a bit to figure out how to list the addresses of things (like scenes) in the ISY (I used /nodes/query for the command) but after that it worked like a charm.  This is so cool!!! 

  • 6 months later...
  • 5 months later...
Posted

I have ISY portal and Polisy and Mobilinc Pro.  Trying to establish Siri command via IFTTT to turn on an insteon light or warm up my  Tesla.  Is this possible without subscribing to Mobilinc connect?  I don't seem to be getting anywhere with the posted instructions.

Posted

Hi @SHM

In order to link our MobiLinc IFTTT channel you'll need the MobiLinc Portal installed in your ISY and a MobiLinc X subscription. Or, if you are using MobiLinc Pro/HD/OML, a MobiLinc Connect subscription.

Wes

Posted
On 3/14/2020 at 12:27 PM, SHM said:

I have ISY portal and Polisy and Mobilinc Pro.  Trying to establish Siri command via IFTTT to turn on an insteon light or warm up my  Tesla.  Is this possible without subscribing to Mobilinc connect?  I don't seem to be getting anywhere with the posted instructions.

yes, you can do that with IFTTT / Web Hooks on ISY Portal, then create an iOS shortcut that makes that web call. no mobilinc app or mobilinc connect needed for this.

 

@InsteonNut - as much as I love your products, and am a huge fan of mobilinc X, this can be achieved without connect. there are MANY other benefits to connect, such as the immediate status and cross device sync, but if he's on the ISY Portal route, no need to force him to move portals.

Posted

I’m sorry. I do high tech data center work for a living and this has to be one of the biggest kludges I’ve ever seen. 6 band-aides and a 4x4 pad to get things talking. Unreal.


Sent from my iPhone using Tapatalk

Posted

Hi @eyaniv

There are a few choices out there on how to do this. The one benefit with how I implemented IFTTT is MobiLinc is an official channel. It's dead simple to pick actions and triggers from/to your ISY and hook them up to anything in IFTTT. So, if you aren't locked into another portal, you can't get IFTTT integration with your ISY any easier than what I've developed for my MobiLinc users.

Wes

Posted
@kissfan
Agreed. Easy Siri shortcuts is something I'm investigating on how to best support in MobiLinc X.
Wes

Wes,

Now you’re talking. In order for the masses to embrace home automation, you’ll need a simple, clean interface like shortcuts. Kudos.


Sent from my iPhone using Tapatalk
Posted
2 hours ago, kissfan said:


Wes,

Now you’re talking. In order for the masses to embrace home automation, you’ll need a simple, clean interface like shortcuts. Kudos.


Sent from my iPhone using Tapatalk

The masses aren't buying systems like the isy. They are buying bulbs and connecting them to Alexa or Google. Those who want a little more are buying smartthings hubs or insteon hubs

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...