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

Tags: #<Tag:0x00007f014c326910> #<Tag:0x00007f014c326780> #<Tag:0x00007f014c326618>

(Timmi) #1194

Hi Tobias,

please try this:
AmazonEchoDotWohnzimmer_Speak.sendCommand(“Alarmanlage nach " + Alarmanlage_Switch.state.toString + " geändert”)

You can also use the translate function here.
like this:
transform(“MAP”, “”, Alarmanlage_Switch.state.toString)

Best regards

(Tobus) #1195

Cool that works! Thanks!

(emik) #1196

Hi Michi,

unfortunately I still cannot use this great addon since a couple of days because of this message:

I have tried to replace the URL as stated above but I believe there is an error in the post. I added the hoste name to the URL aswell, but I am always redirected to the “Amazon Account” webpage that links to the login page.
If you have a workround for me I would be very glad!

Many thanks!

(David) #1197

Hello, is it possible to start a skill like camera ?

(Michael Geramb) #1198

No, there exist no API for this from amazon.

(Michael Geramb) #1199

Hi to everybody with login problems in BETA 7,
I have tried to fix the problem with my beta 8 version. But I don’t know if it works for you because I can not reproduce the problem.
If it does not yet work, please save the source of each page in the login process and the url shown in the browser. If the url does not start with the OH installation, please send me the source of the previous page.

If the login works now, please give me feedback too.

Thanks for your support,

(Michael Geramb) #1200

BETA 8 released:

There is no need to upgrade from BETA 7 if it is working for you.
I change a litte bit the code for the proxy for the login and hope it fixes the last problems. The announcment channel is removed, because it does not work and I have no change to check whats going on because the API does not exist in

Best regards,

(nively) #1201

Hi @michi,
Thanks for the support, the version 8 works for me

(Michael) #1202

Hi @michi

Is this the correct download link for the latest beta?

It´s linked in the initial post as Beta (8) but the link says Beta (7).


(emik) #1203

Hi Michi,

the beta 8 is also not working for me.

I have shut down openhab then replaced the new version in the addons directory and restarted openhab. Same problem.

It seems to me that after deleting from the Addons-directory the addon does not get properly deinstalled: The addon is still listed in PaperUI as Binding. Is there a proper way of uninstalling the old version before replacing with the new?
I have the feeling that my installation does not really overwrite the new addon release, instead loading an old version.

What is the best way of finding out which version is installed and running and for uninstalling?

Many thanks for the support!!

(Michael) #1204

You should have a look into the Karaf Console.
With bundle:list you´re able to see which addon is installed and used by openHAB.

(Michael Geramb) #1205

Thank you for your hint, the link is beta 8, I forgot to change the link text.

(Michael Geramb) #1206

You should check out this post:

(Tobus) #1207

Hello Michi,
really great work!!!

At my OpenHab i have some Switch elements, i want to operate via Alexa. But I could not find any Items. Do you have a guide how to do this?

When I go to Smart Home and search, this will be empty.


(Thomas) #1208

Have you tagged your items, eg


Here is an example from alexa openhab doc:

```    Switch Kitchen_Light_A  "Kitchen Light"                   ["Lighting"] {channel="..."}

(Michael Geramb) #1209

Hi Tobus, this is the wrong thread for this. You should search for OpenHAB Alexa Skill

(Scott Karns) #1210

Or (my preferred approach to Alexa control, which does not expose my devices outside my home LAN), search for “hue emulation”:

(Gordon Geist) #1211

Mine as well - if I get some time would love to enhance that binding to expand to HSBColor types and similar.

(Udo Weber) #1212

@michi @david @NCO

I’m having also “out of memory exceptions” since using this binding. All starts with some “UnknownHostException” from the binding, followed by a lot off “OutOfMemoryError” Exceptions.
After that I see that openHab is unable to stop httpClient Threads. Maybe this could be the reason, just guessing?

Greets Udo

Request to url '' fails with unkown error
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at<init>( ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest( ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString( ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString( ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.getDeviceListJson( ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.getDeviceList( ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.updateDeviceList( ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.refreshData( ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.checkData( ~[?:?]
	at java.util.concurrent.Executors$ [?:?]
	at java.util.concurrent.FutureTask.runAndReset( [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301( [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
	at java.util.concurrent.ThreadPoolExecutor$ [?:?]
	at [?:?]

[WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception
java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method) ~[?:?]
	at java.lang.Thread.start( ~[?:?]
	at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication.<init>( ~[?:?]
	at org.openhab.binding.miio.handler.MiIoAbstractHandler.getConnection( ~[?:?]
	at org.openhab.binding.miio.handler.MiIoAbstractHandler.hasConnection( ~[?:?]
	at org.openhab.binding.miio.handler.MiIoBasicHandler.updateData( ~[?:?]
	at org.openhab.binding.miio.handler.MiIoAbstractHandler.lambda$1( ~[?:?]
	at java.util.concurrent.Executors$ ~[?:?]
	at java.util.concurrent.FutureTask.runAndReset( ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301( ~[?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
	at java.util.concurrent.ThreadPoolExecutor$ [?:?]
	at [?:?]

2018-11-30 18:51:58.595 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47439,5,main]
2018-11-30 18:51:58.600 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47561,5,main]
2018-11-30 18:51:58.607 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47511,5,main]
2018-11-30 18:51:58.611 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47578,5,main]
2018-11-30 18:51:58.614 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47579,5,main]
2018-11-30 18:51:58.617 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47512,5,main]
2018-11-30 18:51:58.620 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47468,5,main]
2018-11-30 18:51:58.623 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47562,5,main]
2018-11-30 18:51:58.626 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47469,5,main]
2018-11-30 18:51:58.633 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - HttpClient@5352057{STOPPING,8<=2<=200,i=0,q=4} Couldn't stop Thread[HttpClient@5352057-47560,5,main]

(david) #1213

I tracked down my httpClient thread issue to having both wired and wireless network interfaces active on my Pi. I turned off wireless and the memory issues went away. I would guess the httpclient threads do have issues cleaning themselves up when there are network, or in your case DNS, issues. If I was you, I would track down why you are sometimes unable to resolve solve that and you may solve your memory issues.