Web Socket Error on AmazonEchoControl binding every 65 seconds

I updated my Container by using the openhab-cli.

Here is a short manual how to start the cli in the docker container:
https://www.laub-home.de/wiki/OpenHAB-cli_im_docker_Container_starten

then do the update like it is described here:

I get an error by bundle:update.
“Error executing command: janessa.me

Somebody knows what I can do?

Download the jar file and use something like FileZilla to transfer the it to /usr/share/openhab2/addons then restart OH.

EDIT: Using FTP to move the file you may need to check the permissions as it should be -rw-rw-r-- for the jar file. Use ls -al /usr/share/openhab2/addons to verify this. If you need to make a change then use openhabian-config and run fix permissions or manually with sudo chmod a+rw name-of-file-to change

1 Like

Hello,
I have system crash problems on my openhabian /raspberry and I suspect it is linked to these problem.
I have the same issue !

Remove the binding via PaperUI, stop OH, clean the cache, start OH. Go to post 180 and download the jar file then add it to addons (see my post above) and restart OH.

2 Likes

My manually patched system has been running the new jar for 47 hours. Everything seems to be fine, no log errors or obvious memory leaks. A big thank you to the community for solving the issue.

In case it helps another user, I’ll share my installation instructions.

I’m running openHAB 2.4.0 (build #1412) on a RaspberryPi. It was using a manually installed amazonechocontrol_2.5.0.Beta_07_Preview_1 jar binding at the time of the Web Socket incident. That is to say, long ago the default binding had been unistalled from PaperUI and I installed the “preview” version in the addons folder.

My instructions are intended for other users with a similar OpenHab 2.4 installation that do NOT use the extra features found in the “Beta” Preview release (an updated beta release is not available at this time). Do not use these instructions on OpenHab 2.5 (hint: perform a system upgrade instead).

IMPORTANT: Create a image backup of your system BEFORE making any changes.

1. Stop the OpenHAB2 service (be patient, takes a couple minutes):
sudo systemctl stop openhab2.service

2. Copy the new echo control binding into the /usr/share/openhab2/addons folder
Use the latest amazonechocontrol-2.5.6-SNAPSHOT jar file:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.amazonechocontrol/2.5.6-SNAPSHOT/
NOTE: I highly recommend renaming the jar file to match the old file name. This prevents duplicate bindings from running. 

3. Clear OpenHAB2's cache:
sudo openhab-cli clean-cache

4. Restart OpenHAB2
sudo systemctl restart openhab2.service

5. Start OpenHAB2's Console CLI:
openhab-cli console

6. Install the updated Gson 2.8.5 library jar file:
bundle:install https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar

7. Wait a couple minutes for the new Gson to refresh the echo devices.

8. Use the list command to confirm that the new Gson is listed as "Installed" or "Resolved".
list | grep -i gson

You will still see the old Gson as active. This appears to be normal, so don't worry.
It will report something similar to this:
 21 x Active    x  80 x 2.7.0.v20170129-0911   x Gson: Google Json Library for Java
234 x Resolved  x  80 x 2.8.5                  x Gson

9. Go to OpenHAB's amazonechocontrol account web page (replace <> parameters with your details):
http://<IPADDRESS>:8080/amazonechocontrol/<ACCOUNT_NAME>
Confirm the echo devices are online.

10. Test the system and confirm echo control features are operational. Done.

-Thomas

EDIT: Updated link to jar file.
EDIT: Added comment regarding OpenHab 2.5.

4 Likes

Hi Thomas,

The Websocket-Error seems to be disappeared. Just had an Accounthnandler-Error. with Bad Reques. just switched off the log for control.internal.handler.AccountHandler
The control.internal.WebSocketConnection is still on DEBUG but no feedback.

The last days I was wondering about the Openhab2 behaviour. It slows down and did not react anymore. There was a memory overflow. And every minute a log entry. Pulled your amazon-binding and it seems to be solved.

I will observe this and will see how it works
Will give you a feedback, how it works the next days.

BR,
Oliver

@ThomasOH,

This still will not provide the beta version functionality/lighting and decide control features, right?

@richaardvark,
I haven’t noticed any lost functionality with the new binding.

  • Thomas
3 Likes

It can’t be controlling smart home devices - that’s baked into the beta JAR which your instructions don’t install?

1 Like

Thanks @yab for the good description and thanks @J-N-K for the fix.
I found time now to try it and everything seams be back to normal!

Great work!

Thanks for the patch, my pi was falling over every so often and I couldn’t figure it out…

I’ve noticed the SSML isn’t working properly in the patch. It doesn’t seem to be recognising soundbank audio or amazon:effect tags. The <amazon:emotion> tags and <break> tags seem to be working fine. Anyone else have the same issue/workaround?

Anything in the logs? Which version did you run before?

Is this fix no longer available? I don’t seem to be able to download it

@CraigDubya Use the snapshot jar file, not the sources jar in link below, as the fix has been merged.

https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.amazonechocontrol/2.5.6-SNAPSHOT/

1 Like

It is. Scroll up a few posts to see a post by @ThomasOH with full update instructions. Scroll up a bit more and find the .jar link posted multiple times. You want the one that ends in “fix-leaks-fix-connection.jar” and not just “fix-leaks.jar”

Or just click here…

Edit: it looks like the latest .jar is now updated and can be downloaded from the openHAB server, so go with the link @H102 recommended.

Yea, that’s the link that doesn’t work any more.

Oh sorry, didn’t know that. I just checked and it is the same .jar file I was linking you to, just has been moved over to the openHAB server and renamed. That .jar file binding version is working properly :heavy_check_mark: However, if you were running the Beta version of the binding we are still waiting on a fix.

Here is the direct file link:
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.amazonechocontrol/2.5.6-SNAPSHOT/org.openhab.binding.amazonechocontrol-2.5.6-SNAPSHOT.jar

And here’s the post I was referencing with helpful/fool-proof update instructions.

These are very good instructions! But it seems that .jar link is no longer working and the file has been updated on the openHAB server (it’s the same file, just has been renamed). Just wanted to let you know so that perhaps you might want to update the link in your helpful instructions, so we don’t confuse anyone. :slight_smile:

Here’s the link to the openHAB snapshot add-on folder and here’s a direct link to the latest .jar.

Very interesting, i thought sound only works with a Alexa.Sound command and not with a Alexa.Speak command. I also want to use sound for my doorbell echo output. Can you provide a full example SSML string for soundbank audio and amazon effect? So i can take a look into, too.

Thank you.

Br,

Trinitus01 - Tom

1 Like