Released: Openhab2 Amazon Echo Control Binding (controlling alexa from openhab2)

Tags: #<Tag:0x00007f014b44f090> #<Tag:0x00007f014b44ecf8> #<Tag:0x00007f014b44e4d8>

(Oliver) #1376

Hello michi,
do you now if there is a way to access the alexa alarm clock events? I would like to fire some actions when my alarm clock(echospot) is ringing…make coffee, start hue sunrise etc…
At the moment I’m looking for Echos Player changes when my Presence Mode is set to sleep,
but this not a very elegant way.


(Michael Geramb) #1377

Currently only with an REST call through the binding proxy.
The url must be build depending on your installation.


e.g. assuming the OH is running on localhost:8080 and the Amazon Account think have the Id “account1”:


This call will return a json. It should be possible to use this in a rule.

But I’am thinking already about a new channel to provide the next alarm, timer and reminder. But there is not yet a timeframe for this.


(Andrew Pawelski) #1378

Is there any plans to control items directly, not via routines? I would like to control a thing that has on and off as an option in the app but is a thermostat thing. When setting up a routine it only allows me to change the temp of the thing which doesn’t actually work and no on or off option. I’m talking to the developers to see if they can fix but if I could control the thing direct it would prevent a bunch of one step routines (and fix my problem and not rely on the vendor)

(Michael Geramb) #1379

Not from my side, because I have no devices which are only controlled from alexa.

(Thomas) #1380

Good afternoon,
I’m using Version 2.5.0, but for some reasons the “Off” command for turning the Alexa Radio “off”
seems not to work. I’m getting the following errors:

2019-01-05 16:31:33.871 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@176147c': POST url '' failed: Not Found
org.openhab.binding.amazonechocontrol.internal.HttpException: POST url '' failed: Not Found
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest( [237:org.openhab.binding.amazonechocontrol:2.5.0.Beta_01]
	at org.openhab.binding.amazonechocontrol.internal.Connection.command( [237:org.openhab.binding.amazonechocontrol:2.5.0.Beta_01]
	at org.openhab.binding.amazonechocontrol.internal.Connection.playRadio( [237:org.openhab.binding.amazonechocontrol:2.5.0.Beta_01]
	at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.handleCommand( [237:org.openhab.binding.amazonechocontrol:2.5.0.Beta_01]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke( ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:?]
	at java.lang.reflect.Method.invoke( ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect( [101:org.eclipse.smarthome.core:0.10.0.oh230]
	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke( [101:org.eclipse.smarthome.core:0.10.0.oh230]
	at com.sun.proxy.$Proxy166.handleCommand(Unknown Source) [237:org.openhab.binding.amazonechocontrol:2.5.0.Beta_01]
	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand( [108:org.eclipse.smarthome.core.thing:0.10.0.oh230]
	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem( [108:org.eclipse.smarthome.core.thing:0.10.0.oh230]
	at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:?]
	at java.lang.reflect.Method.invoke( ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect( [101:org.eclipse.smarthome.core:0.10.0.oh230]
	at [101:org.eclipse.smarthome.core:0.10.0.oh230]
	at [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
	at java.util.concurrent.ThreadPoolExecutor$ [?:?]
	at [?:?]

I’m using the following code:


Switch AlexaEcho_Radio "TuneIn Radio"   {channel="amazonechocontrol:echo:account:echo1:radio"}

Other functions like Text to Speech work fine.
Has anyone any ideas?
Many thanks!

(Mar Li) #1381

Question: if I understand it right then that binding is not able to tts a value from an openhab item, isnt it?

(CM6.5 H102) #1382

What value are you wanting? Take a look at the lastVoiceCommand feature and tagging.

(Mar Li) #1383

one case I want to use is to tts my temperature items. dont think that lastVoiceCommand helps for that, or I dont understand what the feature does / work.

what I tried to is:

rule "Read Temperature Living Room"
   Item TestSwitch changed from OFF to ON 
    var moep = TemperatureItem1.state

but seems that the item object doesnt work with that tts feature :confused: a normal string does work.

(G) #1384

Try this:

EchoDotLR.sendCommand("" + TemperatureItem1.state)

(CM6.5 H102) #1385

Change the var to a string.:wink: or just use the [ “Temperature” ] tag on your item.

(Mar Li) #1386

oh you are right. .toString solved it. thx a lot! [“Temperature”] Tag I will also try

edit: maybe one more question: is there a way to tts room temperature on keyword “alexa, what is my living room temperature” ? and what could be best code design for it?

(CM6.5 H102) #1387

Temperature may be the wrong tag,:roll_eyes: I think it’s [ “Thermostat” ] but honestly I don’t use it but here’s a link to test your tags.

(CM6.5 H102) #1388

I do believe that’s where the lastVoiceCommand comes into play. If you look up a few hundred post,:laughing: there are several examples.

EDIT: see post 1328

(CM6.5 H102) #1389

@DubZ if you do a forum search using “lastVoiceCommand” as keyword you’ll see about 7 or 8 post, not including this one, with info and examples. Guess I could simply post the link to the search.:smile:

Here’s one of the results from the search.


(Mar Li) #1390

Thx a lot for helping to search!

Is there any way that alexa doesnt always say (for example) “living room is not supported” (its translated by me from german :P)?

edit: mhh since I installed this binding my hue emulation seems to not working anymore.
edit2: after rediscover in alexa app it works again

(Nicolas) #1391

Hello, everybody,
I have installed the Amazon Binding.
However, I always get this error message in the openhab.log:

2019-01-05 19:37:20.573 [INFO ] [mazonechocontrol.internal.Connection] - Login failed: POST url ‘’ failed: Not Found

My password contains an @. Could this be the problem?

If I try it over this link http://192.168.XXX.XXX:8080/amazonechocontrol/
then I always get this as an answer:


(Thomas) #1392

Have you installed the latest version of the binding? See first post.

(CM6.5 H102) #1393

What version of OH are you running? What binding version have you tried to install?

More info = more help.:wink: or should I say more better help.:rofl:

(Nicolas) #1394

I just installed the binding over Paper UI tonight. So it’s version 2.3.0.

I installed openHab on my Synology.
Version is the from here

(Thomas) #1395

This version is too old, you have to use the latest Beta Version (see first post).