Alexa Helper - Change mode or phrase with a switch toggle

You know what? I could limit the first 4 slots to the ability to use timers and still keep the 6 slots, with the last two just normal. That would work…

Whatever you think. I think the idea of delaying the onset for security system will make perfect sense to the people who are using that functionality. So I would limit the examples to that. The other functionality is already great for anybody who wants to set up virtual switches, so I just keep it as simple as possible. :sunglasses:


Here is the beta version of the app referred to above. Basically, I have modified the first 4 scenarios to allow for a timer to be set upon triggering the switch via Alexa. Naming the switches strategically can give a naturally flowing phrase, probably best used to control your Smart Home Security. Here is how I use it:

  1. I have a virtual switch (momentary tile, actually) named “Security in two minutes”
  2. I use the Echo App to include that switch. I discover the new switch on the Echo
  3. I associate that switch in this app with a Routine change the turns on the security. I set the timer within that scenario to 2 min
  4. I say “Alexa, turn on security in two minutes” Alexa complies with “ok” and the house arms two minutes (or so) after.

Not much change from the original, but as JD said above, there are probably many use cases (i.e. Alexa, turn on Good Night in 30 minutes…this could turn off a TV or something else after you have fallen asleep).


EDIT removed the beta version and this is the latest release version submitted to SmartThings for publication:

1 Like

I added the alexa helper code as a new device and smartapp and it isn’t showing up in the app under smart apps. Am I doing something wrong or will it only show up if I add a virtual device?

The code would just be a SmartApp…you need to copy the code and put it into the IDE…ensure you ‘publish’ the app. You will then need to go to devices and create a virtual device, Ensure you associate it properly with the proper hub. Does that help?

The Alexa helper code published to this thread is a smartapp, not a device. This might help explain:

Once you follow the steps in the FAQ to publish it to yourself, you need to go to Open the smart things mobile app, go to marketplace, choose smart apps, and then scroll down to my Smartapps.

Find Alexa helper there and install it.

Got it thank you everyone!

Noob question… Do I have to uninstall the old version to get the new version?

And I’d yes, when I uninstall that means I lose everything already set up right?

Thanks, just want to clarify

No. There is no need to uninstall. This is considered a separate version right now. Test it out and if it works for everyone I will release a version that you can use to overwrite the old code and you shouldn’t lose any data. Make sense?

Yes, thanks a 20 character bunch

I released the following update to replace any beta version. I also sumitted this version to SmartThings for publication:


wow excellent app, thank you for this!. do you think It would be possible to also toogle a switch for the slots with timers?. This would be great for example, if you have a Harmony hub and want a timer to turn off an activity. Right now, you have to go the the harmony app and select the timer for a specific time. But with this you can create a timer for 30 minutes for example and turn off the activity with that timer

I know that right now you could create a mode and turn off the Switch from there (using the alexa helper app to change the mode with the timer), but it would be better to keep the state of the mode

Thank you!

If I understand what you are asking, you want the scenarios to control other switches instead of just modes or routines? Technically it could be added if that is what you are looking for. Let me know and I may be able to make a special variation with that functionality.

I didn’t ask for it, but yes, that would be great.

@MichaelS, yes, exactly MichaelS. It would be great to also control switches (especially in the slots with time)

Let me see what I can do…

Ok all,

Here is the beta version of what you are asking for. The more I think about this there are probably real reasons to control other switches with this even though Alexa can control them through groups…even with out delay timers involved…I did change the whole formatting of app and put groups in of things that can be controlled as I might add locks and such later. If you choose a momentary switch, the whole group of ‘off options’ goes away, which is better for the UI.

One note…there is a small delay from when you trip the original switch to the tripping of the ‘slave’ switches…this is normal as part of SmartThings processing and happens regardless of the delay within the app…it is usually less than 10 seconds from what I have seen…

Let me know if you find any issues with this:

Thank you so much MichaelS, I’m going to test it to see how it goes. One question, do you think is possible to cancel the "timer’ after its activated?. For example, I you activate the first slot, which turns on a switch or changes to a routine, and the delay is 30 minutes, but later you change your mind a want to cancel that.

Once you set a timer it is set unless you specifically code that it cancels…technically, I probably should have coded in the cancellation of the On sequence when the Off sequence is triggered; however, then you are setting the off timer at that point.

Let me give some thought to this and I will let you know if I come up with something.

edit just looked at the documentation and it doesn’t appear there is a way to ‘unschedule’ a specif timer once it starts without killing all of the scheduled jobs…so in this case there isn’t an easy way to cancel something once you set it.

Just made a revision to the beta…added different delays to the on/off selection…so, you could have a single scenario come on 2 minutes after you tell Alexa to trip the master switch, but then would turn off on a different timer. I also fixed an issue with the slave switch is required in the scenario…made that optional now as it should be…

The current revision is 2.2.1