In this post, I’ll talk about how to control your Alexa devices remotely – whether it be from your Mac computer or your iPhone.  For several years now, I’ve become a mac and iPhone automation nerd.  The problem though, was I had all Alexa devices in my home.  No Apple Homekit devices.  And even if I bought some, I’d be yelling both Alexa and Siri depending on the use… and that would confuse my family quite frankly.

First things first, you’ll need some basic stuff to get started: 

The goal:  Turn on a lamp in your living room by firing a Shortcut.

Let’s get started…

1. Add a Skill to the Alexa app called URL Routine Trigger

This Skill will allow you to connect with the Virtual Smart Home.

2. Go to VirtualSmartHome.xyz

Choose the URL Routine Trigger option.

Create 2 URLs – name one with ON at the end, and the other with OFF at the end, so they’re easily identifiable.  These URLs will be the triggers.  For example: Light ON, and Light OFF.

When you create one, it will give you a list of URLs.  The first URL for each trigger is what you’ll want to use moving forward.

3.  Go to Routines in the Alexa App.

Choose your trigger. Your new URL triggers will show up under Smart Devices (and may be listed as a doorbell (I know, kind of odd).  The names will be the same as the ones you created in the previous step.  Set an action for the Routine, like “Turn on the lamp”. Then create another Routine and make it “Turn off the lamp”.

Now you can trigger your Alexa devices by visiting those URLs.

4. Now, the fun stuff.

The next step is to decide how you want to trigger the URLs. I recommend using the Shortcuts app on the iPhone.

But first, download the DataJar app on your iPhone (or Mac computer).

Open the DataJar App and add 1 new text variable for the “status” of the lamp. Name it something like “Lamp Status”.  Make it  a Boolean type variable – this will allow only the values of true or false.  If you’re lamp is on, select true.  If it is off, select false.

5. Create a Shortcut that gets the values from Data Jar

Include a dictionary at the top of your Shortcut to define URL ON and URL OFF values.  These should be the top URL listed in your trigger information from Virtual Smart Home.  Set up an If statement that checks the status of the Status variable (Lamp Status) you created in DataJar.  If the status is FALSE, you’ll want to Get the Contents of the ON URL and then set the value of the Lamp Status variable to TRUE. If the status is TRUE, you’ll want to Get the Contents of the OFF URL and set the value of the Status to FALSE. Save your shortcut.

Hooray! You can now control Alexa with your Shortcuts app on your iPhone or Mac computer!

6. Bonus Points:  Set up a Shortcuts Automation Using an NFC Tag

Create a new Automation in the Shortcuts app.  In the Actions section, make the first action Vibrate Device. This will help you know when your shortcut runs, and when it doesn’t.  Make the second action Run Shortcut and choose the shortcut you created in the previous step.

To view and edit your trigger URLs, go here:

https://www.virtualsmarthome.xyz/url_routine_trigger/

Helpful tip:  Using the Shortcuts app in combination with the Data Jar plugin allows you to create a Shortcut that checks whether the status is on/off. If you don’t need this and just want to activate a single Alexa Routine, you could use the NFC Tools app to scan the NFC. But you’re best off using the Shortcuts app and using the Automations feature to “get contents of a url”.

Have questions?  Please feel free to email me at [email protected].

Thanks!