Binding Request: Amazon Echo

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.

Is it possible to use one or say several Amazon Echo units in a home as a speaker for TTS announcements from openhab also?

Are we still considering creating an openhab skill for Alexa?

Just what I say here as well :slight_smile:
I would love to see somebody going for this!

Is it possible to use one or say several Amazon Echo units in a home as a speaker for TTS announcements from openhab also?

Unfortunately not, or letā€™s say through some ugly workarounds. See this discussion at SmartThings.

Are we still considering creating an openhab skill for Alexa?

I donā€™t really like the skills that much from a user experience perspective. A deeper integration would be nicer. If someone is willing to spend time on this, I would also volunteer to ask Amazon directly if they donā€™t think that supporting openHAB natively (besides Hue, WeMo and SmartThings) might be a good move :slight_smile:

1 Like

1 vote for ā€œHALā€ (nickname for openHAL, grandfather of HAB)
1 vote for ā€œmateā€ (also answers to matey, understands aye-matey when answering in the affirmative)