[RELEASE] Alexa Helper

@wkearney99 Never hurts to warn. However thermostats/HVAC systems are setup up with built in safeties to prevent settings that can cause damage. Things you are describing like high or low setpoints or cycling A/C too quickly shouldn’t be a problem. Alexa Helper is only passing on requests to the algorithms/systems that are actually doing the control with safeties built in that will prevent harm. So if Alexa passes down a setting that is above/below the local range settings it shouldn’t be accepted at all. I would recommend against Alexa Helper taking an out of range request and making it automatically the local high or low local setting.

Agreed…be sure to set limits…There is no feedback from Alexa on what you say…59 can sound like 69, and that can be the difference between AC and heat…Always use the Alexa and my helper app at your own risk…

Also, for those interested, ask Alexa how many Oscars Alex Baldwin has won or how many super bowls Dan Marino has won…the answer will surprise you…

Ok - First report is the new echo power cable fixed that issue.
Then I tried this. (your first log.debug has a comma) switched it to a period and got this

d66dd52b-6f02-4cb9-970a-948b297c4307  3:22:16 PM EST: error java.lang.NullPointerException: Cannot get property 'label' on null object @ line 600
d66dd52b-6f02-4cb9-970a-948b297c4307  3:22:16 PM EST: debug null

Yeah…that should be a period between log and debug.

This is telling me your variable for switch is not being set up correctly. Could be a few things, but let’s try this…

I would change the first debug to this:

log.debug “${i}”

If it comes up null your code is not set up properly and I would advise to re-load the RAW code from the GitHub (we are now at 2.5.0): https://github.com/MichaelStruck/SmartThingsPublic/blob/master/smartapps/michaelstruck/alexa-helper-scenario.src/alexa-helper-scenario.groovy

Done, came back null again


d66dd52b-6f02-4cb9-970a-948b297c4307  3:47:15 PM EST: debug Playing: null
d66dd52b-6f02-4cb9-970a-948b297c4307  3:47:15 PM EST: debug Alexa Helper scenario 'Sonos', 'Speaker Saved Song/Station Trigger: Merle' triggered

Taking this to a PM to help troubleshoot without cluttering this thread

1 Like


Thanks to the troubleshooting Greg and I did, we have found an edge case where you will not be able to load your Sonos stations. I have uploaded version 2.5.1 of the child app to solve this issue. I recommend everyone upgrade to that version when you get a chance.

1 Like

Ok, so I am educating myself on the Alexa Helper. What is the difference between a ST standard virtual device (switch) and the Alexa Switch?

Ok, answered my own question I think…the virtual device is a momentary switch only correct?

Jon…not quite…the Alexa Switch, at its core, is just a dimmer that doesn’t have to be in a specific state to trip another state. For example…let’s say you use a dimmer to turn on a light…the state of the virtual dimmer goes on and then passes the on command to the light. Now you manually turn off the light…but, your virtual dimmer is still on…so if you told Alexa to turn on the virtual dimmer to turn on the light again it wouldn’t react as the dimmer won’t pass the on to the light when it (dimmer) is already on. The Alexa Switch ignores the state of the virtual device and passes on,off or dimmer settings to the device you connect it to in Alexa Helper. Using a light as an example is not a good one since Alexa can natively control lights, but think about this with a speaker or thermostat where there can be manual changes made to the device outside of automation, and it would be difficult to keep everything in sync (switches and virtual devices).

Does that make sense?

I wonder if this is related to a problem I was having with SmartAlarm trying to disarm after Alexa Helper set my SmartAlarm to arm? I was using a virtual simulated switch to trigger the SmartAlarm by setting the Goodbye! routine. When I would get home I use a PIN to unlock the smart lock using @RBoy lock manager which would then disarm via I’m Back! routine however the issue though was the ST system would rearm again through Alexa Helper. I think because the virtual virtual switch was still set ON? Anyway I couldn’t seem to prevent the problem until I completely removed the Alexa Helper from setting the ARM mode.

Are you using a momentary button tile to trip the Goodbye routine? What you described shouldn’t have anything to do with the virtual switch, but removing it from Alexa Helper seems to indicate that another automation within Alexa Helper was turning Goodbye back on. However, this is easily preventable and shouldn’t force you to uninstall the whole app to make your system work…

Let me know if that helps.

I am still using your awesome app! I only disabled the one scenario that was doing ARMing of the SmartAlarm. Originally I was using a simulated switch but then changed it to a Momentary Button Tile thinking that might fix it but I still had the same problem. Is there an easy way to determine what exactly why Alexa Helper is triggering it back to ARM mode? The reason I think it’s Alexa Helper doing it is because I have the app notifying me with a custom SMS message “Alexa executed “Goodbye!” routine” I think it could be I am not fully understanding how Alexa Helper works. I was really liking the ability to delay executing the ARMing routines because it then provides an exit delay with the ST Home Monitoring app if I don’t use SmartAlarm

I would have to see your scenario set up…if you want you can do screen shots of the scenario and then the respective routine it is calling. The best way to troubleshoot this is to actively look at the log when things are happening. Do you feel that this is easily repeatable? If so I could have you watch the log for specific things or send you a special version with a bit more verbose logging…

Let me know.

Thanks for the help. I’ll try to look at it this weekend when I get back and let you know how it goes.

1 Like

All, wanted to let you know the interview went well…I went through the “the loop” as they called it and had a full day of discussions between some of the Alexa Evangelists and Architects. They were all very impressed with what was done with SmartThings (I actually got the ‘hmmm…that is actually a unique solution’ comment). At the end of the day, they didn’t offer me anything in the way of a job. Oh well…in response to the interview I actually started looking into the Alexa Skills Kit (ASK) and am trying to figure out what I do next with Alexa Helper…Anyway, thanks to everyone that PMed me and provided testimonials and support. Quite honestly, if I had gotten a job it would have kept me quite busy and I wouldn’t have been able to do anything with the SmartThings app anymore…everything always works out for the best.


Hi Michael,

I’ve been racking my brain all day trying to get Alexa Helper to work with my Sonos but not sure what I’m doing wrong. Not sure where I should start in explaining what I have currently.

It should work with the following high level steps.

Define a dimmer (preferably an Alexa Switch) in the IDE
Make sure you discover the device through the Alexa
Add a Speaker scenario in Alexa Helper
Associate the speaker with the dimmer

Did you do these? Further explanation is here:http://thingsthataresmart.wiki/index.php?title=Alexa_Helper#Speaker_Controls

However let me know what step you are stuck on and ibcsm see what I can do.

Thank you for the quick response Micheal. When I try increasing the volume by using the command “Alexa, set Sonos to 20% or Alexa, set Sonos to 20”, Alexa responds “that command doesn’t work on playbar sonos” (volume upper limit is set at 80). Also, does the “SonosNextTrack” command need to be together or can the words be spaced? Just curious because I was having a hard time getting that command to work till I started saying it a bit faster (not sure if the words not being spaced apart has something to do with it). Thanks in advance for your assistance.

Sounds like you are trying to control your Sonos directly instead of through a virtual dimmer… Is that correct? You should disassociate the Sonos from Alexa and only use the virtual dimmer to control it.

As for the naming of the tracks, you can add the spaces… I just found too many gaps causes problems as well. At the end if the day name them what works…

Let me know if that helps.

Looks like I got everything working correctly! Is there a way to control the tv volume using Alexa Helper by any chance? Thanks for all your assistance.