Preview and Beta: Amazon Echo Control

There are nightlight skills out there that let you turn on/off the LED through a routine.

I concur with this observation.

Best, Jay

I am using OH 2.5.0 but since I get some problems with my Echo Control binding (error log is flooded and some voice controls not working) I would like to update to the newest version. Would it be sufficient to update to OH 2.5.4 or should I go for 2.5.5 snapshot release in regards to the Echo Control binding or is there a seperate Echo control beta release which I could use (the one linked in the first post of this thread is pretty old from 2019).

NoTechi

I second this. I used to use wonderlist and IFTTT to add things to a list but since that has now become Microsoft ToDo it’s lost all its connectivity apis.

I’m looking for a new way to add things to a family list and the amazon shopping list function fits perfectly. My family use Alexa commands a lot and it’s pretty easy to add things so if a binding could access the lists and allow us to manipulate them then that would be amazing.

A quick google and it seems to be pretty open to interrogation.

https://developer.amazon.com/en-GB/docs/alexa/custom-skills/access-the-alexa-shopping-and-to-do-lists.html

Not sure how to start a project with OH…some reading to be done!

@Lukask, would it be possible to integrate Alexa Intent (Yes and No) functions in the binding?

This would allow OH to ask questions based on OH values and get a response back from the person via the Echo.

Example : OH detects the Luminescence outside as 500 lux so OH sends a TTS to the Echo saying " Excuse me, do you want me to turn the outside lights on? " then OH/Alexa waits on a Yes/No Intent. Once the person gives a response, OH reads the lastVoiceCommand to get the response and react to it.

This would take OH/Alexa to the next level of interaction.

Best, Jay

2 Likes

I need this :slight_smile:

Suddenly, out of nowhere, none of my "LastVoiceCommand"s are working at all . My whole system depends on this. I’ve rebooted multiple times, cleaned the cache, logged out of my Amazon account through the interface and logged back in. Nothing is working, and there are no error codes in the log. What do I do to fix this?

I’m seeing the following error in my log:

java.nio.channels.AsynchronousCloseException: null
    at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.close(HttpConnectionOverHTTP.java:181) ~[?:?]
    at java.util.ArrayList.forEach(ArrayList.java:1257) [?:1.8.0_232]
    at org.eclipse.jetty.client.AbstractConnectionPool.close(AbstractConnectionPool.java:208) [bundleFile:9.4.20.v20190813]
    at org.eclipse.jetty.client.DuplexConnectionPool.close(DuplexConnectionPool.java:237) [bundleFile:9.4.20.v20190813]
    at org.eclipse.jetty.client.HttpDestination.close(HttpDestination.java:385) [bundleFile:9.4.20.v20190813]
    at org.eclipse.jetty.client.HttpClient.doStop(HttpClient.java:260) [bundleFile:9.4.20.v20190813]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:93) [bundleFile:9.4.20.v20190813]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:180) [bundleFile:9.4.20.v20190813]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:201) [bundleFile:9.4.20.v20190813]
    at org.eclipse.jetty.websocket.client.WebSocketClient.doStop(WebSocketClient.java:371) [bundleFile:9.4.20.v20190813]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:93) [bundleFile:9.4.20.v20190813]
    at org.openhab.binding.amazonechocontrol.internal.WebSocketConnection.close(WebSocketConnection.java:159) [bundleFile:?]
    at org.openhab.binding.amazonechocontrol.internal.WebSocketConnection$2.run(WebSocketConnection.java:184) [bundleFile:?]
    at java.util.TimerThread.mainLoop(Timer.java:555) [?:1.8.0_232]
    at java.util.TimerThread.run(Timer.java:505) [?:1.8.0_232]

And for some unknown reason the volume on one of my devices keeps fluctuating:

2020-06-12 14:47:50.662 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 100 to 25
2020-06-12 14:47:55.796 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 25 to 100
2020-06-12 14:48:09.689 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 100 to 25
2020-06-12 14:48:15.880 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 25 to 100
2020-06-12 14:49:09.263 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 100 to 25
2020-06-12 14:49:16.128 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 25 to 100
2020-06-12 14:50:26.783 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 100 to 25
2020-06-12 14:50:36.458 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 25 to 100
2020-06-12 14:51:44.454 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 100 to 25
2020-06-12 14:51:46.777 [vent.ItemStateChangedEvent] - FireTV_Upstairs_Den_Volume changed from 25 to 100

Im getting the HTTP errors too but it is actually OOMing my server and worse still leaving it I lose all my things from paperui and have to revert to the jsondb backups - ive uninstalled it till someone clever works out a fix

I’m having major issues too! I totally purged openHAB from my machine and reinstalled from a backup file. Reconfigured everything and still not working at all. No TTS functions are working and no “LastVoiceCommand” functions are working. And it seems the Amazon Echo Control add-on is now causing a memory leak and causing my system to crash. I’m seeing this over and over in the log:

2020-06-14 18:49:23.515 [WARN ] [e.jetty.util.thread.QueuedThreadPool] - QueuedThreadPool[qtp2941328]@2ce190{STOPPING,2<=0<=50,i=6,r=-1,q=1}[NO_TRY] Couldn't stop Thread[qtp2941328-26660,5,main]

Can someone please assist? I changed nothing at all - it must be something that changed on the Amazon server side. My whole system is not functional now because of this. Really would appreciate some assistance from the developer. Thank You!

@michi Can you help us with this? :slightly_frowning_face: :pray:t2:

1 Like

It seems we’re not alone. Here’s another thread where others are also apparently having issues as well.

That’s a fantastic idea!

I’m really looking forward to experimenting with this new beta, once the OOM/Web socket bug is fixed. For now, I’ll stick with the patched version of the official binding.

Today I invested some hours in bringing this issue forward. The problem is that https://github.com/openhab/openhab-addons/pull/6140 is far behind and has merge conflicts, so we can’t merge that one directly.

Therefore I have cloned the repo from @Lukask and tried to rebase it on latest 2.5.x-branch. That didn’t work out so well, so I decided to merge the 2.5.x-branch into the fetaure-branch. This resulted in some conflicts, too (but far less). After some more fixes and manual changes (like file-headers) I managed to compile a version that probably includes the features from this branch, the fixes that were merged to 2.5.x in the past and the recent websocket-fix.

You can find the bundle here: <see below>. If that works in general (some minor issues can be present), I’ll address the comments from @cpmeister in the above mentioned PR and raise a new PR, so we can try to get it into 2.5.7 (time is too short for 2.5.6).

If this is not working at all, someone else needs to take care of that. As mentioned in the other thread, I neither use that binding nor own any devices that could be used with it.

3 Likes

Hi J-N-K,

today i did my first pull request for another project which also target to control alexa but via shell script (added last voice command):


For now, I understood that a fork of a project is necessary to do a pull request.
Next i decided to provide my current version of the Amazon Echo Control binding to this Preview and Beta thread, so people can test the changes which prevent the too many requests and to test some new features. I read your last post about your new version which seems to use the last beta version on this thread and your current fixes in the current version on git. I am confused how to act now, should i provide my version for testing anyway else it only include your fixes but not the changes of the beta version, or should i wait until the beta is -maybe- part of the release version. If i provide, there are 3 versions of the binding out there but it would be nice if someone can also test my changes.

Br,

Trinitus01 - Tom

Thank you again so very much @J-N-K for your help with repairing this binding once again!

I installed the updated .jar, cleaned my cache, restarted openHAB a few times, restarted my system. Everything seemed to be working - the “LastVoiceCommand” feature started working once again in the Beta binding and I was encouraged! I checked on the EchoControl “Smart Home Devices” and many of them were just showing as “NULL” so I then, perhaps stupidly, decided I might as well try the additional update step that was posted by ThomasOH in the socket error thread, and did seem to succeed in updating my gson-2.8.5.jar file.

However, now I’m getting strange results, both good and bad,

The logs show openHAB as online / the systemd status shows as “Active” which is a good sign. The most promising sign of all is that my Echo devices are showing as recognized in the log and more awesomely the Smart Home Devices / lights / groups are showing as “ONLINE” again, which is wonderful! I think everything may be fixed! However, updating the gson broke something and now I can’t access the web interface whatsoever. And while everything shows as “ONLINE” and defined and active in the log, none of my commands are registering. Trying to find more log information but not showing errors anywhere that I can find… Just totally unable to access openHAB in the browser now though.

I’ve reset cache and rebooted again, tried running through openHABian setup again, running the tweaks/improvements there, but still can’t make it work. It shows as online. Are there any other places I should look for error messages, or any other suggestions you have?

Edit: I finally had some errors start to show up. “sudo systemctl status openhab2” shows the following errors:

openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/openhab2.service.d
           └─override.conf
   Active: activating (start-post) (Result: exit-code) since Sat 2020-06-20 13:58:16 CDT; 1min 40s ago
     Docs: https://www.openhab.org/docs/
           https://community.openhab.org
  Process: 4818 ExecStartPre=/bin/bash -c /usr/bin/find ${OPENHAB_CONF} -name "*.rules" -exec /usr/bin/rename.ul .rules .x {} \; (code=exited, status=0/SUCCESS)
  Process: 4834 ExecStart=/usr/share/openhab2/runtime/bin/karaf ${OPENHAB_STARTMODE} (code=exited, status=127)
 Main PID: 4834 (code=exited, status=127); Control PID: 4835 (sleep)
    Tasks: 1 (limit: 4290)
   Memory: 2.7M
   CGroup: /system.slice/openhab2.service
           └─4835 /bin/sleep 120

Jun 20 13:58:16 HomeServer systemd[1]: Stopped openHAB 2 - empowering the smart home.
Jun 20 13:58:16 HomeServer systemd[1]: Starting openHAB 2 - empowering the smart home...
Jun 20 13:58:16 HomeServer karaf[4834]: /usr/share/openhab2/runtime/bin/karaf: 247: [: Illegal number:
Jun 20 13:58:16 HomeServer karaf[4834]: /usr/share/openhab2/runtime/bin/karaf: 247: [: Illegal number:
Jun 20 13:58:16 HomeServer karaf[4834]: /usr/share/openhab2/runtime/bin/karaf: 95: [: Illegal number:
Jun 20 13:58:16 HomeServer karaf[4834]: /usr/share/openhab2/runtime/bin/karaf: 296: [: Illegal number:
Jun 20 13:58:16 HomeServer karaf[4834]: /usr/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
Jun 20 13:58:16 HomeServer systemd[1]: openhab2.service: Main process exited, code=exited, status=127/n/a

Seems perhaps a Java issue? I can try reinstalling java via openHABian. When I used openHABian a moment ago in an attempt to repair everything, it asked me if I wanted to try the Beta (lol) JDK/java update and I selected yes. Maybe that’s causing this issue.

I have never seen that. I guess using latest stable java soundslike good idea. Maybe you did overwrite the wrong bundle while updating gson?

Edit: I found an issue with some config options which I deleted unintentionally. I have fixed that and updated the jar.

openhab> bundle:list | grep -i gson
 20 │ Active │  80 │ 2.8.2.v20180104-1110    │ Gson: Google Json Library for Java

I don’t think that 2.8.5 is a requirement. This bundle starts with 2.8.2 without any errors.

Edit 2: does that option install java11? I would recommend not to do that if you don‘t know what you are doing and revert to Java8

I tried to restore a .zip backup and it said everything had been successfully restored, but nothing is running still. It’s just dead, lol. I may just purge openHAB and then restore my backup and try again, and not update the gson if it’s not a good idea.

I’m not sure exactly which version it installed, but I’ll stick with 8. I’m on a 64-bit machine, but I think openHAB wants the 32-bit java for some reason, so I’ll try that and then install your latest .jar binding.

These are the java versions available in openHABian:
│ [ ] 63 | Zulu 8 OpenJDK 32-bit Install Zulu 8 32-bit OpenJDK as primary Java provider │
│ [ ] | Zulu 8 OpenJDK 64-bit Install Zulu 8 64-bit OpenJDK as primary Java provider │
│ [ ] | Zulu 11 OpenJDK 32-bit Install Zulu 11 32-bit OpenJDK as primary Java provider (beta) │
│ [ ] | Zulu 11 OpenJDK 64-bit Install Zulu 11 64-bit OpenJDK as primary Java provider (beta) │
│ [ ] | AdoptOpenJDK 11 Install AdoptOpenJDK 11 as primary Java provider (beta) │

1 Like