Preview and Beta: Amazon Echo Control

Hi All,

Im quite new to OpenHAB ans like what I have done already.

I have added in my Amazon account and it has auto discovered 4 firesticks in my inbox.

These are in a unkown - state not found in paper UI. Im looking for a step by step guide to add one and then follow for the rest. Is there one anywhere?

Kind regards

As far as I know this binding does not handle Fire sticks as of today

Thank you, I have used the echo binding to achieve what I needed.

My Amazon Echo Control Binding suddenly stopped working.
The account thing stays in state COMMUNICATION_ERROR with additional Info
POST url 'https://api.amazon.com/auth/token' failed: Bad Request
Anyone also faced this and has a solution ???
Was running openHAB 2.5.4 and now tried latest 2.5.9 SNAPSHOT.

EDIT: Found the solution myself by resetting the account via KARAF console.
All Things are back online again.

1 Like

I have the exact same problem

Can you please tell me what command you used?

It’s all in the binding docs :

Advanced Feature Technically Experienced Users

To resolve login problems the connection settings of an account thing can be reset via the karaf console. The command amazonechocontrol listAccounts shows a list of all available account things. The command amazonechocontrol resetAccount <id> resets the device id and all other connection settings. After resetting a connection, a new login as described above is necessary.

4 Likes

I was wondering, if anyone experience devices state update issues… basically all skill based devices totally stopped updating status.
I checked with trace log , and polling works correctly and includes the correct status of the device
but it doesnt update the item state
`*

{“entityId”:“SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLmNiNmVkZWMxLWZmYWMtNDY4OS05MzNiLWIwMjUyOTI1YjIxZiIsInN0YWdlIjoibGl2ZSJ9_2004103522455551850548e1e919a633”,“entityType”:“CLOUD_DISCOVERED_DEVICE”},“capabilityStates”:[“{"namespace":"Alexa.PowerController","name":"powerState","value":"ON","timeOfSample":"2020-09-25T02:32:27.39Z","uncertaintyInMilliseconds":1,"deepQuery":true,"timeOfStateChange":""}”

*`

anyone can suggest quickfixes? commands or discovery work fine but it seem to be only one way communication.

Update: I have also verified that this issue doesnt happen on org.openhab.binding.amazonechocontrol_2.5.0.-2019-10-23

( offcourse I have erased cache and tmp and restarting system going between versions ) in addition the devices tested were created a new in both versions of the add-in…

Seems something is broken in new binding or incompatible…

Hi,

can you please test the new version?

fixed: InterrupedException
changed: single and group queues to device queue
added: standard volume to speak request

http://readme1st.de/tom/downloads/org.openhab.binding.amazonechocontrol-2.5.10-SNAPSHOT.jar

Thank you in advance!

br

Yup, will install it now.

Best, Jay

Hey Tom,

Great job in fixing the many minor issues in the binding. I’ve been running it for a 5 hours and everything is working great! From what I can tell you have reduced/eliminated the need for the thread::sleep after the TTS commands when there is a bunch of different TTS commands being executed back to back?

This below is something I always had to create thread:sleep between the paragraphs because of the length and timing of it and now I don’t. BUT there is a strange long pause between the 2 TTS’s commands which I’m assuming your binding is doing? I’m NOT asking you to fix it because this is a one off with such a long TTS command. Just wanted to give you a heads up on it.

BTW, I’m running OH 2.4 with this binding w/o any issues.

Once again, great job!

Inventory_tAlive = createTimer(now.plusSeconds(1), [ |
					logInfo("tAlive" , "Inventory_tAlive timer ran out -> cancelling timer.")
	
					var smarthome1 = new StringBuilder()
					smarthome1.append("Welcome to our smart home that was established in 2018, , it continues to expand functionality on a monthly basis.  Our smart home consists of three wireless technologies, which are eight zero two dot eleven, , Zigbee, and Z Wave.")	
					smarthome1.append(" The First Wireless technology is, eight zero two dot eleven devices, which there are seventy seven devices active, , which uses three Ubiquiti unified access points, , located on each floor of the house.")
					smarthome1.append(" The I P wireless devices, , consist of Alexa smart speakers, Sonos speakers, Nest Smoke and C O 2 Detectors, , Samsung TVs, Ecobee Thermostats, Onkyo Receivers, H P Printers, , Wall Mounted Android Tablets, Chamberlin My Q Garage, Belkin WeMo plugs, ,")			
					smarthome1.append(" and Belkin WeMo light switches, Hick Vision Cameras, , Bond Fan Control, Ring Doorbell, and a Roomba vacuum cleaner.  The second Wireless technology is, Zigbee, used by Phillips HUE, which there are thirty two active devices, which")					

					var smarthome2 = new StringBuilder()
					smarthome2.append(" consists of light strips, motion detectors, lamps, and HUE remote controls. The Third Wireless technology is, Z Wave, which is being used by the vendor Aeotec, which there are twenty devices, which consists of light level detectors, humidity sensors, , motion sensors, temperature sensors, , and tilt sensors.")	
					smarthome2.append(" All three of these Wireless technologies, are controlled centrally by a platform called open HAB, , which does not require any cloud services to work, , and it keeps our data privately with in our home,") 
					smarthome2.append(" and open HAB talks directly to the local devices, whenever possible.  open HAB uses an event rule engine, that controls all these different wireless products, , based on our defined events detected.  This eliminates having numerous interfaces, , for each vendor and event.")  
					smarthome2.append(" Once again, , thank you for visiting our Smart home.")
					
					TheRoom_TTS.sendCommand(smarthome1.toString())
					TheRoom_TTS.sendCommand(smarthome2.toString())
		
					logInfo("ECHO", "Smart Home Inventory was said on " + TheRoom_TTS)
					logInfo("ECHO", "-----------------------------------------------------------------------------")

					Inventory_tAlive.cancel()
						Thread::sleep(1500) 
					Inventory_tAlive = null
				])

Best, Jay

i can confirm it solved my issue.Echo devices status reporting correctly now.
Thank you

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.