Trigger Smart Home Automations Without Siri or Apps? Here’s How!

The Secret Shortcut for Hands-Free Automations You Didn’t Know About

Here’s a trick the NOBODY talks about: You can trigger automation using your voice without deep diving into an app or using Siri or any other member of the smart home cartel. If you use your iPhone you can trigger this broken shortcut that’s so powerful, that if it were a movie it would get nerfed in part 2.

What is this OP shortcut?

Get contents of url.

Yup. This shortcut seems simple but has the power to send data custom data over the internet to a location of your choice. Depending on where you send the data, you can trigger epic automations with very little effort. This is how you build it.

  1. In the Shortcuts app you can create an new automation that first triggers the Dictate Text. This will let you speak to your phone and automatically convert your words into text. All of this happens locally on your phone so you don’t need to pay for any transcription service.

  2. The text output will be used as input for the Get Contents of Url. In the image to the left, you can see that the request body contains the dictated text along with some hard coded information like my first name. All of this data will be sent to the URL endpoint controlled by my smart-home (in this case this is my Node-Red Server that’s linked to Home Assistant) If you have this setup with home assistant, the endpoint for this example will look like <IP_ADDRESS>:8123/api/webhook/test

  3. The Speak action is where the phone will use Text-To-Speech to respond back to me.

The Speak action is optional if you are using Node-RED. If you are using Home Assistant, this may not work well for you as you. I was not able to figure out how to return the text data back return from the conversation process in home assistant.


Two ways for setting up the Automation


Node-RED Setup

To trigger automations using node-RED you will need the HTTP In node, the HTTP Response node, and the Action node.

  1. The Http In node needs to set the URL to “test”

  2. The Action node needs to set the action to conversation.process and the data to {“text”: msg.payload.text}

  3. Optional: In the Action node add an output to the msg.payload with the value set to Result. Then you can add a Change node to output and set msg.payload.message.content to msg.payload.response.speech.plain.speech This will, return the response from Home Assistant Assist. ( be warned the the TTS voice on the iPhone sounds like bad,


Home Assistant Setup

Using only home assistant can achieve similar results.

Create a new automation with the a Webhook trigger set with the endpoint set to “test”. Next add the action Conversation Process and set the text equal to “{{trigger.json.text"}}” quotes included.

you may need to use YAML mode in order to set the text this way.


Click the image to watch the tutorial

Triggering the automation

If you have the latest iPhone, you should have the Action Button which lets you trigger custom actions. In this case you can trigger the new shortcut you created. But what if you don’t have the most recent iPhone. Well older iPhone have an accessibility feature called Back Tap that lets you trigger actions but double tapping or triple tapping the back of the phone. This action can also trigger shortcuts.

Check out this video to see a demo of the automation and how I set it up using the Back Tap feature.

Previous
Previous

Transcription Automation using GPT and Node-Red

Next
Next

Setting Up Actual Budget