SmartThings Community

Alexa commands to Smartthings

(Jack) #1

Hi,

I wanted to know how I can change the code from saying “Alexa, turn on/off the device” to "Alexa, open/close the device? I’ve tried every possibility I could with the below code, but no change seems to work on the Amazon Echo. How can I do this? (I am using the ZigBee Switch template)

multiAttributeTile(name:"switch", type: "lighting", width: 6, height: 4, canChangeIcon: true){
            tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
                attributeState "on", label:'OPEN', action:"switch.off", icon:"st.Home.home9", backgroundColor:"#00A0DC", nextState:"off"
                attributeState "off", label:'CLOSE', action:"switch.on", icon:"st.Home.home9", backgroundColor:"#ffffff", nextState:"on"
0 Likes

(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

They keywords are programmed on the Amazon side of the cloud. There is nothing that can be done on the SmartThings side to change the words to “open/close” vs “on/off”; … it definitely does not “read” your Tile Labels!

  • There is a very very slight chance that if you change the Device Type (Capability) to a “door”, then it might accept open/closed … but I doubt it.
1 Like

(Jason "The Enabler" as deemed so by @Smart) #3

You have to use a custom skill.

Take a look at this smartapp, EchoSistant, it allows you to say open and close instead of on and off.

2 Likes

(Jack) #4

It seems that Alexa is able to accept to commands open/close as posted by “nelemansc” in the forum Echo Naming Quirks. Is this true or false as of today? Also what is the complete list of commands that Alexa is able to accept from Smartthings?

0 Likes

(Micheal ) #5

I think the term ‘sometimes’ or ‘used to’ comes into play…With the native integration I HAVE gotten it (in the past) to recognize open/close…but it was not consistent.

0 Likes

(Jack) #6

How did you get Alexa to recognize open/close commands?

0 Likes

(Micheal ) #7

I said them :slight_smile:

There was no trick…it simply recognized them at one time…I use my own skill (which recognizes ALL of the required commands), so I don’t know if this still works…

0 Likes

(Jack) #8

Do you mind sharing your skill please?

0 Likes

(Micheal ) #9

I am not sure where you are, but this is going to be a good couple hours of your life. But, well worth it when you are able to give some real commands to your home!

http://thingsthataresmart.wiki/index.php?title=Ask_Alexa

Be sure to utilize this thread: [RELEASE] Ask Alexa

Or this one:

when installing these…I am around if you need assistance…it has literally thousands of installs, so you CAN get through it…

2 Likes

(Tyler Durden) #10

It still works for me… I just recently asked Alexa to open\close the garage. I’m not sure if it matters what you name the device…some names may work better than others. Perhaps it also matters what type of ST device you are controlling.

1 Like

(Jack) #11

Your skill works great, but do you mind showing me how I can simply make all the code much shorter so that it only takes care of “open, close” commands for a windowShade device only? I am still confused about all the code from Ask Alexa. I’d really appreciate your help.

0 Likes

(Micheal ) #12

At this time, only open and closed should work on Window Shade…Can you be more specific on what you are seeing when you attempt to do this?

0 Likes

(Jack) #13

I am trying to build off of your Ask Alexa, but want to get rid of all the code that aren’t related to open/close commands for a window shade.

0 Likes

(Micheal ) #14

I guess I am curious what the purpose would be. Just to learn programming? In other words, just a skill to open or close the shades? I can show you how to do this with no skill if you’d like…you just need an app like WebCore.

Let me know your ultimate goal. Stripping out code will be difficult as there are a lot of shared methods within the app. Better to write a whole new one, quite honestly. Or, like I said, not even use my app and a simple virtual switch and WebCore.

0 Likes

(Jack) #15

My goal is ultimately to get this working, but also learn programming at the same time. I suppose I could start a whole new as one you suggested, following your app and not WebCore. Are you able to help me out on this project? I’d very much appreciate that.

0 Likes

(Micheal ) #16

I can certainly help…but I am still curious…Ask Alexa DOES allow for opening and closing shades already. Not sure what modifications would be needed.

0 Likes

(Jack) #17

I know that Ask Alexa already has these capabilities, but I just want only want the capabilities of opening and closing shades. So how do I start?

0 Likes

(Micheal ) #18

Jack,

Let’s take this to PM as the conversation has the potential to get very long.

0 Likes