Amazon Echo Control Error "Web socket close 1005" - Still happening on 3.2.0

Thank you! Solved the issue for me.

More discussion here

I rebuild the container and now it seems to work. fingers crossed

btw: great work and thanks

Thanks for posting the updated binding, Jay! And thanks, Mark, for the link to the other thread. I ended up installing the new binding by adding the json third-party addon file in the settings, and using the UI to install it like any other binding (after first removing the one that ships with 3.2, of course.)

Everything is working smoothly now. No more websocket errors.

Are the updates in this binding set to be added to the next official release?

Looks like this might solve two problems in one go (web socket 1005 and delayed response to commands). However, I can’t log in. I get: Login to 'amazon.com' failed: Request failed.

My account is registered with amazon.co.uk but I’m not convinced that is the problem because it recognises me enough to ask for my OTP, it just fails after that. If I disable 2FA, it fails right after the password screen.

Why is the smarthome/j version not merged into the main openhab? Why keeping a separate repo/version?

There are different views on technical and administrative/organizational aspects.

1 Like

Same thing here, however, I’m registered with amazon.ca

I’ve got mine working. Reinstall the version that can log in, get logged in and then install the latest - it remembers that you are logged on.

3.2.10 also fixed the login.

Great. I was waiting over the weekend so used the workaround with 3.2.9.

Where can I get this build (3.2.10)?

If you’re on openHAB 3.2.0 or later, you can add “https://download.smarthomej.org/addons.json” in the “JSON 3rd Party Addon Service” section in the settings page of the UI.
Once that is saved, go to the bindings page and you’ll see a new section with the 3rd Party Addons. You’re looking for the SmartHome/J variant of the Amazon Echo Control Binding.
Be sure to uninstall the regular one before you install this one!

1 Like

Nice. I was able to install it but can’t sign in to amazon. I got this error

HTTP ERROR 500 java.lang.NullPointerException
URI:	/amazonechocontrol/adef560844/ap/signin
STATUS:	500
MESSAGE:	java.lang.NullPointerException
SERVLET:	org.ops4j.pax.web.service.spi.model.ServletModel-47
CAUSED BY:	java.lang.NullPointerException
Caused by:
java.lang.NullPointerException
	at org.smarthomej.binding.amazonechocontrol.internal.smarthome.HandlerColorController.getStateDescription(HandlerColorController.java:169)
	at org.smarthomej.binding.amazonechocontrol.internal.handler.SmartHomeDeviceHandler.setDeviceAndUpdateThingState(SmartHomeDeviceHandler.java:146)
	at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$19(AccountHandler.java:862)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeDeviceList(AccountHandler.java:862)
	at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.setConnection(AccountHandler.java:425)
	at org.smarthomej.binding.amazonechocontrol.internal.AccountServlet.handleProxyRequest(AccountServlet.java:639)
	at org.smarthomej.binding.amazonechocontrol.internal.AccountServlet.doVerb(AccountServlet.java:233)
	at org.smarthomej.binding.amazonechocontrol.internal.AccountServlet.doPost(AccountServlet.java:128)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:294)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:82)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
	at org.eclipse.jetty.server.Server.handle(Server.java:516)
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
	at java.base/java.lang.Thread.run(Thread.java:829)
Powered by Jetty:// 9.4.43.v20210629

Maybe I need Samrthome/J Commons? If so, I can’t get it via openhab third party addons.

It’s automatically installed. That is a very strange error. Can you please restart openHAB and check that you only have one binding installed? On the karaf console: list -s | grep -i amazonechocontrol should only list one bundle.

Thank you! I was not aware this even existed.

I’m curious what @J-N-K improved on these? I do have 3 bindings that bounce offline/online (HUE, Onkyo & HP Printer), wonder if HTTP binding below would fix that?

  • Mail
  • HTTP

Best, Jay

No, each binding is responsible on its own for thing status.


3,2,10 is the only one installed. I did a restart and still have the same error. I use OTP on amazon.ca

The thing amazon account shows

Status: OFFLINE

CONFIGURATION_PENDING

Wait for login

But all echo devices shows online and are working. eveything looks good in openhab:8080/amazonechocontrol but if I logout and login, this is where the error occurs.

In the console log there is these errors

20:30:57.685 [ERROR] [ntrol.internal.handler.AccountHandler] - check login fails with unexpected error
java.lang.NullPointerException: null
        at org.smarthomej.binding.amazonechocontrol.internal.smarthome.HandlerColorController.getStateDescription(HandlerColorController.java:169) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.SmartHomeDeviceHandler.setDeviceAndUpdateThingState(SmartHomeDeviceHandler.java:146) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$19(AccountHandler.java:862) ~[?:?]
        at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807) ~[?:?]
        at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeDeviceList(AccountHandler.java:862) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.setConnection(AccountHandler.java:425) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.checkLogin(AccountHandler.java:393) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
20:30:59.805 [ERROR] [ntrol.internal.handler.AccountHandler] - refresh data fails with unexpected error
java.lang.NullPointerException: null
        at org.smarthomej.binding.amazonechocontrol.internal.smarthome.HandlerColorController.getStateDescription(HandlerColorController.java:169) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.SmartHomeDeviceHandler.setDeviceAndUpdateThingState(SmartHomeDeviceHandler.java:146) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$19(AccountHandler.java:862) ~[?:?]
        at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807) ~[?:?]
        at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeDeviceList(AccountHandler.java:862) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.refreshData(AccountHandler.java:522) ~[?:?]
        at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.checkData(AccountHandler.java:472) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]

Can you try disabling the SmartHome device(s) that use a color channel?