Preview and Beta: Amazon Echo Control

Hello, with 2.5.10 my Habpanel no longer works. The message from the Habpanel is “connection lost trying to reconnect”.

an addition: I deleted the binding, all echo devices and the Amazon account. Then I reinstalled Binding 2.5.10. Immediately afterwards I can no longer use Habpanel, the message “connection lost …”.

Can someone help me?

Hello,
My Amazon Echo Control “was running” for months. For a few days now I have had the problem that I can no longer log into Amazon. I’ve already uninstalled the AmazonEchocontrol binding, installed the 2.5.10 snapshot … jar, and added a new Amazon account. But it’s still the same when I log on to http: // openhab: 8080 / amazonechocontrol / Amazon, the login works itself, amazon then sends a security link to my mobile phone. Before I can execute this link on my cell phone, the login window closes after about 5 seconds and I am directed back to the login window. What can I do?

Best Martin

Martin
I followed the exact same steps as you, uninstalled the binding, placed the 2.5.10 jar file in my addons folder then I browsed to alexa page in an internet browser on my computer. It allowed me to log on using my password, then made me change my password. Once I was able to log on with a browser, I tried again logging on at http: // openhab: 8080 / amazonechocontrol / Amazon and it worked

Try to enable 2 Factor authentication at your amazon account and then try to reestablish this functionality.

2 Likes

Thanks a lot. That was it.

using the 2.5.10 snapshot in a docker setup on a raspi4, i have the following issue:

devices connected through amazon are listed in the paperui inbox, but their capabilities like *:powerstate are not added when adding them as a thing.

i do have a pihole in the network serving as a local dns server, however the address in question is resolved fine from both the pi@raspi4 user as well as from inside the docker container for openhab:

pi@pi4:~ $ docker exec -it openhab sh -c "/bin/bash"
root@pi4:/openhab# nslookup alexa.amazon.de
Server:         192.168.*.3
Address:        192.168.*.3#53

Non-authoritative answer:
alexa.amazon.de canonical name = layla.amazon.com.
layla.amazon.com        canonical name = tp.799c43337-frontier.amazon.com.
tp.799c43337-frontier.amazon.com        canonical name = d3rsqup3tcxj1a.cloudfront.net.
Name:   d3rsqup3tcxj1a.cloudfront.net
Address: 13.35.254.173

could it be an issue with an AAAA (i.e. ipv6) record? because the pihole returns a cname for ipv4 just fine but an empty response for ipv6 for alexa.amazon.de

any idea how to troubleshoot?

logs about the issue:

2020-10-26 12:43:57.418 [WARN ] [mazonechocontrol.internal.Connection] - Request to url 'https://alexa.amazon.de/api/phoenix/state' fails with unknown error
java.net.UnknownHostException: alexa.amazon.de
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) ~[?:1.8.0_265]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_265]
	at java.net.Socket.connect(Socket.java:607) ~[?:1.8.0_265]
	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:284) ~[?:1.8.0_265]
	at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) ~[?:1.8.0_265]
	at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[?:1.8.0_265]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[?:1.8.0_265]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[?:1.8.0_265]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1165) ~[?:1.8.0_265]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1059) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[?:1.8.0_265]
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1343) ~[?:1.8.0_265]
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1318) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:264) ~[?:1.8.0_265]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:634) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:555) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.getSmartHomeDeviceStatesJson(Connection.java:1064) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeState(AccountHandler.java:971) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$2(AccountHandler.java:169) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_265]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_265]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_265]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_265]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_265]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_265]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]
2020-10-26 12:43:57.425 [WARN ] [trol.internal.handler.AccountHandler] - updateSmartHomeState fails with unexpected error
java.net.UnknownHostException: alexa.amazon.de
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) ~[?:1.8.0_265]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_265]
	at java.net.Socket.connect(Socket.java:607) ~[?:1.8.0_265]
	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:284) ~[?:1.8.0_265]
	at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) ~[?:1.8.0_265]
	at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[?:1.8.0_265]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[?:1.8.0_265]
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[?:1.8.0_265]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1165) ~[?:1.8.0_265]
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1059) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[?:1.8.0_265]
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1343) ~[?:1.8.0_265]
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1318) ~[?:1.8.0_265]
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:264) ~[?:1.8.0_265]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:634) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:555) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.getSmartHomeDeviceStatesJson(Connection.java:1064) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeState(AccountHandler.java:971) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$2(AccountHandler.java:169) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_265]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_265]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_265]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_265]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_265]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_265]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_265]

I am on OH3. Having the same issue that Amazon Skill devices are not updating the status on OH side. The debug log shows that polling is happing and results are accurate.

I want to ask if there is an equivalent version for OH3? i mean the snapshot versions? pls help

Hello, any feedback if there is a version for OH3?

The current version runs fine on OH3.

Hi @J-N-K, I am trying to see if the version linked by @Trinitus01 solves the issue of alexa smart home device states not being updated on OH side.

The linked version doesn’t seem to work for me on OH3. It seems to be installed but there are unmet dependencies (from OH2.x)

openhab> bundle:list 235
START LEVEL 100 , List Threshold: 50
 ID │ State     │ Lvl │ Version             │ Name
────┼───────────┼─────┼─────────────────────┼──────────────────────────────────────────────────
235 │ Installed │  80 │ 2.5.10.202009251451 │ openHAB Add-ons :: Bundles :: Amazon Echo Contro
openhab> bundle:start 235
Error executing command: Error executing command on bundles:
        Error starting bundle 235: Could not resolve module: org.openhab.binding.amazonechocontrol [235]
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.core

Any suggestions?

Hi @candiesdoodle, ho do I install the update?
thanks!

On 2.5.X?
Just follow the instructions in OP

Without changing the code, this will not work. I’ll check with @Trinitus01.

Thank you. looking forward to it

Hi folks, @J-N-K @Trinitus01, just circling back on this, any chance of releasing a OH3 version of the snapshot binding?

It looks like the Windows 10 Alexa app now supports Communications, so you can send a TTS using the Speak channel!

However… I don’t think this device type appears in the Discovery Inbox.

According to the /amazonechocontrol page, its device family is REAVER

If this could be added, that’d be fantastic! :smiley:

Thanks for the awesome work you’ve done on this binding - I use it daily to announce throughout the house when there’s 5 minutes until dinner, another when it’s being dished up, and if everyone still isn’t at the table, that dinner is on the table! It does help get both the small child and the aging in-laws moving towards the table so that there’s a chance their food will still be hot! :laughing:

Hello. Don’t mean to bother but if you could look into the state not updating issue for OH3, that will be helpful!

Hi there! TTS (and LastVoiceCommand) has worked for some time now for Alexa in the Alexa Windows 10 App. I don’t think we’re going to get a device family for “REAVER,” which seems to be a non-standard device type/is the same device type that appears when you login to your account via the Alexa Web App interface.

I discovered this functionality a while back and wrote a brief “how to”/summarized other findings about this for anyone else who was interested. The easiest thing to do is just add your Alexa Windows App “device” as an Echo Dot. A number of the features will work, but not all of course. I didn’t find it any more beneficial to add the Alexa Windows App device as an Echo Show over a Dot. There are other non-standard Alexa devices that can also be connected and setup this way, such as Fire HD tablets for example - you can capture "LastVoiceCommand"s and send TTS commands to these tablets as well. Also works for Fire TV devices.

More info here:

https://community.openhab.org/t/release-candidate-and-support-amazon-echo-control-binding/37844/1672?u=richaardvark

And here:

https://community.openhab.org/t/release-candidate-and-support-amazon-echo-control-binding/37844/1673?u=richaardvark

Thank you - I’ve manually added it as a Thing in openHAB (I was expecting it to show up in the Inbox after doing a search) and will give it a try :slight_smile:

update org.openhab.binding.amazonechocontrol https://janessa.me/esh/org.openhab.binding.amazonechocontrol-3.0.0-SNAPSHOT.jar

will get you the latest changes from @Trinitus01 and some more code improvements (not necessarily thing you might notice, mostly corner cases). I would appreciate some comments if this works well.

This is only for OH3 and will not be backported to OH 2.5.x.