Release Candidate and Support: Amazon Echo Control Binding

Thanks for pointing me to your workaround. I will check it out.

  • Thomas

Thank you Scott; just got home from being gone a week to test it and it worked PERFECTLY the first time!

1 Like

My account seems to go on and offline every minute, log shows

11:15:58.409 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - ‘amazonechocontrol:account:account1’ changed from OFFLINE (CONFIGURATION_ERROR): Login fails. Check your credentials and try to login with your webbrowser to http(s)://youropenhab:yourport/amazonechocontrol/account1
Wichtige Mitteilung! Zum besseren Schutz Ihres Kontos geben Sie bitte nochmals Ihr Passwort ein, und geben Sie dann die Zeichen ein, die in der Abbildung unten gezeigt werden. to ONLINE

When I go to “http(s)://youropenhab:yourport/amazonechocontrol/account1” it shows:

The Account is already logged in. The account thing should be online.
Check Thing in Paper UI

System is OH2.3 with the official released binding.
How can I confirm account credentials?

I have the same Issue like Falk S.

Log says: Login failed: No session id received

Restart Openhab and try again.
On my RPi from console its:
sudo systemctl restart openhab2.service

That works for me. After using the link the login page pops up with captcha
‘http ://youropenhab:yourport/amazonechocontrol/account1’

I suspect the need to login again is because you logged into the same Amazon account from another computer. Just a hunch!

1 Like

@Wirsing84, thanks again. Finally got myopenhab.org to work and the rest was a breeze following your examples :wink: Now on to identifying the echo the request came from following the approach @Falk has presented…

1 Like

Hi Falk,

I also had this issue of status going online and offline… I tried using ‘http ://youropenhab:yourport/amazonechocontrol/account1’. But it didn’t work… then I changed domain from amazon.in to amazon.com. Status became stable and online. I think most of the echo devices will connect to alexa.amazon.com and if we login to domain other than amazon.com, like amazon.in, amazon.de etc… this issue occurs…

Regards
Cadbures

Hi @cadbures,

I just restarted OH2 and was able to authenticate again as described by @m4rk .
Maybe changing the domain has the same effect …

Hi @jjk, please be aware that the instance with the python script needs to be in the “routing line” between your echos and your internet router in order to detect the echo’s network traffic.

1 Like

Hi @Falk, thanks for the hint, I have figured that by now. That sucks, not sure I want to modify my whole network topology to make this happen… Just curious, what’s your setup that allows this to work?
I’ll probably go the less convenient way for now and have family members tell Alexa o what echo to send updates…

Hi @jjk, hope the following illustrates my setup:

WAN           OUTSIDE NET           INSIDE NET
               IP x.x.x.x           IP x.x.y.y           
----> ROUTER  ----------->  SERVER ------------->
     (FRITZBOX)             (Linux)
      FIREWALL   GARDEN     FIREWALL  "SECURED"
        NAT      DEVICES      NAT       LAN
                            KVM HOST        

It does, thanks :slight_smile:

Let me know if I can help implement it.

I’ve been struggling with trying to get this to work since 2 days now.
Still no luck.
I am on 2.3 Stable.

What I tried so far (result at the end as it’s always the same):

  • Used version shipped with Openhab 2.3 and installed via PaperUI
  • Uninstalled Paper UI installed version and tried RC3
  • used amazon.de as account
  • used amazon.com
  • cleared /tmp and /cache multiple times
  • changed OpenHab port back to 8080 default as it’s running on 8090 over here

Thing remains in status “No session ID received”.

When accessing http://openhabhost:8090/amazonechocontrol/<thing_ID>/ I always get:

HTTP ERROR 500
Problem accessing /amazonechocontrol/account/. Reason:

    Server Error
Caused by:
org.openhab.binding.amazonechocontrol.internal.ConnectionException: No session id received
	at org.openhab.binding.amazonechocontrol.internal.Connection.getLoginPage(Connection.java:435)
	at org.openhab.binding.amazonechocontrol.internal.AccountServlet.doGet(AccountServlet.java:219)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:284)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
	at org.eclipse.jetty.server.Server.handle(Server.java:534)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:333)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
	at java.lang.Thread.run(Thread.java:748)

Did you happen to change port from 8080 to 8090?
Are you sure that you can access internet from Openhab installed Machine?

8080 won’t work as Openhab doesnt listen on that port but on 8090. Yes, the machine has full Internet access.

Blockquote

First Steps
Create an ‘Amazon Account’ thing
Configure your credentials in the account thing (2 factor authentication is not supported!)
After confirmation:
a) the ‘Account Thing’ goes Online -> continue with 4)
b) the ‘Account Thing’ stays offline:
open the url YOUR_OPENHAB/amazonechocontrol in your browser (e.g. http://openhab:8080/amazonechocontrol/), click the link for your account thing and try to login.
The echo device things get automatically discovered and can be accepted

Blockquote
This is working for me… I tested it on 2.3 Stable.

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) [?:?]