Release Candidate and Support: Amazon Echo Control Binding

Yeah, sure. But then I would need to be sure to understand all underlying mechanisms. I am no programmer, so a comment on the concept would definitely help me.

Something between “Look in the code!” and “Believe me, this is trustworthy!” would be greatly appreciated.

you had a smile behind your question - ok - so one may not have to take it literal.
Doing that J-N-K’s answer is the correct one.
And even that could not be enough: the delivered jar files could be based on other code.
That would mean the only thing you could do is to check the network traffic.
And at that time it already could be too late as the password is sent once you logged the traffic.

So it’s a mater of trust, isn’t it ?

EDIT:
the related code seems to be in openhab-addons/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/AccountServlet.java at main · openhab/openhab-addons · GitHub

@Wolfgang_S pointed to the correct location. What you see is Amazon‘s Login Form. It‘s just proxied, so we can get the cookies necessary to emulate the Alexa App.

Indeed, and it is not meant personally at all. I mean, it’s like giving the PIN of your credit card to someone: It never feels really good.

@J-N-K , please apologise in case this felt like a personal offend…

1 Like

Sorry if this has been answered, but I’m still getting DateTimeParse errors in the log for the amazon echo control binding. Looking through the thread it seems like it was brought up in the past, but I couldnt find a definitive solution for it. I’m still on openhab 2.5.3 but using the 2.5.11 version of the binding. Here is the log excerpt:

==> /var/log/openhab2/openhab.log <==

2021-01-19 21:28:59.030 [ERROR] [trol.internal.handler.AccountHandler] - refresh data fails with unexpected error

java.time.format.DateTimeParseException: Text '2021-01-20Tnull-08:00' could not be parsed at index 11

at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949) ~[?:1.8.0_222]

at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851) ~[?:1.8.0_222]

at java.time.ZonedDateTime.parse(ZonedDateTime.java:597) ~[?:1.8.0_222]

at java.time.ZonedDateTime.parse(ZonedDateTime.java:582) ~[?:1.8.0_222]

at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.updateNotifications(EchoHandler.java:1283) ~[?:?]

at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$4(AccountHandler.java:489) ~[?:?]

at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) ~[?:1.8.0_222]

at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:404) ~[?:1.8.0_222]

at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.refreshNotifications(AccountHandler.java:488) ~[?:?]

at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.refreshData(AccountHandler.java:585) ~[?:?]

at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.refreshAfterCommand(AccountHandler.java:830) ~[?:?]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_222]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]

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

Any help is appreciated.

Thanks,

Jerry

hello , since few days all Things have changed their ID and things a very frequently going offline.
Am I alone in this ?
The issue is the same treated in this discussion:
https://community.openhab.org/t/amazon-amazonechocontrol-smarthomedevice-things-in-unknown-state/110156/8

I seem to be having a similar error too, on OpenHab 2.5.12 and that version of the Amazon Echo Control Binding. Have you figured out a solution to the issue? It seemed to have started maybe two weeks ago, but I haven’t made any recent changes to my OpenHab configuration. Actually, I was on 2.5.9 for a while, then upgraded to 2.5.12 today to see if it would fix the issue, but no luck.

13:20:57.929 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@2c6275’: GET url ‘https://alexa.amazon.com/api/behaviors/automations?limit=2000’ failed: Not Found
org.openhab.binding.amazonechocontrol.internal.HttpException: GET url ‘https://alexa.amazon.com/api/behaviors/automations?limit=2000’ failed: Not Found
at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:691) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:555) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:550) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.Connection.getRoutines(Connection.java:1840) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.Connection.startRoutine(Connection.java:1770) ~[?:?]
at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.handleCommand(EchoHandler.java:640) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
at com.sun.proxy.$Proxy164.handleCommand(Unknown Source) [?:?]
at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]
at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_251]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_251]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_251]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_251]
at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_251]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_251]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_251]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251]

You have a different issue that is already fixed.

Yes, I think it’s a different issue. I manually updated to the 2.5.13 echo control and it seems to be working now.

I’m getting the same error as @jlekhter with the DateTimeParseException

I’m using openHAB 2.5.7, and this continues with the 2.5.13 Binding that I’ve just updated to (which seems to have fixed the routines issue! :slight_smile:)

But I must say a huge thank you for writing this Binding, it’s become a core part of my home automation!

I‘ll check the other error.

1 Like

Can you please tell me from what version that stacktrace is? Otherwise it‘s a bit difficult to find it.

Thank you @J-N-K

Im on 2,.5.12 snapshot of the binding now but 2,5.3 version on OpenHAB.

Is there another module version that might be helpful?

Thanks again,

Jerry

[amazonechocontrol] fix missing time (backport from 3.0) by J-N-K · Pull Request #10009 · openhab/openhab-addons (github.com)

Last fix for 2.5.x from me.

Hi Jan where can we download the latest for 2.4 or 2.5?

Thank you! This fix was requested by the original developer of the binding @michi

Here’s the direct down JAR URL → https://janessa.me/esh/org.openhab.binding.amazonechocontrol-2.5.13-SNAPSHOT.jar

@Kai

The actual 2.5.x build process on the Echo binding for bug fixes has been broken and nobody is addressing it so we have to go to 3rd party URL to get the fix now.

[amazonechocontrol] fix routines (backport) by J-N-K · Pull Request #9983 · openhab/openhab-addons (github.com)

PR-openHAB-Addons #2437 [Jenkins]

[amazonechocontrol] fix missing time (backport from 3.0) by J-N-K · Pull Request #10009 · openhab/openhab-addons (github.com)

PR-openHAB-Addons #2512 [Jenkins]

Best, Jay

Thanks jwiseman, I take it no one ever fixed the websockets fail errors :frowning:

15:16:12.909 [WARN ] [ntrol.internal.handler.AccountHandler] - handling of websockets fails
org.openhab.binding.amazonechocontrol.internal.HttpException: GET url ‘https://alexa.amazon.com.au/api/activities?startTime=1612239360623&size=10&offset=1’ failed: Bad Request
at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:691) ~[272:org.openhab.binding.amazonechocontrol:2.5.13.202101281939]
at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:555) ~[272:org.openhab.binding.amazonechocontrol:2.5.13.202101281939]
at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:550) ~[272:org.openhab.binding.amazonechocontrol:2.5.13.202101281939]
at org.openhab.binding.amazonechocontrol.internal.Connection.getActivities(Connection.java:1099) ~[272:org.openhab.binding.amazonechocontrol:2.5.13.202101281939]
at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handlePushActivity(AccountHandler.java:816) ~[272:org.openhab.binding.amazonechocontrol:2.5.13.202101281939]
at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handleWebsocketCommand(AccountHandler.java:760) ~[272:org.openhab.binding.amazonechocontrol:2.5.13.202101281939]
at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.webSocketCommandReceived(AccountHandler.java:747) [272:org.openhab.binding.amazonechocontrol:2.5.13.202101281939]
at org.openhab.binding.amazonechocontrol.internal.WebSocketConnection$AmazonEchoControlWebSocket.onWebSocketBinary(WebSocketConnection.java:415) [272:org.openhab.binding.amazonechocontrol:2.5.13.202101281939]
at sun.reflect.GeneratedMethodAccessor1997.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:71) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryMessage(JettyAnnotatedEventDriver.java:124) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.messageComplete(SimpleBinaryMessage.java:68) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:66) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryFrame(JettyAnnotatedEventDriver.java:116) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:157) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:476) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:220) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:220) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.Parser.parse(Parser.java:245) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:560) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:391) [92:org.eclipse.jetty.websocket.common:9.4.11.v20180605]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)

@jwiseman would you happen to know where I could get the latest nightly build for this binding?

I’m looking for the fix right after the one completed by @J-N-K

Thanks,

Jerry

It doesn’t exist, the 2.5.x build process is broken. I asked @Kai about it w/o a response yet.

I agree its frustrating.

Sorry, Jay

ok thanks – I broke down and installed everything I needed to compile the binding. I now have the latest copy of this binding in my environment. It seems like its working as expected and the issue I had with parsing DateTime is now fixed.

If anyone needs the binding, let me know where to put it and I’m happy to send it to you.

Thank you,
Jerry