SmartThings Community

[RELEASE] Alexa Helper

(Micheal ) #1


Be sure to read this thread…newer version is listed below

Been quiet lately installing more Echo’s in the house along with the V2 hub. Everything is good and I am taking a more ST approach to my homes, getting rid if IP devices and replacing them with ST compatible items (Samsung SmartCams replacing DropCams, a ZWave garage door opener instead of Chamberlain’s model, etc). Anyway, I am 100% in to home automation.

As such, I re-looked at my Alexa Helper app. ST has been a bit slow in reviewing submitted apps, so I took an opportunity to update this app. One of the limitations of the platform is the inability to have more than 4 scheduled items within an app. To get around this, you must install the app multiple times. In the original Alexa Helper there were 6 slots, but only 4 that could use the timer. As mentioned a few times here, with various scenarios within a household, 6 slots (4 with delays) could be limiting. With the V2 of the hub and ST infrastructure, we now have a parent/child ability within the software. In essence, you have one ‘parent’ and various ‘children’ that don’t clutter the main interface. The main importance is that each ‘child’ is independent in its operation, so you can have each one have a timer. So, when you run the ‘parent’ app you can have more than 6 scenarios ‘children’, and each can have a timer associated with them. From the programming side of things, it cuts the lines of code down considerably and makes it much easier for me to design features into it.

That is a lot of words to say I updated the application to version 3.0 :slight_smile: I have renamed the original application "Alexa Helper-Original’ and it will stay at version 2.2.2 and will no longer be updated.

Right now, I consider 3.0.0 beta. Please install and feedback any issues to this thread. I will submit to ST next week. 3.0.0 WILL NOT upgrade from the original, so I recommend writing down all of your old ‘scenarios’ and then re-create them in the new version. Or, if you want to keep the original, I recommend using the link below to the original app(new title within the code) and overwrite the original code in your IDE. Your old settings will remain intact and allow for a parallel install of the new app.

So, here are the links and some basic instructions for installation (PLEASE HEED THE NOTE ABOUT THE CHILD APP).

If you want to keep your original program, overwrite the code in your current Alexa Helper via the IDE:

Just like any other app, copy the code below to a new smart app, SAVE and PUBLISH it:

Finally, create a new smart app using this code. SAVE it, but DO NOT PUBLISH it:

The instructions for using this are in the Wiki here:

Again, let me know if you find any issues with this…

Alexa Helper - Change mode or phrase with a switch toggle
Echo /ST/ Sonos
Question About Amazon Echo and Adding SmartThings Switches
Use Alexa to open a Kiwkset lock connected to Smarthings
[RELEASE] Ask Alexa
Amazon Echo
Do you guys use virtual switches for groups of lights?
SmartThings and Alexa can play Grand Piano
Amazon Echo Turning On Lights at 25%
Using Virtual Switch to trigger Routine?
AskHome - Alexa/SmartThings programmers kit. Alexa can do anything
Alexa not recognizing Shlage locks (or garage door)
FAQ: Creating a virtual Device
Status of Echo/Alexa fix for multiple Smartthings locations?
How can I turn a switch back to off at a pre determined time?
[DEPRECATED] 2015 Voice Assistant Run Routine FAQ--see 2017 FAQ instead
Automated Night mode?
Iris Smart Plug WiFi
Virtual Switch .... Mode change; Frustrating
Advanced Sonos Commands for Alexa/Echo (choose playlists/radio, control volume, skip songs, etc.)
Alexa can now control Nest Natively
Wink beats ST at announcing thermostat control with Echo, BUT ST integration works too!
Amazon releases new Echo Dot & Echo Tap devices!
[DEPRECATED] 2015 Voice Assistant Run Routine FAQ--see 2017 FAQ instead
[DEPRECATED] 2015 Voice Assistant Run Routine FAQ--see 2017 FAQ instead
Logitech Harmony and SmartThings Integration after Harmony "Control" Smartapp was pulled? (November 2015)
Two Roosters, Two Coops, and girl named Alexa
Craftsman Assurelink / SmartThings Integration
SONOS abilities list?
Battery Operated 3 Toggle Switch for wallmount or table top use (SmartenIT ZBWS3B), Long Install FAQ
A Satisfying Solution for Philips Hue Scenes, SmartThings, and the Amazon Echo
Santa just delivered a Sonos
Amazon Echo
Amazon Echo Question
FAQ: How to Add a New Location Mode, or Manually Change from One Location Mode to Another (Classic App)
Help Removing Alexa Helper
How to make virtual switch track another sensor
Is there a way to control Sonos with Echo using SmartThings?
Wink beats ST at announcing thermostat control with Echo, BUT ST integration works too!
Notification of SHM Status Change
Echo (Alexa) beeps now instead of "Okay" 2Gig / Alexa Update Possibility?
(Dee) #2

Mine is crashing when I tap “New Alexa Scenario”

I’m on an android device, and am very much a noob with this stuff.

Any advice?

Alexa Helper - Change mode or phrase with a switch toggle
(Micheal ) #3

Just to be sure, do you have child app saved, but unpublished in your IDE? You may want to send a screenshot of the IDE page so I can take a look.

(Dee) #4


(Micheal ) #5

Actually, mine started acting the same way, and I realized I added a couple spaces at the last minute that screwed things up. I reverted the code and the GitHub should have the correct version now. You will only need to replace the Parent app (Alexa Helper).

Let me know how it goes…just tested mine and it works now.

(Micheal ) #6


Just curious on the need for a new feature. I found a way to potentially control a thermostat, saying something like “Alexa, set thermostat to 75”. Would this be a useful feature to include within Alexa Helper?

(Dennis ) #7

I believe so, certainly easier than going through the app.

1 Like
(Micheal ) #8

Ok…will be working on this…since there is no active feedback from Alexa, I will want to make it very clear this is something that will need to be used with caution…95 could be heard when 55 was desired, and I don’t want anyone to burn their house down because of a misunderstanding on Alexa’s part that I can not control.

Will have a demo of this out soon.

(Dawn Fairbro) #9

Oh dear, :flushed: good cautious advice, thank you very much

(Micheal ) #10

Anyone see any issues with this app? If not I am going to submit it to ST for publication.

1 Like
(Max) #11

Can installing a SmartApp crash a hub? I installed this from work about 45 min ago, tried some configuring on my phone, and then my hub went offline and has been off since o_o


Not usually, but today, yes.

1 Like
(Max) #13

Thank you JDRoberts. So it appears I didn’t break anything. (Or I broke everything, sorry guys :wink: )

(Max) #15

MichaelS this is working great for me right now. Thanks for the app. I appreciate the inclusion of a delay timer!

(Micheal ) #17


Since I had some time during Thanksgiving I have put the finishing touches on the Alexa Helper, version 3.1.0. This version not only allows you to control modes, routines and switches, but now allows for adjustments of a connected thermostat.

For this new functionality, you will need to define a dimmer to use. Unless you have a dimming switch that doesn’t control a light, you will probably want to use a virtual dimmer (similar to a virtual switch/tile). I found this code online and polished it up to allow for the creation of a virtual dimmer.

In your IDE, create a new device type by copying/pasting this code and publishing it. Then, in the ‘My Devices’ section of the IDE, create a virtual switch. While you could call it ‘Thermostat’, I just named mine ‘virtual dimmer’ to be sure I don’t confuse it with the real thermostat.

Then, I add this main app (save and publish):

Finally, add this new child app (save, but DO NOT publish):

From there, you should have the option to control a thermostat (currently, only one is supported. Depending on feedback from the community I can add multiple units if needed).

The options for the thermostat control are rather easy…define the Alexa dimmer (probably the virtual dimmer), then choose the thermostat to link this to. I did put in upper/lower limits to this, just in case Alexa hears 29 instead of 69…I would set these parameters rather tight to prevent too hot/too cold of a setting by accident. UNDER NO CIRCUMSTANCES WILL I BE HELD RESPONSIBLE FOR ALEXA MISUNDERSTANDING YOUR TEMPERATURE SETTINGS. USE AT YOUR OWN RISK!

If you do name your virtual dimmer something generic like ‘virtual dimmer’, you can set a group within the Alexa app to name this device “thermostat”. That seems to work for me. I simply say “Alexa, set thermostat to 69” and the dimmer goes to 69, which sets the thermostat to 69 degrees.

Finally, some limitations…I have a Nest Thermostat, and this works well when in HOME mode. If the thermostat is in AWAY mode (not AutoAway set by Nest but true “AWAY”) the temperature commands won’t register. I feel this a good thing, but also wanted to point it out. Since I don’t have any other thermostats so I can’t test their specific parameters. If you find this is not working for your brand of connected device, send me a PM.

I am really interested in feedback on this…I look forward to hearing from everyone on how this works for them.

[RELEASE] Simpe Volume with Voice
(Bill Kearney) #18

Would it be prudent, perhaps, to put a set of high/low threshold values for a device being used as a thermostat? As in, accept whatever values might be sent, but truncate them so they’re within the pre-configured acceptable range. That way even if you said “set thermostat to 10” it would only drop as far as, say, 65F.


Anyone able to get this to work? ST app crashing every time I click on “Create New Alexa Scenario”.

(Micheal ) #20

That is technically what the app does if you set the min/max. If you accidently say 10 to Alexa and the lower limit is set to 55, it will only set to 55. Same with the high limit…if you say 100 and the maximum is 85, then it will only set itself to 85. Is that what you mean?

1 Like
(Micheal ) #21

You will need to ensure the following:

The ‘parent’ app is saved AND published
The ‘child’ app is saved BUT NOT published
The virtual dimmer saved and published as a Device Type.

What you are describing sounds like you don’t have the child app installed (

(Bill Kearney) #22

Yes, I have yet to read through the code. I just happened to notice the warning and figured thresholds would be one way to avoid it.

There’s a lot to thermostat control that can cause problems, not just unusual temperature ranges. Some of the biggest problems come from accidentally cycling the systems on/off too quickly. AC compressors do not take well to being started/stopped in ways that would not come from normal temperature swings. So you’re right to warn people.