Release Candidate and Support: Amazon Echo Control Binding

That’s what I did - multiple times. Issue with Error 500 remains.

Error message from logfile:

09:55:43.639 [WARN ] [.eclipse.jetty.servlet.ServletHandler] - /amazonechocontrol/8570a19a/
org.openhab.binding.amazonechocontrol.internal.ConnectionException: No session id received
        at org.openhab.binding.amazonechocontrol.internal.Connection.getLoginPage(Connection.java:435) [190:org.openhab.binding.amazonechocontrol:2.3.0.201805231855]
        at org.openhab.binding.amazonechocontrol.internal.AccountServlet.doGet(AccountServlet.java:219) [190:org.openhab.binding.amazonechocontrol:2.3.0.201805231855]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [31:javax.servlet-api:3.1.0]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [31:javax.servlet-api:3.1.0]
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [82:org.eclipse.jetty.security:9.3.21.v20170918]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) [85:org.eclipse.jetty.servlet:9.3.21.v20170918]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [183:org.ops4j.pax.web.pax-web-jetty:6.0.9]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.Server.handle(Server.java:534) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) [84:org.eclipse.jetty.server:9.3.21.v20170918]
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) [76:org.eclipse.jetty.io:9.3.21.v20170918]
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) [76:org.eclipse.jetty.io:9.3.21.v20170918]
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) [76:org.eclipse.jetty.io:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) [87:org.eclipse.jetty.util:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) [87:org.eclipse.jetty.util:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) [87:org.eclipse.jetty.util:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) [87:org.eclipse.jetty.util:9.3.21.v20170918]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) [87:org.eclipse.jetty.util:9.3.21.v20170918]
        at java.lang.Thread.run(Thread.java:748) [?:?]

I was getting this…

… and had been uninstalling the binding when I was done fiddling with it. But I accidentally left the binding installed over night and magically everything started working in the morning! The log shows that it took about 5 hours. If you’re having the same issue, you might want to just leave it be for a while.

Hi.
Have to re-login every 5-7days? Is this normal? Use openhab 2.3 and download the RC3 Version from market place. The logs shows an error by connecting but the account always go offline only after a restart of openhab.
Greetings,
Markus

Why? The proper version for 2.3 stable is the version installed through PaperUI Addon, not the market place.

Uninstalled everything, cleaned tmp and cache and installed again via Paper UI. Added thing, getting no Session ID received. Will let it sit but I must admit I am not expecting it to solve magically, but I’ll give it a try mate :slight_smile:

Hi Sihui.
Yes, this version i had before. And after two times of re-login i saw in the post’s:
Wenn Sie die Seite http (s) öffnen: // youropenhab: port / amazonechocontrol (z. B. http: // localhost: 8080 / amazonechocontrol 3 ) können Sie überprüfen, ob die RC3 korrekt installiert ist. es sollte so aussehen:
RC3.
So i used this version. Because i can’t see RC3. But both gives the same result.
Already deleted the cache and temp folder. All things deleted, restart and new Installation.
Greetings,
Markus

Hey guys, this is a great Binding, I’m really enjoying getting a LOT more out of my Echo Dots than I ever thought possible, thanks to this!! TextToSpeech is freaking awesome, I’m enjoying plugging that in to some of my alert rules, fun!

I’m struggling with the “Routine” part. the guide indicates Type in what you normally say to Alexa without the preceding "Alexa," which I am interpreting to mean I can pass a string to Alexa in the same manner I would speak that phrase, and Alexa should respond “as if” I had verbally said that string. Just as an example, this is what I’ve tried (with no success):

.items file:
String DotRoutine {channel="amazonechocontrol:echo:myaccount:itemguidhere:startRoutine"}

.rules file:
then
  DotRoutine.sendCommand('what time is it?')

But, to no avail. I figured when the rule triggered, Alexa would blurt out “The time is 2:3ppm”. but no joy.
Am I missing something in my item or rule, or is this function simply not intended to do what I’m attempting?

thanks all!

Hey,
Routine is an Alexa feature so you do this in the Alexa app. There you can define a command Alexa should listen to and manually specify how alexa reacts on this command.
my use-case:
I have a routing calles “which windows are open” that triggers a proxy item (switch) within openhab. This switch triggers a rule, which then calculates windows, and uses TTS to have Alexa spit the reply.

The startRoutine channel is a bit different: Say you have manually created a routing called “start my day” and added Alexa items like reading the news, turning on lights, etc.
This routine can then be started like:

DotRoutine.sendCommand('start my day')

Hope this helps. Additions & corrections welcome.
Best Seb

So I let everything sit since yesterday as suggested - no luck. Still no session ID received and srever error.

A while ago I had success using another browser … clearing the browsers cache should do the same.

Already tried that, even from multiple devices. As the error message states a 500 this clearly points towards Jetty itself but I have no clue how to further debug :frowning:

After a reboot yesterday, I’m back to getting the error too.

Ahhhh… I see. I was hoping there was a way to silently send Alexa a command and have it respond as If I had actually said that. Just as an example, if I could send the string “what time is it” and when that executed, it would just verbally say “the time is…” but no luck there. Is there any way to do something like this today with the current Binding state?

This error is solved by
sudo systemctl stop openhab2.service

rm -rf /var/lib/openhab2/cache/*

rm -rf /var/lib/openhab2/tmp/*

sudo systemctl start openhab2.service

then http://:8080/amazonechocontrol/account1 - Re-login

Now it is working no error since last 24 hrs

But now when I select Amazon Music Playlist Id to Play play list defined in my amazon music library it gives following error

[nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.amazonechocontrol.handler.EchoHandler@cc934d’: POST url ‘https://alexa.amazon.in/api/cloudplayer/queue-and-play?deviceSerialNumber=&deviceType=&mediaOwnerCustomerId=&shuffle=false’ failed: Bad Request

Not sure how to correct this ?

Strange: TTS stopped working:
I bought one of Alexa’s “sisters”, an Onkyo P3 speaker. This one replaced an Echo 1st gen.

While e.g. Remind-function works, TTS does not work any more with this specific device. It works with others (echos) though. The log shows normal activity as it does with the echos when a TTS command is sent. I checked configuration in Paper UI, .things file and rules.

The only difference I see for this device compared to my other echos is the length of the serial number. It has 32 characters instead of 16 for the echos.

Any known problems with “sister devices”?

(Running OH 2.3 with the official Amazon Echo Control 2.3 binding)

Hello there,
I am impressed of this binding. It is really awesome. Downside is the communication between openhab server to alexa server. It slows down the commands. Does anybody know the reason why it is not supported by amazon for direct communication to the echo device?

Further to that I have a programming problem. I have the air quality value in my town. I check the value every hour and want to send a TTS command to alexa. Two values, number ‘quality index’ and string ‘air quality description’.

items:
Number AQI_No_Inside “Air Quality” (Living Room) {channel=“airquality:aqi:local:aqiLevel”}
String AQI_Description “Air Description” (Living Room) {channel=“airquality:aqi:local:aqiDescription”}
… ECHO items

Rule:
How should the command look like? It does not accept the string for example:
Echo_Living_Room_TTS.sendCommand(AQI_Description)

How does the command look like to let Alexa tell me the value of AQI_No_Inside_

Thanks in advance.
Regards

AQI_No_Inside.state.toString

Still no luck for me. Still server error.

Same thing is happening to me. Since this morning I’m getting this message every minute

2018-06-18 14:15:27.430 [INFO ] [mazonechocontrol.internal.Connection] - Login failed: Login fails. Check your credentials and try to login with your webbrowser to http(s)://<youropenhab:yourport>/amazonechocontrol/bc5a158d
Important Message! To better protect your account, please re-enter your password and then enter the characters as they are shown in the image below.

If I go to http(s)://youropenhab:yourport/amazonechocontrol/bc5a158d and click on the link, I get the amazon page asking for my password and a Captcha. If I fill the password and the captcha, it goes back to OH but it says “wrong password”.

Any clue??

1 Like