Release Candidate and Support: Amazon Echo Control Binding

Just want to say great work - I just added this binding and configured in 5 minutes… 3 echo’s discovered and controllable :slight_smile:

openHAB 2.2.0 Build #986 but I now upgraded to
openHAB Distribution Version Information

build-no : Build #1177
online-repo : https://openhab.jfrog.io/openhab/online-repo-snapshot/2.3

Repository Version

openhab-distro : 2.3.0-SNAPSHOT
smarthome : 0.10.0-SNAPSHOT
openhab-core : 2.3.0-SNAPSHOT
openhab1-addons : 1.12.0-SNAPSHOT
openhab2-addons : 2.3.0-SNAPSHOT
karaf : 4.1.3
–> but still the same error … strange

After Upgrade and several Reboots and adding the things in PaperUI´again it works. Great job and great binding!

I’am happy to here, that it works now!

Hi Cody,
do you also use an amazon.com account? Does the binding work in your installation?

Yes sir, amazon.com.

When I first installed the binding I was getting a similar message as van.shava… sun.net.www.protocol.http.HttpURLConnection. This was under Status in the Paper UI. Now it says Offline - Communication error.

There is nothing in /var/log/openhab2/openhab.log. If I watch the log in the Karaf console I see this after restarting the binding.

13:13:40.012 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazonechocontrol:account:AmazonAccount' changed from OFFLINE (COMMUNICATION_ERROR) to UNINITIALIZED
13:13:40.022 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazonechocontrol:account:AmazonAccount' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
13:14:05.408 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazonechocontrol:account:AmazonAccount' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
13:14:05.435 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazonechocontrol:account:AmazonAccount' changed from INITIALIZING to OFFLINE (CONFIGURATION_PENDING): Wait for login
13:14:17.198 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'amazonechocontrol:account:AmazonAccount' changed from OFFLINE (CONFIGURATION_PENDING): Wait for login to OFFLINE (COMMUNICATION_ERROR)

New beta 5 released. Only the login process was changed. Maybe the amazon.com accounts works now. But I have no confirmation for that yet.

Another help would be, if anyone could correct my readme. I know, that my english is not perfect and so I am sure that there a lot of mistakes.

Best regards,
Michael

I use 2FA on amazon and therefore login with this binding fails… Will you support this logon method?

Hi Mario,
not in the next time, I hope the amazon provides an official way to do this, then I will support it. I recommend, that you create a second account only for the registration of your echo devices where the 2FA is turned off.

Regards,
Michael

Hi Michi,

super cool this is exactly what I’m looking for.

I installed the binding already.
Connecting to the account and adding my Echo’s through PaperUI was working without issues.
Currently I’m struggeling to set a radio station and start the radio.

She currently complains that she can’t play the music.

Do you have any example how to select the radio station?

Best regards
Timmi

Hi Michi,

works like a charm with my Echo and Echo Plus.

Do you plan on implementing Smart Home functionality into the binding? I have IKEA Tradfri directly connected to the Echo Plus without the IKEA Gateway and can control the lamps via voice and the smartphone app. Connecting them to openHAB would be really great.

Thank you!

Just wanted to let you know that beta 5 seems to have fixed the issue with logging in to amazon.com.

Great work!

Hi DocMolle,
it is not on my plan yet, but it’s an interesting idea, I will thing about it, it should b possible to do this, because it’s possible from the alexa app.
Regards,
Michael

Thank’s for information, I’am happy to here that!

Hi,

I thought I would give this one a go as it looks great and although I only have a single dot at the moment for testing voice and other control I can see the benefit of enabling this going forward.
However I don’t use the paper ui for any configurations, always been hand edited or eclipse and now VSC, and I tried to configure the things file manually but I’m getting login errors when it tries to connect to amazon.co.uk, I believe the issue may be that my Amazon Alexa account password has characters in it other than Alpha and Numeric and these may be causing some issues as the password is held between double quotes in the things file, is it possible to using single quotes as generally these don’t allow character translations to unix/scripted functions which I believe may be the issue?

2018-01-16 20:17:51.181 [INFO ] [mazonechocontrol.internal.Connection] - Response maybe not valid
2018-01-16 20:17:51.481 [INFO ] [mazonechocontrol.internal.Connection] - Login failed:{} 
org.openhab.binding.amazonechocontrol.internal.ConnectionException: Login fails.
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeLogin(Connection.java:411) ~[?:?]
	at org.openhab.binding.amazonechocontrol.handler.AccountHandler.checkLogin(AccountHandler.java:252) ~[?:?]
	at org.openhab.binding.amazonechocontrol.handler.AccountHandler.lambda$0(AccountHandler.java:201) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Keep up the great work

Kevin

Hi Kevin,

The parsing of the file is done by the openHAB framework (or more exactly from the Eclipse SmartHome library which is used by openHAB). So I can do nothing for you in my binding. But if you provide me an string with all the special characters which are used in your password (but of course not your password itself!), I will check what happens with this characters so that we know if this is the problem.

Regards,
Michael

Hi Timmi,

sorry I have overlooked your posting. If have provided now a sample in the readme of the first posting for a selection element.

Regards,
Michael

michi,
This binding your working on looks interesting. I haven’t had time yet to try it out yet. I have 5 Echo Dots and 1 Echo Spot. I see one of the features your planning is for OpenHAB to be able to speak messages over alexa. I would be really interested in this feature. Do you have any time table when you think that would be done?

No, currently I try to implement the mqtt connection, but this can be a complicated time consuming task, because I have to modify the orignal paho mqtt library from eclipse, so that I can add cookies for the authentication. And I will not start with the notification before this is finished or I no that it could not be done for any reason.

Hi Michael,

thank you for the link. I will look into that. I didn’t know about the drop downs so far.
Thank you for your work.

Best regards
Timmi