Yup. The Alexa Helper SmartApp will give you a ton of flexibility for each Alexa Switch. You can control different devices based on the on or off events of the Alexa Switch.
whatâs the momentary button tile code for on your github? isnât there already one built into smartthings?
NeatâŚI had no idea. Iâm running the Alexa switch but wasnât seeing that. Iâll have to double check my code to make sure Iâm on the latestâŚeither that or have more caffeine, I had an early morning!
YesâŚthat one is for integration with Alexa HelperâŚwith that code it allows the actual app to create the switch instead of creating it via the IDE. That is the only difference outside of the GUI changes.
so i need to install alexa switch and your momentary button tile code as well?
So I do see the different On/Off control! Cool! Apparently, Iâve even used it before to create a virtual switch of âLockdownâ to control my Front Door Lock. Like I saidâŚitâs been a long day. Sorry about that!
It is up to youâŚif you are using Alexa Helper, it recommend it as it will keep you from having to go to the IDE to create the switches. However, if you are comfortable with that then the momentary switch code is optional; you can use the ST codeâŚI DO recommend the Alexa Switch code, however, to give you the âstatelessâ abilities of the switch/dimmer.
great, trying it now, thank you so much for your help, it is extremely appreciated.
if i create a momentary button tile, will alexa let me send ON and OFF commands to it? i donât want it to have a state.
ok i guess that wont work. i made a momentary button tile (naked Toggle) using your app and set ON to run my âall lights onâ routine, and OFF to run my âall lights offâ routine. when i tell alexa to turn Toggle On, the lights turn on then off⌠same when i tell Alex to Toggle Off.
will try the Alexa Switch virtual switch now⌠but my concern is that it will have a state, so if i tell alexa to turn it off and it is already off then it wont work? since i may have lights ON that are controlled by the âall lights offâ routine.
The momentary button toggles from off to on to off, so it will trip the on and off pieces of the scenario if those are set up. Quite honestly you can use an Alexa Switch for what you are looking for as it ignores the state it is in and simply passes the commands through.
great, trying it now
ok something isnât working right. i made a virtual switch called Toggle (alex switch) that supports on/off⌠when i tell alexa âturn on toggleâ the All Lights On routine works and all the lights turn on. when i tell alexa âturn off toggleâ the blue circle on the echo swirls but nothing happens and she doesnât say OK and nothing happens.
pressing the switch on/off in smartthings app works like it should though.
it does work when i put the âtoggleâ alexa switch into a group on alexa though! so i made a group called Pickle and say âturn on pickleâ and she says OK and it runs the all lights on routine. and saying turn off pickle runs the all lights off routine fine.
odd why it needs to be in a group to work?
I run into this more and moreâŚseems some of this stuff is running into key word issues with Alexa. Try âAlexa, Toggle offâ
yeah toggle off does the same thing. just blue swirl then she says nothing. also i made another virtual switch called Solar Shades, and made a Blinds group. if the Solar Shades alexa switch is already ON and i say âalexa, turn on Blindsâ she goes âthat command doesnât work with that deviceâ but still runs the ON command ⌠any ideas?
oddly enough this group has the opposite problem. it works fine when i take it out of a group and just control the switch directly. shrug
seems to be working now so iâm happy.
hey michael, iâm using your alexa switch [virtual switch] for a group on echo called All Lights âŚto turn a routine ON [all lights on routine] and OFF [all lights off routine]. i found a bug though: if the switch is off and you tell alexa âturn off all lightsâ she will give an error message and say âthat command doesnât work on this deviceâ but the command still works [which is what i want] âŚbecause lets say i have turned some lights on in those routines from a wall switch or something, then i want to turn them off via alexa, iâll tell her Turn Off All Lights⌠but since the virtual switch is off she gives that error.
any ideas? it works normally if you tell her to turn the switch off and it is ON. or tell her to turn the switch on and it is OFF. then she just goes âOK!â.
Alexa can be finicky with the names of thingsâŚsomethings work one day and sometimes they stop. I am not aware of any feedback from ST to Alexa on the switch state. In fact, I have another routine in the morning that turns on my Sonos directly, and all I say is âAlexa, turn off Sonosâ and it works even though the switch is offâŚI really donât think it goes out and checks the status of the switch, so what you are describing is âstrangeâ.
Are you 100% sure you can reproduce that? You are saying your group âAll Lightsâ is the Alexa Switch or the Echo group. If it is the Echo group this makes even less senseâŚthe Echo group can neither be on or off, so it ignoring its own group would be strange as well.
Can you clarify this, including where you think the âbugâ is (i.e. my app or in the Alexa);?
i think i got it working properly now, i took the alexa switch out of a group (named all lights) on the echo and it seems to be OK now and lets me turn it off twice without giving that error. btw you rock
GreatâŚgood to hear you got it working!
I am getting the following error when trying to create the smart app âpushtype momentary buttonâ
No signature of method: script14618786421441651075380.metadata() is applicable for argument types: (script14618786421441651075380$_run_closure1) values: [script14618786421441651075380$_run_closure1@76e6e64d] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure)
I installed Hue (ReConnect), but Iâm struggling to get scenes built in the Philips Hue mobile app to load into the Hue (ReConnect) SmartApp. Hue (ReConnect) successfully discovers my Hue bridge and Hue bulbs, but does not discover Scenes. Iâve tried toggling the scenes on and off, and Iâve created new scenes, but no luck so far. In the DEVICE events, I see that the following:
displayed false
eventSource DEVICE
isStateChange true
isVirtualHub false
linkText Hue Bridge
name sceneList
rawDescription
translatable false
unixTime 1468866112609
viewed false