Release Candidate and Support: Amazon Echo Control Binding

I’ve been running java 11/32 when i updated to 2.5.7 and ran into the same problem. Switching back to 8/32 solved it. I switched forth to 11 again: problem arised. back to 8: problem vanished. From what i understand this is caused by openhabian-config / java install procedure, someone is working on it and we may get a solution the next days.

1 Like

Thanks! Manually purging all Java/Zulu/OpenJDK and then manually installing Zulu-11 directly from their repository seems to have worked for me (on Debian), and bypassed whatever openHABian configuration script issue is currently botching the install. I’m up and running again! :slight_smile:

1 Like

Thanks a lot! It worked for me too! :+1:

1 Like

The takeaway is:

If you are unable to process the Amazon login during setup of the account thing, i.e. your browser refuses to accept a known good password (and may add a “challenge”), it means the browser you are using for login was set to bypass OTP, i.e. set to “trust this device”.

That is preventing successful login.

Once you re-establish OTP, the login will succeed.

So far, I have not been locked out in OH from after reestablishing the OTP setting.

Thanks a lot! It worked for me, but still no tts on my sonos devices. Only on my dot? it worked up to the beginning of this year. Any possiblity to fix?

I also updated to 2.5.7 today and installed the binding through Paper UI.
Login was successful, but every time talking to my Echo now gives me the following error and LastVoiceCommand is not working (well, perhaps 1 time out of 10):
…and starting my routines also ends in a “too many requests” error again. I think I will finally give up using the binding.
Any suggestions here or is it still being worked on?

2020-07-25 19:32:53.479 [WARN ] [trol.internal.handler.AccountHandler] - handling of websockets fails

org.openhab.binding.amazonechocontrol.internal.HttpException: GET url 'https://alexa.amazon.de/api/activities?startTime=1595698373110&size=10&offset=1' failed: Bad Request

	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:646) ~[bundleFile:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:502) ~[bundleFile:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:497) ~[bundleFile:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.getActivities(Connection.java:1026) ~[bundleFile:?]

	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handlePushActivity(AccountHandler.java:807) ~[bundleFile:?]

	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handleWebsocketCommand(AccountHandler.java:753) ~[bundleFile:?]

	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.webSocketCommandReceived(AccountHandler.java:741) [bundleFile:?]

	at org.openhab.binding.amazonechocontrol.internal.WebSocketConnection$AmazonEchoControlWebSocket.onWebSocketBinary(WebSocketConnection.java:417) [bundleFile:?]

	at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]

	at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryMessage(JettyAnnotatedEventDriver.java:133) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.messageComplete(SimpleBinaryMessage.java:68) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryFrame(JettyAnnotatedEventDriver.java:125) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:145) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:321) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:226) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:262) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:582) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:441) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:428) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]

	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]

	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

Please validate if it is fixed now for you in openHABian.
You need to switch to master branch for your code to become updated.

Looks good here (java 8/32 to 11/32).

I am on 2.5.7 and still getting the “bad request” warning.

2020-08-04 21:05:01.640 [WARN ] [trol.internal.handler.AccountHandler] - handling of websockets fails

org.openhab.binding.amazonechocontrol.internal.HttpException: GET url 'https://alexa.amazon.de/api/activities?startTime=1596575101340&size=10&offset=1' failed: Bad Request

    at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:646) ~[bundleFile:?]

    at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:502) ~[bundleFile:?]

    at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:497) ~[bundleFile:?]

    at org.openhab.binding.amazonechocontrol.internal.Connection.getActivities(Connection.java:1026) ~[bundleFile:?]

    at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handlePushActivity(AccountHandler.java:807) ~[bundleFile:?]

    at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handleWebsocketCommand(AccountHandler.java:753) ~[bundleFile:?]

    at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.webSocketCommandReceived(AccountHandler.java:741) [bundleFile:?]

    at org.openhab.binding.amazonechocontrol.internal.WebSocketConnection$AmazonEchoControlWebSocket.onWebSocketBinary(WebSocketConnection.java:417) [bundleFile:?]

    at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source) ~[?:?]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252]

    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252]

    at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryMessage(JettyAnnotatedEventDriver.java:133) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.messageComplete(SimpleBinaryMessage.java:68) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryFrame(JettyAnnotatedEventDriver.java:125) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:145) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:321) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:226) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:262) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:582) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:441) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:428) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:367) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) [bundleFile:9.4.20.v20190813]

    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) [bundleFile:9.4.20.v20190813]

    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]

Looks like everyone who is getting this error is not on amazon.com (amazon.de in my case). Any ideas what I could try would be great.

NoTechi

1 Like

Hello everyone
maybe someone can help me. I use Openhabian 2.5.7-1 (Release Build).
My Java version is the following.

[17:30:25] openhabian@openHABianPi:~$ java -version
openjdk version “11.0.8” 2020-07-14 LTS
OpenJDK Runtime Environment Zulu11.41+75-CA (build 11.0.8+10-LTS)
OpenJDK Client VM Zulu11.41+75-CA (build 11.0.8+10-LTS, mixed mode)
[17:30:30] openhabian@openHABianPi:~$

I have installed the following Binding.

204 │ Active │ 80 │ 2.5.8.202007261149 │ openHAB Add-ons :: Bundles :: Amazon Echo Control Binding

I defined my thing like that.
Bridge amazonechocontrol:account:account1 “Amazon Account” @ “Accounts”
/{
Thing echo echo1 “Alexa” @ “Arbeitszimmer Michi” [serialNumber=""]
}

When I go to the page http://192.168.xx.xx:xxxx/amazonechocontrol/account1 and enter my data, I always get the message
“There was a problem, Enter a valid email or mobile number”.
My data are correct. I use a 2-factor login on Amazon.
In the Karaf Console, I log the binding in debug mode. I see these entries and some more.

Retry call to_https://api.amazon.com/auth/token
Make request to_https://api.amazon.com/auth/token

I can’t post everything because some data are sensitive.

Can anyone help?

Greetings Michael

I experimented a bit with the Smart Home Device discovery feature in version 2.5.7 and in the entry for the Echo Guard (which is not yet available in this country (Germany)) is a channel for the temperature of the Echo Plus Gen 2, but it only provides integers and no decimal values

Noone can help me?

"Hello everyone
maybe someone can help me. I use Openhabian 2.5.7-1 (Release Build).
My Java version is the following.

[17:30:25] openhabian@openHABianPi:~$ java -version
openjdk version “11.0.8” 2020-07-14 LTS
OpenJDK Runtime Environment Zulu11.41+75-CA (build 11.0.8+10-LTS)
OpenJDK Client VM Zulu11.41+75-CA (build 11.0.8+10-LTS, mixed mode)
[17:30:30] openhabian@openHABianPi:~$

I have installed the following Binding.

204 │ Active │ 80 │ 2.5.8.202007261149 │ openHAB Add-ons :: Bundles :: Amazon Echo Control Binding

I defined my thing like that.
Bridge amazonechocontrol:account:account1 “Amazon Account” @ “Accounts”
/{
Thing echo echo1 “Alexa” @ “Arbeitszimmer Michi” [serialNumber=""]
}

When I go to the page http://192.168.xx.xx:xxxx/amazonechocontrol/account1 and enter my data, I always get the message
“There was a problem, Enter a valid email or mobile number”.
My data are correct. I use a 2-factor login on Amazon.
In the Karaf Console, I log the binding in debug mode. I see these entries and some more.

Retry call to_https://api.amazon.com/auth/token
Make request to_https://api.amazon.com/auth/token

I can’t post everything because some data are sensitive.

Can anyone help?

Greetings Michael"

I’ve had the same problem these days. It turned out that I had loaded an older version of the binding (younger than 2.5.7) and it does not yet use the updated version of the Amazon API’s login procedure.
I have fixed the problem by

  1. switched off the two factor authentication
  2. uninstalled the old binding and updated it to 2.5.7
  3. changed the Thing ID so that the cache and all associated new caches were created internally

after that i could log in normally again and after the login i activated the 2 factor authentication again.

I hope this helps you.

Thank you foe the answer.
Unfortunately, that was not the solution.
Sometimes I get linked to a password reset page by Amazon.
Does anyone have an idea how I can trace this error.

Greetings
Michael

Is anyone here having trouble with the StartRoutine function of the Echo Control Binding failing with a “Too many requests” error?

I posted a new topic about this in the main part of this forum here
but then discovered this thread which is probably more appropriate. Apologies for double posting, but this problem is really frustrating as I can’t figure out if it’s an OpenHAB issue, an Amazon issue, or a bit of both.

Keen to hear if anyone else has encountered this, and better still worked out how to fix it. My system used to work perfectly.

Cheers,
Pete.

Sent a reply to your other post. Also wanted to mention that you may want to touch the files that contain your Items/Things and see if that helps.

Hi
I have the same issue in my side.
I’m blocked too… if you find a solution …
Best regards
MacLeod

I receive
Fatal error: Call to undefined function apc_fetch() in /usr/share/php/Cake/Cache/Engine/ApcEngine.php on line 91

when I call the binding using this action in a rule

Echo_Living_Room_TTS.sendCommand(‘Hello World’)

I am running PHP 7.0.33-0+deb9u8 on openHAB 2.5.6~S137-1 (Build #137)

A google search on the issue says to update to PHP 7 but I am already running that.

Any idesa?

Got it. I ran these commands:
apt-get install php-dev php-pear
apt-get install php-apcu
and it’s running now.

I am having the amazon sign in problem. I am using Amazon Echo Control Binding 2.5.6. I would like to update to 2.5.7 but I do not know where to find the related jar file. Could any one give me a link to it?