Is it possible to call a phone number to trigger an action?

I would like to give someone a phone number to call and when they do something will happen. Can this be done?

Anything can be done. In this case, the first thing I would think about would be a cheap Android phone running Tasker. Then set up a ‘phone ringing’ profile in Tasker that calls a SmartThings endpoint URL.

fortytwo offers a voice gateway that can receive voice calls and issue commands to a REST endpoint such as the Cloud Interface by @MichaelS

In the US, it’s extremely easy to do with IFTTT. They give you a unique phone number to use, and any voicemail left at that phone number will trigger any other event you want from an IFTTT channel. And since ST has an IFTTT channel, done. No extra hardware needed.

If you want to make it more targeted, they also have a text channel where you can use a specific hashtag if you choose.

Before the echo came out, I used the text message method for voice control of SmartThings. I could tell my phone to send a text with a specific hashtag like “hey Siri tell House #Kitchen” ( House being the contact name I use for my IFT TT SMS number) and I had set up an IFTTT recipe that when I received #kitchen Then have SmartThings turn on my kitchen lights. It wasn’t natural language, everything had to be said in exactly the right format, but it worked quite well.

Lag for IFTTT varies from place to place, at my house it’s a pretty standard eight seconds for the text message method, which worked for my use cases.


I’m not in the US, and I’m looking for a solution without leaving voice message.

I know several places where I can call a number and it opens a gate for me if I’m on the list. I want to do something like that using IFTTT. I can take care of the limitations, but how do I trigger an IFTTT by incoming call?

I do have a some spare androids. I will install Tasker on one. But what does this mean: “calls a SmartThings endpoint URL”?

I don’t think IFTTT outside the US has the phone channel, so I’m not sure you can do it there. You’ll need to get the details on one of the other options.

You can set up any device in your SmartThings to be triggered ‘on’, ‘off’, or ‘toggled’ by a simple https URL that Tasker can send…

I’m doing exactly that via Tasker. I have a music studio. Band members arrive at different times. If I’m in the studio playing, I won’t hear the doorbell. So I have them phone or sms-text my google hangouts number when they have parked. Tasker intercepts the notification using the AutoNotifiction plugin and, via Sharptools, turns on the front door light AND sets off a strobe in the studio. It could easily unlock the front door for them too if I wish.

EDIT: Tasker can get very specific in its contexts, or can be general. In the above scenario, it only does those things if the texts/calls come from specific cell #s… and only on a specific day, within a specific time range.

1 Like

You could set up a smart tile specifically for contractors or whomever. For an example just have one tile say open garage door and send them the link. And then when they’re done you can go into the settings and revoke it.

Thanks very much for the information.

I was able to set up the android and install Tasker.

However, the url example only allows me to turn on and off devices.
It doesn’t allow me to unlock locks or activate a routine via url.
Is there a way to do that?

Yes. Set up a virtual switch, use the URL to trigger it. Assign a smartapp to the virtual switch that does what you want when the switch is turned on. You can use the momentary tile device type for your virtual switch.

1 Like

I was able to create a momentary button tile virtual switch and access it via url.
I don’t know how to attach it to a routine?

Here you go…

 *  Routine Execute Button
 *  Copyright 2016 Scottin Pollock
    name: "Routine Execute Button",
    namespace: "scottinpollock",
    author: "Scottin Pollock",
    description: "Execute Routine via Virtual Momentary Tile.",
    category: "My Apps",
    iconUrl: "",
    iconX2Url: "")

preferences {
    page(name: "configure")

def configure() {
    dynamicPage(name: "configure", title: "Configure Switch and Routine", install: true, uninstall: true) {
        section("Select your switch") {
            input "theswitch", "capability.switch",required: true

        def actions = location.helloHome?.getPhrases()*.label
        if (actions) {
            section("Routines") {
                log.trace actions
                input "onAction", "enum", title: "Routine to execute when turned on", options: actions, required: true

def installed() {
    log.debug "Installed with settings: ${settings}"

def updated() {
    log.debug "Updated with settings: ${settings}"

def initialize() {
    subscribe(theswitch, "switch.on", onHandler, [filterEvents: false])

def onHandler(evt) {

Sorry, still not getting it.
I upload this code via desktop as a smartapp? or device handler? I tried both and couldn’t figure out how to make it work.

What I posted above is a SmartApp that executes a routine when a momentary button is turned on. Did you install it to the momentary button and configure it?

I just tested it here and it works fine.

OK, I was able to configure the smartapp from the simulator screen on the right of the desktop. Now I will try to tie it together with the tasker.

In Tasker, I was able to find the incoming call trigger, but not the access url action.

– Found it

It’s all working, thank you very much.

I call the number and the routine is executed.

1 Like

Now I’m trying to limit it to a given time window.
How can I do that?

Set up another Tasker profile, based on time, to turn on/off the ring listening profile.

1 Like