Binding Request: Amazon Echo

I know several trekkies" have been pushing for “computer” as a trigger name on the Amazon forums :smile: That would always be neat… I think any word that is not very common (such as “Alexa”) must help prevent unintentional triggers although as a skill perhaps this does not matter. It would be fantastic to get it set up natively with alexa as a skill opening up additional possibilities. Just with the limited functionality through the hue emulator has already proven this a viable and “real deal” voice recognition system.

I’m currently using the echobridge successfully to arm the security system through the DSC Binding, and through recent improvements to that I am also able to enable/disable the chime feature and open the garage door through its output.

I also have a switch item set up to run a rule for changing the thermostats when leaving for
the day, lights also of course. Switches work very fast, sometimes before she’s said “OK”

Having the echobridge as a binding would be great, wish I knew how to code java well as I would jump on it.

That’s funny @ubergeek , the very first thing I did when I got my echo was
put in a request to change the wake work from Alex to computer. I am also
using the echo bridge project to control about a half dozen lights, my
sonos equipment and my pool. The official api requires a application wake
work ( tell openhab to …) which is not as convent as just saying Alexa,
turn kitchen lights on. I now own three echos! Good voice recognition is a
game changer.

1 Like

@digitaldan knows how to code java :slight_smile: Didn’t you think yet about creating a real bundle for it, so that no additional bridge needs to be set up? As I will get my Echo tomorrow, I am now myself very interested in it and thus will have all possibilities for review and testing!

I think you could take each clause as a group name and constrain the set of items returned to only those belonging to all named groups. The example “(main lights) in (guest room) on (second floor)” means the items returned would have to belong to all three groups, main_lights, guest_room and second_floor, no hierarchy needed.

Gee, thanks @Kai :wink: My openhab project list is busting at the seems, I admit I need to set aside some time and start coding again. The echo bridge idea is interesting for more than just the echo, in essence it’s simply a philips hue emulator, since many things now support directly talking to a hue device ( logitech remotes, the echo, ect…), this could be a way to integrate other systems that do not have a convenient API.

I actually just had a look at the code of the HA bridge - it is heavily dependent on Spring (I always thought the original idea of Spring was to not have any dependencies within the code itself to it…), so hardly any of it could be used within an openHAB bundle. It would rather be a rewrite, using JAX-RS. I think if we want to go this way, it would make sense to do it directly for openHAB 2, since items could be nicely tagged to be exposed to the Echo.

Has anyone looked at the fauxmo binding to emulate WeMo switches for the echo? Wondering if a WeMo emulater would be better/worse/same as the echo HA bridge.

http://www.makermusings.com/2015/07/18/virtual-wemo-code-for-amazon-echo/

GitHub - makermusings/fauxmo: Emulated Belkin WeMo devices that work with the Amazon Echo

Just received my echo yesterday so haven’t hooked it with OpenHab yet other than an IFTTT trigger.

I also have my Echo since 2 weeks now and successfully hooked it up to openHAB through the hue-echo-bridge.
I just checked the code for the WeMo emulation, but this doesn’t seem to be any better. It is still only on/off commands (while with hue you can at least also dim) and you need to have an incoming socket per device that you want to emulate. That is better with hue, since you only have to emulate the bridge itself.

I am not sure if I will soon (ever?) find time to do an implementation for openHAB 2, although I would love to have it. So if there is anybody else with fewer time constraints, please let me know and I’ll be happy to support where I can!

I’m using IFTTT with the Echo to make openHAB do things like “Open the Front Gate” etc… It does annoyingly say “Sending that to IFTTT” after I say my command but at least it works…

I’d like to see them open up the inbound stuff so we can use the Echo as a TTS speaker for announcing things like “You’ve left the garage door open”… Here’s hoping they enable that one day.

1 Like

+2 for this or some type of local TTS implementation through the API if possible…holding my breath

1 Like

I stumbled upon this hack to get the Echo to speak out… A pretty clever hack actually and could be used as a round about way to get the Echo to speak out OpenHAB notifications…

Skip past the intro to see how it actually works.

Hm, well, I would very much prefer a pure software solution instead of attaching arduinos to the mic of the remote control… But it is a start :wink:

Hi Guys,
Do you know if Echo supports other languages, than just english?

It’s not officially supported outside of the US so I’d say English only… My Echo thinks that it is in Seatle USA, there is no way to change it’s “home” address to one outside of the US…

Mine is there as well, maybe they should meet :wink:
Yeah, it is annoying that it only works for US zip codes - and I didn’t find any working one that is at least in a European time zone (although the US has overseas zip codes as well)…

Has anyone tried to get it to work with OH2 with the POST Rest API?

Trying to post this to the bridge server to set up a switch at /api/devices gives a 400. I am using ContentType: application/json

{
"httpVerb" : "POST",
"name" : "office light",
"deviceType" : "switch",
"onUrl" : "http://<OpenHAB2 server>:8080/rest/items/OfficeLight",
"contentBody" : "ON"
}

I am using the latest set of commits to the bridge project where it is supposed to support POST. See the bottom of the Readme here: README.md

I figured this was related enough to ask here, but if OH2 area of the forum is better, just say the word and I will move it.

Hi
I am using my Amzon Echo with IFTTT, and so far this works superb. Once in a while it takes 1 minute before commands gets executed, but in general there is only a 2s delay.

Whats the benefit of going Rest API as you suggest?

The only disadvantage I have discovered so far or features missing are to get it to read out item values and change songs on spotify.

And eventually it will come with European timezone., Change it to Hawaii and you are 12 h off am/pm swapped though

The response to the commands should be nearly immediate instead of going out to the cloud. Also, fewer points of failure.

That is the theory anyway.

Let me know if I somehow can help, The setup from IFTTT were super easy, but maybe we can create a binding thats also easy to use.

After digging in to the bridge a bit, I think this would be the best way to go. The bridge uses Spring which is overkill in a big way for what this application needs to do. It also seems to use elastic search to store mappings. It feels like an enterprise app that was re-purposed to be a bridge, not a simple easy proxy for the Echo. It also does not seem to support POST correctly. Even when a URL was defined and uploaded to the REST interface, it tries to do a GET with the word POST in it.

If anyone has this working with OH2, please chime in.

Writing a new addon for OH2 would give us a native UPnP listener right in OpenHAB that Alexa can discover. We need to figure out how best to manage the proxy mappings and create the UPnP entries appropriate for the Echo.