# Web Socket Error on AmazonEchoControl binding every 65 seconds

**URL:** <https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581>\
**Category:** Bindings\
**Tags:** amazonechocontrol\
**Created:** [June 12, 2020, 7:46pm UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581 "2020-06-12T19:46:16Z")\
**Posts on this page:** 20\
**Page:** 11

<div class="post-metadata">

**Author:** ![dastrix80](https://community.openhab.org/user_avatar/community.openhab.org/dastrix80/32/20582_2.png) [@dastrix80](https://community.openhab.org/u/dastrix80)\
**Post date:** [June 15, 2020, 11:48pm UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/203 "2020-06-15T23:48:34Z")

</div>

Uninstalled the old binding, put the new fix binding in, cleared cache and rebooted. Same issue

---

<div class="post-metadata">

**Author:** ![charcharwon](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@charcharwon](https://community.openhab.org/u/charcharwon)\
**Post date:** [June 15, 2020, 11:55pm UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/204 "2020-06-15T23:55:33Z")

</div>

mine has been up 42 minutes and no more websocket error which i had every minute in the log.  
cleaned tmp folder also?

---

<div class="post-metadata">

**Author:** ![dastrix80](https://community.openhab.org/user_avatar/community.openhab.org/dastrix80/32/20582_2.png) [@dastrix80](https://community.openhab.org/u/dastrix80)\
**Post date:** [June 15, 2020, 11:56pm UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/205 "2020-06-15T23:56:33Z")

</div>

Certainly did!

sudo /etc/init.d/openhab2 stop  
sudo rm -rf /var/lib/openhab2/cache/\*  
sudo rm -rf /var/lib/openhab2/tmp/\*  
sudo /etc/init.d/openhab2 start

---

<div class="post-metadata">

**Author:** ![charcharwon](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@charcharwon](https://community.openhab.org/u/charcharwon)\
**Post date:** [June 16, 2020, 12:02am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/206 "2020-06-16T00:02:22Z")

</div>

I see, the only things i did to fix this websocket error.

I removed the binding through Paper UI.  
I’m running openhabian 2.5 headless so i just VNC into my pi3 b+ and manually cleaned the folder tmp and cache and dropped the jar in the addon folder and starting and stopping openhab in the terminal.

---

<div class="post-metadata">

**Author:** ![dastrix80](https://community.openhab.org/user_avatar/community.openhab.org/dastrix80/32/20582_2.png) [@dastrix80](https://community.openhab.org/u/dastrix80)\
**Post date:** [June 16, 2020, 12:03am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/207 "2020-06-16T00:03:12Z")

</div>

Fair enough, im using 2.4.0 but I doubt its different!

---

<div class="post-metadata">

**Author:** ![richaardvark](https://community.openhab.org/user_avatar/community.openhab.org/richaardvark/32/73659_2.png) [@richaardvark](https://community.openhab.org/u/richaardvark)\
**Post date:** [June 16, 2020, 12:29am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/208 "2020-06-16T00:29:14Z")

</div>

I’m running the latest fix version from today - 2.5.6-fix-leaks-fix-connection.jar - provided above. I cleaned my cache, restarted openHAB and my system several times and I am still seeing some sort of Web Socket Error, though it is not every 65 seconds but much less frequent:

```
2020-06-15 19:07:03.547 [WARN] [trol.internal.handler.AccountHandler] - handling of websockets fails │
20│org.openhab.binding.amazonechocontrol.internal.HttpException: GET url 'https://alexa.amazon.com/api/activities?startTime=1592266023415&size=10&offset=1' failed: Bad Request │
20│ at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:644) ~[bundleFile:?] │
20│ at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:499) ~[bundleFile:?] │
20│ at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:494) ~[bundleFile:?] │
20│ at org.openhab.binding.amazonechocontrol.internal.Connection.getActivities(Connection.java:938) ~[bundleFile:?] │
20│ at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handlePushActivity(AccountHandler.java:773) ~[bundleFile:?] │
20│ at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.handleWebsocketCommand(AccountHandler.java:718) ~[bundleFile:?] │
20│ at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.webSocketCommandReceived(AccountHandler.java:706) [bundleFile:?] │
20│ at org.openhab.binding.amazonechocontrol.internal.WebSocketConnection$AmazonEchoControlWebSocket.onWebSocketBinary(WebSocketConnection.java:417) [bundleFile:?] │
20│ at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source) ~[?:?] │
20│ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_252] │
20│ at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_252] │
20│ at org.eclipse.jetty.websocket.common.events.annotated.CallableMethod.call(CallableMethod.java:70) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.events.annotated.OptionalSessionCallableMethod.call(OptionalSessionCallableMethod.java:72) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryMessage(JettyAnnotatedEventDriver.java:133) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.message.SimpleBinaryMessage.messageComplete(SimpleBinaryMessage.java:68) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.appendMessage(AbstractEventDriver.java:65) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.events.JettyAnnotatedEventDriver.onBinaryFrame(JettyAnnotatedEventDriver.java:125) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.events.AbstractEventDriver.incomingFrame(AbstractEventDriver.java:145) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.WebSocketSession.incomingFrame(WebSocketSession.java:321) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.extensions.ExtensionStack.incomingFrame(ExtensionStack.java:202) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.Parser.notifyFrame(Parser.java:226) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:262) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:582) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:441) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:428) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:426) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:320) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:158) [bundleFile:9.4.20.v20190813] │
20│ at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) [bundleFile:9.4.20.v20190813] │
00│ at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) [bundleFile:9.4.20.v20190813] │55
  │ 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]                                                                                

```

Additionally, none of my Alexa “Smart Home Devices” are working/I can’t turn the lights on/of in about half my of home, which is rather frustrating 😞

---

<div class="post-metadata">

**Author:** ![dastrix80](https://community.openhab.org/user_avatar/community.openhab.org/dastrix80/32/20582_2.png) [@dastrix80](https://community.openhab.org/u/dastrix80)\
**Post date:** [June 16, 2020, 12:30am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/209 "2020-06-16T00:30:51Z")

</div>

Hopefully OH developers etc can repair whatever has occured with michi so we can get him onboard to help out - he’s the expert with this!

---

<div class="post-metadata">

**Author:** ![Pedals2Paddles](https://community.openhab.org/user_avatar/community.openhab.org/pedals2paddles/32/73464_2.png) [@Pedals2Paddles](https://community.openhab.org/u/Pedals2Paddles)\
**Post date:** [June 16, 2020, 1:29am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/210 "2020-06-16T01:29:29Z")

</div>

It would be super helpful if someone could link to where this new JAR file can be found…

---

<div class="post-metadata">

**Author:** ![charcharwon](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/71c47a/32.png) [@charcharwon](https://community.openhab.org/u/charcharwon)\
**Post date:** [June 16, 2020, 1:35am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/211 "2020-06-16T01:35:41Z")

</div>

> [@Web Socket Error on AmazonEchoControl binding every 65 seconds](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/182):
>
> I think I found the culprit. Just doing some verification before I’ll provide a test jar. Edit: please try link removed, use snapshot, changes are merged. Instructions for usage see above.

---

<div class="post-metadata">

**Author:** ![richaardvark](https://community.openhab.org/user_avatar/community.openhab.org/richaardvark/32/73659_2.png) [@richaardvark](https://community.openhab.org/u/richaardvark)\
**Post date:** [June 16, 2020, 1:39am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/212 "2020-06-16T01:39:38Z")

</div>

[Here is a link to the post above, by @J-N-K, where they posted the new jar file earlier today.](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/182)

[And here is a direct link to the jar file, provided in the aforementioned post.](https://janessa.me/esh/org.openhab.binding.amazonechocontrol-2.5.6-fix-leaks-fix-connection.jar) Note: this is for the Release Candidate version and not for the Preview/Beta (there is no support for the Alexa “Smart Home Devices” functionality that exists in the Beta version of the AmazonEchoControl binding).

---

<div class="post-metadata">

**Author:** ![Pedals2Paddles](https://community.openhab.org/user_avatar/community.openhab.org/pedals2paddles/32/73464_2.png) [@Pedals2Paddles](https://community.openhab.org/u/Pedals2Paddles)\
**Post date:** [June 16, 2020, 2:08am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/213 "2020-06-16T02:08:50Z")

</div>

Thanks guys. That did the trick. Echo control is working and my logs aren’t exploding.

---

<div class="post-metadata">

**Author:** ![chimera](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/8e8cbc/32.png) [@chimera](https://community.openhab.org/u/chimera)\
**Post date:** [June 16, 2020, 3:56am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/214 "2020-06-16T03:56:20Z")

</div>

Quick overview / dumbed down version on how to resolve… alternately use: **openhab-cli console** rather than ssh’ing out of habit like I do 🙂 (password: habopen) Find bundle number for amazon binding, update it, list it again to confirm version updates ok, logout, restart OH (or reboot)

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/e/b/ebe8f03adb01c8e045e35389a4fe642da5427e7b.png)

Thanks heaps for the fix!

---

<div class="post-metadata">

**Author:** ![binderth](https://community.openhab.org/user_avatar/community.openhab.org/binderth/32/56257_2.png) [@binderth](https://community.openhab.org/u/binderth)\
**Post date:** [June 16, 2020, 4:59am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/215 "2020-06-16T04:59:29Z")

</div>

Installed the fix yesterday and running smoothly since:

```auto
## Memory = Free: 2.68GB (70%), Used: 1.17GB (30%), Total: 3.86GB
## Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB

```

Thanks s lot for the fix!

… and I also do **not** use `lastCommand`.

---

<div class="post-metadata">

**Author:** ![michi](https://community.openhab.org/user_avatar/community.openhab.org/michi/32/15741_2.png) [@michi](https://community.openhab.org/u/michi)\
**Post date:** [June 16, 2020, 5:34am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/216 "2020-06-16T05:34:48Z")

</div>

Hi everybody, currently I have not really time for the binding. Anyway, I have debugged now what’s going on. For the moment I did not find any solution, the upgrade request for the WebSocket is failing with unknown reason. It will take a lot of time to find what’s going on here. Anyone is welcome to help here. It will be necessary to compare the WS upgrade request in the Alexa Web-App with the one of the binding to find out the difference.

---

<div class="post-metadata">

**Author:** ![J-N-K](https://community.openhab.org/user_avatar/community.openhab.org/j-n-k/32/19276_2.png) [@J-N-K](https://community.openhab.org/u/J-N-K)\
**Post date:** [June 16, 2020, 5:35am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/217 "2020-06-16T05:35:45Z")

</div>

Unfortunately - since the code of the „beta“ can‘t be found anywhere - I cannot provide versions for that. In fact IMO this whole issues shows why there should be no beta/RC besides the official line.

---

<div class="post-metadata">

**Author:** ![Andrew\_Pawelski](https://community.openhab.org/user_avatar/community.openhab.org/andrew_pawelski/32/85454_2.png) [@Andrew\_Pawelski](https://community.openhab.org/u/Andrew_Pawelski)\
**Post date:** [June 16, 2020, 5:39am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/218 "2020-06-16T05:39:18Z")

</div>

I really dont know what im talking about so this might be a silly question but is it the JAR file you need and then you can apply the same changes to that?

> [@Preview and Beta: Amazon Echo Control](https://community.openhab.org/t/preview-and-beta-amazon-echo-control/81721):
>
> Preview and Beta Test Thread In this thread @Lukask and I (@michi) provides the latest features of the amazonechocontrol binding. Please jump to the [Release Candidate and Support: Amazon Echo Control Binding](https://community.openhab.org/t/release-candidate-and-support-amazon-echo-control-binding/37844) thread if you need support of the released binding version or to download a stable bugfixed version. Please continue reading here, if you want see all the very cool new features sunglassesFAQ and Hints When I have to remove and recreate things for a binding upgrade? Check When I have …

---

<div class="post-metadata">

**Author:** ![J-N-K](https://community.openhab.org/user_avatar/community.openhab.org/j-n-k/32/19276_2.png) [@J-N-K](https://community.openhab.org/u/J-N-K)\
**Post date:** [June 16, 2020, 6:20am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/219 "2020-06-16T06:20:55Z")

</div>

No. The jar is built from source code. You can only change that source code and built a new jar. Since the source code is not available (at least nowhere I know, the „standard“ place would be a GitHub repository).

To explain how that works in general:

There is a GitHub repository called openhab-addons, this contains the addons for the official distribution. If someone wants to contribute to the project (and everyone is encouraged to do so, even if it‘s a minor correction to the documentation like better wording!) he can „fork“ that repository (make an own copy on GitHub). He can then work on that copy (which is still available publicly) and raise a „pull request“ (PR) to the official repo. GitHub then shows only the differences between the official and the modified versions. The „maintainers“ and everyone else (for example the original contributor, usually called the „codeowner“) can look at these changes and make suggestions for improvements („review“). After everything looks fine, the maintainers can include the code in the official repo (called „merge“).

If a pull request is there, someone else can probably take over if the original author gets lost. If not, the whole work has to be redone. Only binaries do not suffice.

---

<div class="post-metadata">

**Author:** ![Andrew\_Pawelski](https://community.openhab.org/user_avatar/community.openhab.org/andrew_pawelski/32/85454_2.png) [@Andrew\_Pawelski](https://community.openhab.org/u/Andrew_Pawelski)\
**Post date:** [June 16, 2020, 6:23am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/220 "2020-06-16T06:23:16Z")

</div>

@michi if Jan is willing to apply the changes to the beta - would you be able to share the source code?

---

<div class="post-metadata">

**Author:** ![Kumaro87](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/85f322/32.png) [@Kumaro87](https://community.openhab.org/u/Kumaro87)\
**Post date:** [June 16, 2020, 6:33am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/221 "2020-06-16T06:33:24Z")

</div>

Sounds very good, thx so much for spending so much time to this :).

But I have a little problem, when I trie to get the ID of my binding over bundle:list | grep -i amazon I dont get anything…the amazon binding is not available in the list…but the binding is still running… what could be the problem here? thx a lot

---

<div class="post-metadata">

**Author:** ![Wikibear](https://community.openhab.org/user_avatar/community.openhab.org/wikibear/32/50394_2.png) [@Wikibear](https://community.openhab.org/u/Wikibear)\
**Post date:** [June 16, 2020, 6:36am UTC](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581/222 "2020-06-16T06:36:00Z")

</div>

Important!!! Case Sensitive!!! Look for grep Amazon

[Previous page](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581.md?page=10)

[Next page](https://community.openhab.org/t/web-socket-error-on-amazonechocontrol-binding-every-65-seconds/100581.md?page=12)
