Web Socket Error on AmazonEchoControl binding every 65 seconds

Do you use the newest version of openHAB and binding?

I am using 2.5.3-1 and related amazoncontrol binding.
I think to remember that at least one person reported to have problems even with an older version.

Fine!
Works well for me. No leaking memory for the past few hours.
THANKS for this workaround.
OH 2.5.0

Greetings
Mark

@J-N-K What about the jetty version, do you know if it changed since 2.5.3-1?
I didnt found a dependency for jetty in the add-on pom so i think the main project of openHAB decide which one is used?!?

Exactly. Jetty is determined by the framework. This has not changed since 2.5.0.

If the information in the profile/header of MrWiseman is up to date he uses 2.4:

Hello, thanks for the contribution, I did the procedure with the .jar file.
With a clean installation, and it did not work the error continues.
If I have more suggestions, I can test them in the laboratory, with new installations.
Thank you

Here 2.5.0 RC3 of OH is used:

Since my last reboot, I suddenly do have websocket errors every 60 seconds, but only those - no OOM.

Is it possible, that only people using “LastVoiceCommand” are getting the OOM errors?

I just double checked: I do NOT use LastVoiceCommand on my two echo’s but still getting the web connect error (no item/link attached to the channel).

No impossible.

Were any of you using the Preview and Beta: Amazon Echo Control version of the binding (amazonechocontrol_2.5.0.-2019-10-23.jar)? The “amazonechocontrol-2.5.6-fixleaks.jar” version doesn’t seem to allow for any of my Amazon/Echo “Smart Home Devices” to function, as they normally do with the 2019-10-23 Preview and Beta .jar file. Is the “fixleaks” .jar a fix of the non-beta/non Amazon “Smart Home Devices” version of the binding? I need a “fixed” version that supports the latest Beta release, with the Smart Home Devices features.

Side note: I’ve tried to reach out to the developer @michi via several different channels, including his personal email address. Though the Amazon Echo Control binding(s) haven’t been updated in months, his profile does show that he was last logged-in to this forum only a few days ago, so hopefully he is still able to help provide us with support.

I am getting the errors, and I am only using TTS. I recently tried implementing startRoutine, but I was not able to get it to work. Trouble shooting the issue led me to this web socket error. I have removed the startRoutine item, but the error persists. I am using openhab 2.5.5 in the US on WIN7 with the org.openhab.binding.amazonechocontrol-2.5.6-fixleaks.jar.

Thx, for me the workarround fit and there is no mem increase since 5 hours.

Release = Raspbian GNU/Linux 10 (buster)

Kernel = Linux 4.19.118-v7l+

Platform = Raspberry Pi 4 Model B Rev 1.1

Uptime = 0 day(s). 5:33:48

CPU Usage = 0% avg over 4 cpu(s) (4 core(s) x 1 socket(s))

CPU Load = 1m: 0.00, 5m: 0.01, 15m: 0.00

Memory = Free: 1.18GB (61%), Used: 0.76GB (39%), Total: 1.94GB

Swap = Free: 0.68GB (100%), Used: 0.00GB (0%), Total: 0.68GB

Root = Free: 52.33GB (93%), Used: 3.56GB (7%), Total: 58.30GB

Updates = 0 apt updates available.

Sessions = 0 session(s)

Processes = 121 running processes of 32768 maximum processes

Amazon Echo Control Binding

binding-amazonechocontrol - 2.5.5

openHAB 2.5.5 Release Build

I get this if i try to use tts :S



any ideas? :S

@richaardvark So I posted too soon, those options only made it longer before I hit the OOM errors again and everything stops working, rules, MQTT updates, the works. So last night I had to do this to resolve things:
1)backup my items and rules files
2) remove all the rules and items related to my Amazon Echos
3) Remove and then Force Remove all my Amazon Echo Things
4) Remove and then Force Remove my Amazon Account
5) Uninstall the Amazon Echo Binding
6) Reboot

Since then everything is happy except no more voice control, but WAF is up because now at least motion sensors work to turn on lights and push buttons work to open / close garage!

If you want to adjust your Java memory usage for OH you do it in the /etc/default/openhab2 file. Look for the section like this:

#########################
## JAVA OPTIONS
## Additional options for the JAVA_OPTS environment variable.
## These will be appended to the execution of the openHAB Java runtime in front of all other options.
##
## A couple of independent examples:
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"
##   EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"
##   EXTRA_JAVA_OPTS="-Djna.library.path=/lib/arm-linux-gnueabihf/ -Duser.timezone=Europe/Berlin -Dgnu.io.rxtx.SerialPorts=/dev/ttyS0"

EXTRA_JAVA_OPTS="-Xms400m -Xmx650m"

That Last line is the one I modified as shown.

Note for the Amazon Echo Binding Devs: I noticed that with the binding installed I was having problems with other “Internet-facing” bindings, NTP, Air Quality and Astro binding would complain about not being able to connect to servers or “No Route to Host” would show up next the the Thing in PaperUI and this was right after a reboot of my OH box. Sometimes they would come back online after 20 minutes or so or I would have to edit the Thing, change a parameter (usually I would adjust the Refresh Interval) and save and it would come online.

Andrew

Tried it on my previous RPI3 with Version 2.5.2-1.
Same result…

@richaardvark Amazon Smart Home Devices should not work because webSocket is broken.

@One_Watt The issue doesn’t depend on any item, you can have zero items and the error message will persist.

I don’t have time yet to help I would but can’t. Somebody out there records network traffic and check via wireshark what’s happening?

1 Like

I did several TTS runs

Echo_Living_Room_TTS.sendCommand( '<speak><amazon:effect name="whispered">Lass mich hier raus</amazon:effect></speak>')

and ran tcpdump on openhab host in parallel for about 10 - 15 minutes

tcpdump | grep dp-gw

I did not see any hostname containing the string dp-gw while grepping for amazon returned several server names in eu-west.

1 Like

One more report using OH 2.4: 2.5.5 docker restarts randomly

with that I would conclude
=> it’s independent of OH 2.4, 2.5.X
=> independent of the amazoncontrol binding version ( apart of the OOM problem )

It also was mentioned if the certificate would have been renewed.
I connected to https://dp-gw-na.amazon.com/ via browser and checked the certificate:
Validity: Not Before 1/30/2020, 1:00:00 AM (Central European Summer Time)
=> so that was not changed either

someone on the internet mentioned having problems because his fritzbox protection of minors ( URL/content filter ) was blocking some amazon server. => I think this cannot be the reason ( at least not for the wireshark/tcpdump that was done some posts above as not all requests to that server are blocked.