Web Socket Error on AmazonEchoControl binding every 65 seconds

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

My system had been going heywire for days but I hadnā€™t had time to look into what was wrong. Amazing amount of stuff that ends up being effected by this binding getting messed up. Almost all of my wifi hardware had stopped working, Lifx bulbs, tp-link plugs and I had noticed the alexa wasnā€™t working. I had checked the logs but hadnā€™t seen any errors until this morning. The system started throwing the OOM error messages. I guess it took awhile because this is a fairly powerful PC.
Well I disabled the echo device ā€˜thingā€™ in paper UI, uninstalled the binding, restarted the box and everything immediately began working again. Then I dropped the new jar file in addons and re-enabled my echo ā€˜thingā€™ and now the alexa stuff is all working again

Big big thanks to Jan for fixing this binding
@J-N-K :+1:
you are the MAN!

1 Like

Glad everything is working again for you! Definitely agree that this binding really affects so many other devices and bindings. I was using the Beta version which allows you to directly pull in your Alexa smart home devices/lights/etc. and I have been so happy with it for months now. But we still donā€™t have a fixed Beta version yet, so Iā€™m still super impacted and canā€™t control half my house :-/ But glad others are having their issues resolved. Iā€™m hoping whatever updates were made to the regular add-on version can be made to the Beta version fairly soon. :crossed_fingers:t2::pray:t2: I wish I knew how to fix it and would gladly help with the effort, but Iā€™ve spent many hours attempting on my own and have gotten nowhere. @J-N-K is there anything I can do to help with updating the Beta version? If there are any tasks you can delegate to me Iā€™m very happy to help if Iā€™m able to be of assistance. Iā€™d really like to be able to use my home once again as I normally do. Things are very difficult and not working at the momentā€¦ :-/

Check my jar from the beta thread.

With a bit of luck it should work but Iā€˜m confident we can get it running.

2 Likes