SmartThings + Amazon Echo Official Integration

Start and activate are both working on SmartThings Light(dimmable)

I configured one to be just device, and you are right it does not work. I will make some notes on my button code that does work and push it up to github.

So if it’s a dimmable light, you have more voice options?

1 Like

Using “activate” would work so much better for HH phrases and modes. @jodyalbritton, do we have to have Github enabled to see your button code or can it manually be added (the old way)?

I can’t wait to get started setting all of this up.

Thanks,
Scott

Best news I have heard all year long! Thank you ST team for responding quickly to integrate with Alexa.

1 Like

What commands can we send TO Echo?

In terms of your connected home devices, there are just three basic commands you can say to echo: on, off, and dim.

Echo will accept a number of natural language variations of those. So you can say “turn on the hallway,” “turn hallway on,” “Switch on hallway,” etc. but that’s about it.

The only device classes that echo can control are lights, switches, and dimmable lights.

https://www.amazon.com/gp/help/customer/display.html?nodeId=201751280

However, by using virtual switches, you can then get echo control of pretty much anything in the smartthings network because you can tie the virtual switch to a change in mode, or to a hello home action, or to a smartapp.

But The spoken commands to echo are all variations of on, off, and dim.

For more discussion and examples, see:

When you’re using a virtual switch to do stuff via the Echo, you might find this mod handy. Load the On/Off Button Tile Device Type template into the editor, and replace on() and off() with this:

def on() {
    // whatever it is, make it the other
    def flip = ((device.currentValue("switch") == "on") ? "off" : "on")
    sendEvent(name: "switch", value: flip)
}

def off() {
    on() // flipping is the same for both off and on
}

This gives you a virtual toggle. Add a device with this Device Type, give Alexa access to it, and you can tell alexa to “turn on” or “turn off” the virtual switch as often as you want and it will always change state - so any actions you tie to it will fire, as long as you tie the same actions to both “turn on” and “turn off”.

Alexa turn on night mode - would work every night. Without having to “turn off night mode” - for example.

4 Likes

That’s a nice trick. I may switch to that. For now I setup the standard switch action “Turn off after” to one minute.

You guys done good on this one. It just works. I like it!

As I mentioned in another topic, I handle it a little differently–I have each new activity turn off the switches for the other activity, similar to what Harmony does natively.

So when I say “Turn on cable,” it also triggers turning off the Roku and DVD virtual switches.

When I say “Turn on DVD,” it also triggers turning off the DVD and the Cable virtual switches.

And turning off Power also triggers turning off all the device virtual switches.

So each event horizon turns off all the things it isn’t when it turns on the thing it is. :wink:

In the case of Good Night, I would have my good morning activity turn off the good night switch and vice versa.

edited to add there was a harmony change just today, and now it won’t let me end an activity that isn’t already started. Which sounds logical, but means I no longer can create a voice substitute for the “all off” button on the physical remote. Anyone interested in those details can see the harmony topic:

I have a Kwikset lock hooked up to my Smartthings hub. Its the only device that Echo didn’t detect.
I can see why Echo shouldnt unlock a door at voice command, but I guess I’d just like to make sure that it really, officially doesn’t.

It really officially doesn’t, at least at the present time. The only device classes that you can control with Echo are lights, switches, and dimmers.

However, because it’s a SmartThings integration, you can use a virtual switch and then tie a mode change or a hello home action or a smartapp to the virtual switch going on and voila! You can do pretty much anything you can do with smartthings. It’s very cool. So you can certainly set up lock controls that way if you choose to. :sunglasses:

So, if I set up a virtual switch to enter a night time HH action, and have an automatic (timed) HH in the AM, is there any reason to toggle the first action or no?

If the night time switch is a momentary switch, then you only deal with that once at night.

If the nighttime switch is a binary (on/off) switch, then you have to turn it off in the morning or you won’t be able to turn it on the next night.

So that comes down to a matter of style, do you get information from seeing that that nighttime switch is turned on, or are you getting that information from something else like mode.

Got it, makes sense. Thanks!

A few things holding me back:

  • Unless using more than one, no multi-room expansion capabilities (Echo acting as a source for speaker and destination for microphone). You can only interface Bluetooth speakers the other way around. It doesn’t look like it’s going to be possible to stream to a Sonos, just to control it but it lacks a microphone and it’s outrageously expensive anyway
  • API restricted to voice recognition (or appears to be). Sound recognition would be a cheap and easy way to retrofit many appliances into connected devices (sensor for doorbell, ready coffee/laundry/dishwasher, etc.)
  • Cloud based processing
  • Still US only

These days almost all voice processing is cloud-based, including Google Now, Siri, smart TVs, etc. it just requires a massive amounts of processing power to do it right.

My echo covers most of the first floor of the house, about eight rooms. That’s one device. It just doesn’t really compare with the Sonos because it’s not for the same purpose and it’s not engineered in the same way.

The amazing, amazing thing about echo, and I say this as someone who uses a lot of voice technology, is the far field voice recognition. Honestly I’ve never seen anything like it.

Sonos is about the quality of music that you hear. But Echo is about the quality of the voice recognition it can do in a room with a television playing while you’re 30 feet away.

You can leave the Echo’s remote control in another room. It has a microphone in it.

1 Like

The Echo remote is definitely good for some people: My housemate uses his late at night when he wants to use a quieter voice.

However, the problem is that like many smart TV controls, it’s not an “always listening” device – – you have to hold down a button while you use it. So it really changes the whole experience from the hands-free echo.

[quote=“vitamincm, post:36, topic:20902”]
Echo’s remote control in another room. It has a microphone in it.
[/quote] Thanks I wasn’t aware that there was a remote although it appears that only one remote can be paired[quote=“JDRoberts, post:35, topic:20902”]
These days almost all voice processing is cloud-based
[/quote] That doesn’t mean we have to like it. Of course it has to rely on the cloud up to a certain extend. I would simply like to see the voice recognition processing performed locally and rely on the cloud only when it needs to. Right now I feel that the thing it just one big speaker/level triggered microphone pair sold with a lifelong service

[quote=“JDRoberts, post:35, topic:20902”]
It just doesn’t really compare with the Sonos because it’s not for the same purpose and it’s not engineered in the same way[/quote][quote=“JDRoberts, post:35, topic:20902”]
Sonos is about the quality of music that you hear.
[/quote] I was referring to the lack to expansion capabilities of the Echo. As of now it appears that the only way to use another speaker is to hack the hardware.