[RELEASE] Alexa Helper

A lot of those errors come directly from ST and their back end systems…somedays it is smooth, sometimes every click I make gives one of those red errors…

Nothing in the code would cause that…I can send you the links to the older version to verify, but ST seems to have given me a LOT of errors in the app itself today.

I would uninstall completely and re-install as a step as well to verify that some of the older variables aren’t stuck in memory.

Let me know if you need links to the older version. I will send them to you via PM to keep this thread with the latest version and not to confuse other users.

@MichaelS – If you could PM me the link to the old code that would be great. At this point I cant completely uninstall via the app or the IDE. Thanks.

–Kurtis

There should not be any old variables stuck in memory since this was a clean (1st time) install of the latest source. I am going to just chalk it up to the SmartThings App giving the usual errors. This one just stood out since it did not have the usual text that the red banner of death usually gives me.

New release coming this weekend! A few odds and ends will be added, but the big news is a new type of ‘Alexa Switch’ I will be releasing…this “virtual device” is like a normal dimmer, however, it has one small difference…it is stateless…What does that mean? Well, let me give you an example of where you might have run into this.

Let’s say you have a virtual switch controlling your speaker…There was no feedback from the speaker to Alexa Helper, so you might have turned on the Speaker with the Echo, but manually turned it off. The virtual switch controlling the speaker now is on, but the speaker is off. If you issue the command <Alexa, turn on speaker> she will do nothing as you can not turn on a switch that is already on…so nothing is passes to the speaker. Using the new Alexa Switch, even if it is on, it will ‘pass through’ the commands to the speaker. And just like a normal dimmer, you can still adjust the volume via the same switch. Neat, huh? Of all of the questions I have had about Alexa Helper, this one was at the top of the list…and thought it would require some sort of syncing between the devices you are controlling and the virtual switches you designate. Now, that is not needed and the commands you issued will go correctly to the device regardless of the state of the virtual control switch.

7 Likes

Sorry…,to be clear the Alexa Helper and the Scenario (Child app) SmartApps will be updated to the next version, and the Alexa Switch (which is a device type) will REPLACE the virtual dimmer device. So two app updates and one new device. They are all mutually exclusive and should all be used together.

1 Like

Does this mean we will be able to say “Alexa turn up/down speaker” or “up/down thermostat”?

No…those types of commands are limited by the Echo itself. Everything we do with the Alexa are limited by the limtted vocabulary of on/off, open/close, set to x%, etc.

1 Like

I assume that if you look at this new virtual switch in the app it will show as “on” until explicitly turned off, right? If so, then it still has and retains its state. Wouldn’t it be more accurate to say that this virtual switch is different from a normal switch in that it will send “on” when turned on, even if already on, rather than calling it “stateless”?

You could say that…while it does show on/off in the display, the state is actually meaningless as it still ‘passes through’ the command to the appropriate devices. However, to give folks options I did add an on/off button on the switches device page that let’s you issue (manually) the on/off states. So, syntax wise you are right…I didn’t feel right just eliminating the on/off display from the device page as that would confuse some folks as well…

Any reason why after updating to the newest versions of everything, when I tell Alexa “change thermostat to 68” she says “OK” but then nothing changes…

Something I should check first? Should I be able to change the temp from the “Alexa switch” in the app? Because if so that doesn’t do anything either…

The first thing to do it sounds like you already did…watch the virtual dimmer you have set up and ensure when you say 68 it changes to 68. If so, next I would check to ensure your thermostat (you didn’t mention the brand) is in a state where it can accept commands. If it is “off” or in auto mode (without the toggle for controlling in auto being on), then the commands go into limbo (as they are designed to). Finally, I would ensure ST itself still sees your thermostat and you are able to control it via the app.

Let me know what you find out.

I hope that the state is not “meaningless”, as I use many virtual dimmers in Rule Machine rules that depend on RM being able to detect state changes. Can you confirm that one of these new virtual switches, once turned on, will not be detected as “off” until it is explicitly turned off? Also, did you have any discussions with @bravenel about the potential impact on rules that might use this new virtual dimmer?

And, while we’re on the subject, if you’re going to go there, wouldn’t you also want to send “off” when an instance of one of these is turned off, even if it’s already off, as well? Just for consistency, I mean.

I stand corrected…YES, other apps will be able to read the state of the dimmers…by creating these types of switches, however, it solves one problem in that you don’t have to sync the Alexa Helper app with the current status of the virtual dimmer as THAT is meaningless…the communication is one way and now there is no hurdle to having Alexa send consecutive on commands to a device without first having to turn the virtual dimmer off. However, it creates the opposite problem…the status you see on screen may not be in sync with reality. So, the switch can be off, but the actual light could be on. If you are keying off of that in another app, then it isn’t meaningless, but has the potential for being wrong. I struggled with this to LOCK Alexa Helper to ONLY use the Alexa Switch. I decided against it to still allow folks to use regular switches and dimmers (real or virtual) in case they use those as the ‘one source of truth’ in their environment. You just have to decide in your house which are allowed to be out of sync. In mine, it is MORE important to wake up and simply tell my Sonos to turn off instead of on, then off…

To be clear, I am not deprecating the virtual dimmer…it will still exist and is usable. Again, each use case is unique and I want to be able to give the tools to accomplish what you need to do.

For your last sentence, I am not clear on what you are saying…I think you are asking if the opposite (the light is on, but the switch is off) situation will function. And yes…you can think of the virtual switch as just a pass through in some respects…its state is ignored by Alexa Helper, so if you send an on, whatever you have trigger to go in the on state will fire. If you say off, the off scenario is run with no regard to the status of the dimmer.

Does that all make sense? Top level summary…while this is a change to Alexa Helper you can still use a virtual switch, but you need to understand there will be out of sync situations…

1 Like

Thanks for the response. It is a CT100. ST can indeed control the app. It’s only when I try to use the vDimmer or Alexa where nothing happens. I have checked all of those things (including that it is in “heat” mode but still nothing.

I wouldn’t mind starting from scratch but ST makes that a very frustrating experience as I can never figure out in what order to uninstall everything. It seems like no matter what I do it sends me in a circle with errors about needing to uninstall something else first…

To each his own. :unamused: Please don’t change or deprecate the original (proper) virtual dimmer/switch.

The proper order to delete is each scenario first, then the parent app. Technically, you should just be able to remove from the parent app and all of the children will be deleted (I do this daily for testing), but some folks really have issues with that process (maybe ST is having issues?

No plans on it…the documentation will recommend the Alexa Switch from now on, but advanced users can always have the option to ‘tweak’ how they use the app.

I just checked the code with my thermostat and it is still working. However, I wonder if this is a SmartThings issue:

@MichaelS, thank you for the reply! Indeed it does make sense. I have installed the parent and child app. However, the two things I’m really looking to do at this point is Echo control of locks and routines.

I’ve already got Alexa controlling my Good Night routine by use of a Momentary button.

However, how do I get Alexa to control my lock. I created a Alexa Switch tied to my lock. On = Lock, Off = Unlock. I discovered it via Alexa, however it’s not working. It keeps telling me it can’t find a device “Lockdown Protocol”. Did I use the wrong switch type? Do I need to tie the lock/unlock action to two different routines and use a momentary button for that?

When you tell Alexa to turn on the lockdown protocol do you see the switch toggle? If not then Alexa is not understanding the command. I would first call the switch something easy as I bet you are running into one of the Alexa key words.