Release Candidate and Support: Amazon Echo Control Binding

New beta is not workin! Same issue as described above:

HTTP ERROR 500
Problem accessing /amazonechocontrol/8ddd4dbe/ap/signin/135-3435306-60732911. Reason:

    Server Error
Caused by:
org.openhab.binding.amazonechocontrol.internal.HttpException: POST url 'https://www.amazon.com/ap/signin/135-3436306-' failed: Moved Temporarily
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:628)
	at org.openhab.binding.amazonechocontrol.internal.AccountServlet.handleProxyRequest(AccountServlet.java:628)
	at org.openhab.binding.amazonechocontrol.internal.AccountServlet.doVerb(AccountServlet.java:225)
	at org.openhab.binding.amazonechocontrol.internal.AccountServlet.doPost(AccountServlet.java:133)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:293)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:531)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
	at java.lang.Thread.run(Thread.java:748)
1 Like

Im guessing the answer to this will be no as stated many times before it can only do what you can do on the web interface - so my next thought is to via a rule stop the alarm and create a new alarm in 10 mins on each button press (not sure if possible as doco doesnt say you can stop or create an alarm - only play an alarm sound), option 2 is to change the volume of the alarm via a rule to 0 then bing it back up to full in 10 mins (doco does say you can change alarm volume but no example of this) i am assuming alarms go forever.
I could also write a custom rule to program an alarm sound and do whatever I want with it then, but am trying not to lose the WAF where she can tell Alexa ā€œset an alarm for 7am every weekdayā€ by making it purely openhab.
Love to hear from anyone else doing this
Will report back any progress.

Hi Michael,

Thank you for all your hard work here! I have been using the binding for a while now and have to say I Love it! It was working flawlessly for me but recently i started to have some issues with my Alexa Routine Rules I set. I canā€™t figure out if there is an issue with the code or something else. Below is the code I am using in my Alexa.Rules file.

//ALexa Dinner Time
rule "Dinner Time On"
when
        Item dinner_mode changed to ON
then
        Echo_Living_Room_StartRoutine.sendCommand('Turn On Dinner')
end


//ALexa Dinner Time Off
rule "Dinner mode off"
when
        Item dinner_mode changed to OFF
then
        All_Lights_Switch.sendCommand(ON)
end


//ALexa Mood Mode On
rule "Mood Mode On"
when
        Item mood_lights changed to ON
then
        Echo_Living_Room_StartRoutine.sendCommand('Turn on the Mood Lights')
end


//Turn Off Mood Mode
rule "Mood Mode Off"
when
        Item mood_lights changed to OFF
then
        All_Lights_Switch.sendCommand(ON)
        Echo_Living_Room_PlayMusicCommand.sendCommand('stop')
end


//ALexa Turn on the Kitchen Cabinets
rule "Kitchen Cabinets On"
when
        Item kitchen_cabinets changed to ON
then
    Echo_Living_Room_StartRoutine.sendCommand('turn on dots')
end


//ALexa Turn Off the Kitchen Cabinets
rule "Kitchen Cabinets Off"
when
        Item kitchen_cabinets changed to OFF
then
    Echo_Living_Room_StartRoutine.sendCommand('turn off dots')
end


//ALexa Media Center On
rule "Media Center On"
when
        Item media_center changed to ON
then
    Echo_Living_Room_StartRoutine.sendCommand('turn on media center')
end


//ALexa Media Center Off
rule "Media Center off"
when
        Item media_center changed to OFF
then
    Echo_Living_Room_StartRoutine.sendCommand('turn off media center')
end


//ALexa Netflix Off
rule "Netflix off"
when
        Item netflix changed to OFF
then
    Echo_Living_Room_StartRoutine.sendCommand('close netflix')
end


//ALexa Netflix ON
rule "Netflix On"
when
        Item netflix changed to ON
then
    Echo_Living_Room_StartRoutine.sendCommand('open netflix')
end


//ALexa Bedroom Master On
rule "office master switch on"
when
        Item office_master_switch changed to ON
then
    Echo_Living_Room_StartRoutine.sendCommand('open office')
end


//ALexa Bedroom Master Off
rule "office master switch off"
when
        Item office_master_switch changed to OFF
then
    Echo_Living_Room_StartRoutine.sendCommand('close office')
end


//Good Night Mode Off
rule "All Lights Off"
when
        Item good_night changed to OFF
then
        Echo_Living_Room_StartRoutine.sendCommand('Good Night')
end


//Lights On
rule "Good Night"
when
        Item good_night changed to ON
then
        Echo_Living_Room_StartRoutine.sendCommand('Good Night')
end


//ALexa Livingroom Blinds ON
rule "Livingroom Blinds Open"
when
        Item livingroom_blinds changed to ON
then
    Echo_Living_Room_StartRoutine.sendCommand('open the livingroom blinds')
end


//ALexa Livingroom Blinds OFF
rule "Livingroom Blinds Close"
when
        Item livingroom_blinds changed to OFF
then
    Echo_Living_Room_StartRoutine.sendCommand('close the livingroom blinds')
end


//ALexa Bedroom Blinds OFF
rule "Bedroom Blinds Close"
when
        Item bedroom_blinds changed to OFF
then
    Echo_Living_Room_StartRoutine.sendCommand('close the bedroom blinds')
end


//ALexa Bedroom Blinds ON
rule "Bedroom Blinds Open"
when
        Item bedroom_blinds changed to ON
then
    Echo_Living_Room_StartRoutine.sendCommand('open the bedroom blinds')
end

//ALexa Movie Mode ON
rule "Movie Mode On"
when
        Item movie_lights changed to ON
then
    Echo_Living_Room_StartRoutine.sendCommand('turn on movie mode')
end


//ALexa Movie Mode OFF
rule "Movie Mode Off"
when
        Item movie_lights changed to OFF
then
    Echo_Living_Room_StartRoutine.sendCommand('turn off movie mode')
end

To be clear everything was working perfectly and then I added some more routines and suddenly only some of them work now. Let me know if you have any suggestions or if there is something that I am doing wrong. Thanks for your help!

@tinkernut - are you running beta 2.5 (6)? you may have run into the 20 routine max limit - this version fixes it

Hi Andrew thank you for your quick reply. I tried to upgrade from 2.3 to the latest release and I am getting the following error message. Are you aware how to fix the problem?

sudo apt-get upgrade

Reading package listsā€¦ Done
Building dependency tree
Updating FireMotD available updates count ā€¦ E: Malformed line 1 in source list /etc/apt/sources.list.d/influxdb.list (dist parse)
E: The list of sources could not be read.ectories currently installed.)d and is no longer required:
Preparing to unpack ā€¦/python-ply_3.4-5_all.deb ā€¦
OK

$ apt -y install apt-transport-https
Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
apt-transport-https is already the newest version.
The following package was automatically installed and is no longer required:
libc-ares2
Use ā€˜apt-get autoremoveā€™ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2019-04-24_06:40:46_EDT [openHABian] Installing or upgrading to latest openHAB release (stable)ā€¦
$ wget -O openhab-key.asc https://bintray.com/user/downloadSubjectPublicKey?username=openhab
ā€“2019-04-24 06:40:47-- https://bintray.com/user/downloadSubjectPublicKey?username=openhab
Resolving bintray.com (bintray.com)ā€¦
Connecting to bintray.com (bintray.com)|ā€¦ connected.
HTTP request sent, awaiting responseā€¦ 200 OK
Length: unspecified [application/octet-stream]
Saving to: ā€˜openhab-key.ascā€™

openhab-key.asc [ <=> ] 3.12K --.-KB/s in 0.001s

2019-04-24 06:40:47 (2.60 MB/s) - ā€˜openhab-key.ascā€™ saved [3197]

$ apt-key add openhab-key.asc
OK

$ apt update
E: Malformed line 1 in source list /etc/apt/sources.list.d/influxdb.list (dist parse)
E: The list of sources could not be read.

$ apt-get -y install openhab2=
Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
E: Version ā€˜ā€™ for ā€˜openhab2ā€™ was not found
FAILED (apt)

I meant just update the binding jar from the top post

Thanks
Andrew

Ok thank you I will try that later today and let you know if there is a problem.

+1 for the Booo

I just noticed when I go to /amazonechocontrol/my_account and click on one of the links under Thing, under capabilities some have really weird stuff like ā€œpoptartā€, ā€œgoldfishā€, ā€œlemur_alphaā€, and ā€œdream_trainingā€. Any idea what thatā€™s all about? Iā€™m guessing itā€™s something like internal codewords or something and doesnā€™t mean much but it made me laugh

Confirming @Christoph_Zehā€™s , @dastrix80ā€™s and @oeoā€™s issue with the latest Beta 2.5 (7): No way to log-in the Account thing. Canā€™t do anything with the binding right now. Any idea, @michi?

For the time being can anyone provide a download link for the Beta 2.5 (6) for downgrading?

2 Likes

Experiencing the same issue.

Regards S

Iā€™m sure someone will have a link but its best to always make a back up of your current OH setup before upgrading, be it a single binding or a new version of OH. Doing this gets you back up and running, no need to rely on others.:wink:

EDIT: @dancemichi I tried to upload a jar file but no luck and I do not use dropbox. The only help I can provide is a link to the snapshot 2.5.0 jar, updated on April 3rd.
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/binding/org.openhab.binding.amazonechocontrol/2.5.0-SNAPSHOT/

Hope this helps to get your Amazon control back up and working.

3 Likes

Hi, Just a question.
Is it possible to start an Alexa skill command by Openhab?
For instance when someone ring on the door I would like Alexa start a voice skill command like ā€œAlexa, play ā€¦ā€
Thanks for any adviceā€¦

Lorenzo

Please have a look at the docs
What you need is called startRoutine

Looks like itā€™s working again. Thanks so much!

Yeah, thatā€™s what I usually do. Probably been too excited to use the new version. :wink:

I tried both and with various quote marks.
Alexa literally says: ā€œspeak wait for the break pause speakā€

I believe this is still a problem, and can report the following:
I have a great working OpenHABian with the Beta 2.5 (7), I have everything in config files, I have a second Pi, SSD and installad a clean OpenHABian on it, copied the backup of my conf dir over and placed the 4 later .jarā€™s in my addons dir, including the Beta 2.5 (7).
And I get the HTTP 500 error, and can not get it to work anymore! (So Iā€™m running on my original version again, itā€™s always nice to have a good working version :grin: )

Maybe this helpsā€¦

What version of the Amazon Echo Control Binding are you using? SSML only works from Beta 2.5(2) onwards.

@jwiseman

Have you tried the alexa ā€˜notify meā€™ skill?
it provides a REST URI that can be used to send a notification.
Regards
Paul

Damn it - thatā€™s it.
I didnā€™t know that. (I am still on 2.4 stable).
Thanks for the hint!