Preview and Beta: Amazon Echo Control

Hello, i tried to use the blinding today.
However after updating openhab to 2.5.10-1 and installing amazon echo control binding version 2.5.10, I always end up at the amazon log in screen.
After entering mailadress and password, a screen for authentication shows up to inform me a access notification was send to my smartphone. This screen jumps back to the login screen after ~5seconds. Even after confirming the notification on the smartphone the same procedure starts again :frowning:
Can someone help?

Edit: I just created a new amazon account and registered for the 30 days free prime and added my echospot to this account.
The login to this account works, no request to a 2 step authentication (also there is no phone number registered to the account). However the echospot shows up in the list, but is marked as “offline” all the time 


@sl4m Just enable Multifactor authentification in your amazon account. The should do the trick.

Hello, thank you for the hint.
However how to do that :smiley: 
 Amazon account setting are bigger than wikipedia 

Has this to be done on Amazon webpage or Alexa webpage / app?

Also for the second dummy amazon account:
Just deleted and added the account again to the binding, than the echospot was marked online.
I can now also control it via openhab. Its really nice and fast response!

https://www.amazon.com/gp/help/customer/display.html?nodeId=202073820

Hi @J-N-K, its a simple switch item. Here is the definition:

Switch Plug_State "Geyser1" { channel="amazonechocontrol:smartHomeDevice:XXXXXXXXXX:YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY:powerState" }

Logs continue to indicate that the state is received

																																
2020-11-20 23:04:28.206 [DEBUG] [trol.internal.handler.AccountHandler] - check login amazonechocontrol:account:XXXXXXXXXX
																																				   
2020-11-20 23:04:30.156 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState started
2020-11-20 23:04:30.157 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.in/api/phoenix/state
2020-11-20 23:04:30.157 [DEBUG] [mazonechocontrol.internal.Connection] - POST: {
	"stateRequests": [
		{
			"entityId": "SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"entityType": "APPLIANCE"
		}
	]
}
2020-11-20 23:04:30.999 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.in/api/phoenix/state succeeded
2020-11-20 23:04:31.000 [DEBUG] [mazonechocontrol.internal.Connection] - Result of POST https://alexa.amazon.in/api/phoenix/state:{
	"deviceStates": [
		{
			"entity": {
				"entityId": "SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
				"entityType": "CLOUD_DISCOVERED_DEVICE"
			},
			"capabilityStates": [
				"{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"OFF\",\"timeOfSample\":\"2020-11-20T17:34:30.799Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}",
				"{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-20T17:34:30.799Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"
			],
			"error": null
		}
	],
	"errors": []
}
2020-11-20 23:04:31.001 [TRACE] [mazonechocontrol.internal.Connection] - Requested {
	"stateRequests": [
		{
			"entityId": "SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"entityType": "APPLIANCE"
		}
	]
} and received {
	"deviceStates": [
		{
			"entity": {
				"entityId": "SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
				"entityType": "CLOUD_DISCOVERED_DEVICE"
			},
			"capabilityStates": [
				"{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"OFF\",\"timeOfSample\":\"2020-11-20T17:34:30.799Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}",
				"{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-20T17:34:30.799Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"
			],
			"error": null
		}
	],
	"errors": []
}
2020-11-20 23:04:31.001 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState finished																																																															   
2020-11-20 23:04:34.776 [DEBUG] [trol.internal.handler.AccountHandler] - checkData amazonechocontrol:account:XXXXXXXXXX finished

However, the state update works when restarting the bundle. THis is the additional entry in log. device state changes after this (value = OFF —> switches off in OH).

2020-11-20 23:11:20.247 [TRACE] [nal.smarthome.HandlerPowerController] - SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX received [
	{
		"namespace": "Alexa.PowerController",
		"name": "powerState",
		"value": "OFF",
		"timeOfSample": "2020-11-20T17:41:20.033Z",
		"uncertaintyInMilliseconds": 500,
		"deepQuery": true,
		"timeOfStateChange": ""
	}
]
2020-11-20 23:11:20.248 [TRACE] [nal.smarthome.HandlerPowerController] - SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX final state false

pls let me know what other logs etc can i provide

Ok. The last entries are those I added recently. It seems that the handler is not called when an update is received

1 Like

I updated the bundle with some more logging. May I ask you to try again? Thanks.

on restart of the bundle:

2020-11-21 00:27:56.776 [TRACE] [control.internal.WebSocketConnection] - Scheduling pong timeout
2020-11-21 00:27:56.776 [DEBUG] [trol.internal.handler.AccountHandler] - refreshing data amazonechocontrol:account:XXXXXXXXXX
2020-11-21 00:27:56.777 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.in/api/devices-v2/device?cached=false
2020-11-21 00:27:56.917 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState started with deviceFilerId=SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2020-11-21 00:27:56.918 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.in/api/phoenix/state
2020-11-21 00:27:56.918 [DEBUG] [mazonechocontrol.internal.Connection] - POST: {"stateRequests":[{"entityId":"SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","entityType":"APPLIANCE"}]}
2020-11-21 00:27:57.660 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.in/api/phoenix/state succeeded
2020-11-21 00:27:57.661 [DEBUG] [mazonechocontrol.internal.Connection] - Result of POST https://alexa.amazon.in/api/phoenix/state:{"deviceStates":[{"entity":{"entityId":"SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","entityType":"CLOUD_DISCOVERED_DEVICE"},"capabilityStates":["{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"ON\",\"timeOfSample\":\"2020-11-20T18:57:57.474Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}","{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-20T18:57:57.474Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"],"error":null}],"errors":[]}
2020-11-21 00:27:57.662 [TRACE] [mazonechocontrol.internal.Connection] - Requested {"stateRequests":[{"entityId":"SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","entityType":"APPLIANCE"}]} and received {"deviceStates":[{"entity":{"entityId":"SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","entityType":"CLOUD_DISCOVERED_DEVICE"},"capabilityStates":["{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"ON\",\"timeOfSample\":\"2020-11-20T18:57:57.474Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}","{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-20T18:57:57.474Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"],"error":null}],"errors":[]}
2020-11-21 00:27:57.663 [TRACE] [trol.internal.handler.AccountHandler] - Trying to distributes update {SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=["{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"ON\",\"timeOfSample\":\"2020-11-20T18:57:57.474Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}","{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-20T18:57:57.474Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"]} to smarthome devices with deviceFilterId SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2020-11-21 00:27:57.663 [DEBUG] [trol.internal.handler.AccountHandler] - Found id SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, updating channels
2020-11-21 00:27:57.664 [TRACE] [ernal.handler.SmartHomeDeviceHandler] - mapInterfaceToStates {Alexa.PowerController=[{"namespace":"Alexa.PowerController","name":"powerState","value":"ON","timeOfSample":"2020-11-20T18:57:57.474Z","uncertaintyInMilliseconds":500,"deepQuery":true,"timeOfStateChange":""}], Alexa.EndpointHealth=[{"namespace":"Alexa.EndpointHealth","name":"connectivity","value":{"value":"OK"},"timeOfSample":"2020-11-20T18:57:57.474Z","uncertaintyInMilliseconds":0,"deepQuery":true,"timeOfStateChange":""}]}
2020-11-21 00:27:57.664 [TRACE] [ernal.handler.SmartHomeDeviceHandler] - handlerbase = class org.openhab.binding.amazonechocontrol.internal.smarthome.HandlerPowerController, supportedInterfaces = [Alexa.PowerController]
2020-11-21 00:27:57.664 [TRACE] [nal.smarthome.HandlerPowerController] - SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX received [{"namespace":"Alexa.PowerController","name":"powerState","value":"ON","timeOfSample":"2020-11-20T18:57:57.474Z","uncertaintyInMilliseconds":500,"deepQuery":true,"timeOfStateChange":""}]
2020-11-21 00:27:57.665 [TRACE] [nal.smarthome.HandlerPowerController] - SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX final state true
2020-11-21 00:27:57.666 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState finished

==> /var/log/openhab/events.log <==
2020-11-21 00:27:57.668 [INFO ] [me.event.ThingStatusInfoChangedEvent] - Thing 'amazonechocontrol:smartHomeDevice:XXXXXXXXXX:YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY' changed from UNKNOWN: Thing has changed. to ONLINE
2020-11-21 00:27:57.669 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'Plug_State' changed from OFF to ON

on continuos updates:

2020-11-21 00:32:14.744 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState started with deviceFilerId=null
2020-11-21 00:32:14.745 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.in/api/phoenix/state
2020-11-21 00:32:14.746 [DEBUG] [mazonechocontrol.internal.Connection] - POST: {"stateRequests":[{"entityId":"SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","entityType":"APPLIANCE"}]}
2020-11-21 00:32:15.541 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.in/api/phoenix/state succeeded
2020-11-21 00:32:15.543 [DEBUG] [mazonechocontrol.internal.Connection] - Result of POST https://alexa.amazon.in/api/phoenix/state:{"deviceStates":[{"entity":{"entityId":"SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","entityType":"CLOUD_DISCOVERED_DEVICE"},"capabilityStates":["{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"OFF\",\"timeOfSample\":\"2020-11-20T19:02:15.343Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}","{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-20T19:02:15.343Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"],"error":null}],"errors":[]}
2020-11-21 00:32:15.543 [TRACE] [mazonechocontrol.internal.Connection] - Requested {"stateRequests":[{"entityId":"SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","entityType":"APPLIANCE"}]} and received {"deviceStates":[{"entity":{"entityId":"SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX","entityType":"CLOUD_DISCOVERED_DEVICE"},"capabilityStates":["{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"OFF\",\"timeOfSample\":\"2020-11-20T19:02:15.343Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}","{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-20T19:02:15.343Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"],"error":null}],"errors":[]}
2020-11-21 00:32:15.544 [TRACE] [trol.internal.handler.AccountHandler] - Trying to distributes update {SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=["{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"OFF\",\"timeOfSample\":\"2020-11-20T19:02:15.343Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}","{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-20T19:02:15.343Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"]} to smarthome devices with deviceFilterId null
2020-11-21 00:32:15.544 [TRACE] [trol.internal.handler.AccountHandler] - Id SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX not matching filter null
2020-11-21 00:32:15.545 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState finished

got to do something with the deviceFilterId being null later on

That’s what I suspected but couldn’t verify because I don’t have such a device. Please try again, bundle updated.

Hi,
My router reboots on a schedule. I have sucessfully reduced the errors in the log from openHAB rules by better handling the situtation. Now only the echo control binding repeatedly fills my log with pages of errors whenever the internet becomes inaccassible.

Please could the amount of normal logging be reduced to minimum when the internet becomes inaccessible to something more readable and concise.

eg small snipet of the junk that fills my log on router reboot

2020-11-21 09:59:32.120 [WARN ] [mazonechocontrol.internal.Connection] - Request to url 'https://alexa.amazon.de/api/cloudplayer/playlists?deviceSerialNumber=xxx&deviceType=xxx&mediaOwnerCustomerId=xxxx' fails with unknown error

java.net.UnknownHostException: alexa.amazon.de
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) ~[?:1.8.0_222]

	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_222]

	at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_222]

	at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:666) ~[?:1.8.0_222]

	at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) ~[?:1.8.0_222]

	at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[?:1.8.0_222]

	at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[?:1.8.0_222]

	at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[?:1.8.0_222]

	at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264) ~[?:1.8.0_222]

	at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367) ~[?:1.8.0_222]

	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[?:1.8.0_222]

	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1165) ~[?:1.8.0_222]

	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1059) ~[?:1.8.0_222]

	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[?:1.8.0_222]

	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1573) ~[?:1.8.0_222]

	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1501) ~[?:1.8.0_222]

	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) ~[?:1.8.0_222]

	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:352) ~[?:1.8.0_222]

	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:639) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:555) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:550) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.getPlaylists(Connection.java:1127) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.refreshData(AccountHandler.java:552) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.handler.AccountHandler.checkData(AccountHandler.java:458) ~[?:?]

Thanks M

hi @J-N-K
its working this time!! device states are updated. though the deviceFilterId is still null, but there is this new log entry for updating ... with {Skill...

2020-11-21 15:40:55.088 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState started with deviceFilterId=null
2020-11-21 15:40:55.088 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.in/api/phoenix/state
2020-11-21 15:40:55.089 [DEBUG] [mazonechocontrol.internal.Connection] - POST: {
	"stateRequests": [
		{
			"entityId": "SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"entityType": "APPLIANCE"
		}
	]
}
2020-11-21 15:40:55.883 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.in/api/phoenix/state succeeded
2020-11-21 15:40:55.884 [DEBUG] [mazonechocontrol.internal.Connection] - Result of POST https://alexa.amazon.in/api/phoenix/state:{
	"deviceStates": [
		{
			"entity": {
				"entityId": "SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
				"entityType": "CLOUD_DISCOVERED_DEVICE"
			},
			"capabilityStates": [
				"{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"ON\",\"timeOfSample\":\"2020-11-21T10:10:55.693Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}",
				"{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-21T10:10:55.693Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"
			],
			"error": null
		}
	],
	"errors": []
}
2020-11-21 15:40:55.884 [TRACE] [mazonechocontrol.internal.Connection] - Requested {
	"stateRequests": [
		{
			"entityId": "SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
			"entityType": "APPLIANCE"
		}
	]
} and received {
	"deviceStates": [
		{
			"entity": {
				"entityId": "SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
				"entityType": "CLOUD_DISCOVERED_DEVICE"
			},
			"capabilityStates": [
				"{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"ON\",\"timeOfSample\":\"2020-11-21T10:10:55.693Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}",
				"{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-21T10:10:55.693Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"
			],
			"error": null
		}
	],
	"errors": []
}
2020-11-21 15:40:55.884 [TRACE] [trol.internal.handler.AccountHandler] - Trying to distributes update {SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=[
	"{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"ON\",\"timeOfSample\":\"2020-11-21T10:10:55.693Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}",
	"{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-21T10:10:55.693Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"
]} to smarthome devices with deviceFilterId null
2020-11-21 15:40:55.885 [TRACE] [ernal.handler.SmartHomeDeviceHandler] - Updating [org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeGroups$SmartHomeGroup@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeGroups$SmartHomeGroup@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeGroups$SmartHomeGroup@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeGroups$SmartHomeGroup@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeGroups$SmartHomeGroup@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeGroups$SmartHomeGroup@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeGroups$SmartHomeGroup@XXXXXXXX, org.openhab.binding.amazonechocontrol.internal.jsons.JsonSmartHomeDevices$SmartHomeDevice@XXXXXXXX] with {SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=[
	"{\"namespace\":\"Alexa.PowerController\",\"name\":\"powerState\",\"value\":\"ON\",\"timeOfSample\":\"2020-11-21T10:10:55.693Z\",\"uncertaintyInMilliseconds\":500,\"deepQuery\":true,\"timeOfStateChange\":\"\"}",
	"{\"namespace\":\"Alexa.EndpointHealth\",\"name\":\"connectivity\",\"value\":{\"value\":\"OK\"},\"timeOfSample\":\"2020-11-21T10:10:55.693Z\",\"uncertaintyInMilliseconds\":0,\"deepQuery\":true,\"timeOfStateChange\":\"\"}"
]}
2020-11-21 15:40:55.885 [TRACE] [ernal.handler.SmartHomeDeviceHandler] - mapInterfaceToStates {Alexa.PowerController=[
	{
		"namespace": "Alexa.PowerController",
		"name": "powerState",
		"value": "ON",
		"timeOfSample": "2020-11-21T10:10:55.693Z",
		"uncertaintyInMilliseconds": 500,
		"deepQuery": true,
		"timeOfStateChange": ""
	}
], Alexa.EndpointHealth=[{
	"namespace": "Alexa.EndpointHealth",
	"name": "connectivity",
	"value": {
		"value": "OK"
	},
	"timeOfSample": "2020-11-21T10:10:55.693Z",
	"uncertaintyInMilliseconds": 0,
	"deepQuery": true,
	"timeOfStateChange": ""
}]}
2020-11-21 15:40:55.885 [TRACE] [ernal.handler.SmartHomeDeviceHandler] - handlerbase = class org.openhab.binding.amazonechocontrol.internal.smarthome.HandlerPowerController, supportedInterfaces = [Alexa.PowerController]
2020-11-21 15:40:55.885 [TRACE] [nal.smarthome.HandlerPowerController] - SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX received [{
	"namespace": "Alexa.PowerController",
	"name": "powerState",
	"value": "ON",
	"timeOfSample": "2020-11-21T10:10:55.693Z",
	"uncertaintyInMilliseconds": 500,
	"deepQuery": true,
	"timeOfStateChange": ""
}]
2020-11-21 15:40:55.885 [TRACE] [nal.smarthome.HandlerPowerController] - SKILL_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX final state true
2020-11-21 15:40:55.886 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState finished

==> /var/log/openhab/events.log <==
2020-11-21 15:40:55.886 [INFO ] [marthome.event.ItemStateChangedEvent] - Item 'Plug_State' changed from OFF to ON

Thanks. It’s ok that the deviceFilterId is null. This is an equivalent to no filter. The problem is that the device id was compared to that value even if it is null. This is wrong. null should call all devices.

1 Like

Where do I report bugs and feature suggestions ? Here?

OH 2.5.10
2.5.10 │ openHAB Add-ons :: Bundles :: Amazon Echo Control Binding
Raspberry Pi4 Openhabian

  • Bug - Smart device discovery. Amazon plug
 Discovery finds ‘Alexa guard on first plug’ but nothing else for the plug.
  • Feature request - Ability to activate, deactivate or even change the ‘Do Not Disturb’ settings for each device.Then it would be possible to activate and deactivate this feature by rules or button
  • Enhancement - Reduce verbose logged events when WAN is not accesible.

For Amazon ‘first plug’ I created a PaperUI thing but am unable to link and item

Presumably because Alexa guard is not yet available in Austria but more probably because it is not a feature the plug has!

  1. set the binding to debug or trace and show the log during discovery
  2. should be possible using routines (see other thread)
  3. will not happen

Please note that no further feature will be added to 2.5.x, so you need to switch to 3.0.0 to get new features.

openhab> log:get org.amazonechocontrol
DEBUG

Deleted Thing, item and then ran discovery. I only see this in log:

Added new thing 'amazonechocontrol:smartHomeDevice:account1:2fb781fd-cc96-4fb6-acf2-6d852007a0a5' to inbox.

image

Its a basic plug

Thanks for the reply but what is the reason for 3 will not happen ? Too dificult?

No.3 will not happen because dropping WAN connection is a bad thing for a cloud connected service.

I’ll check how we can get more out of the device. What do you expect to find besides the powerState? And why can’t you link an item? What is the error you get?

I know its not good if the WAN connection is lost but why fill the log with pages and pages of errors most of which means nothing. For most other things I get a simple warning if the WAN connection is lost and I also prevent rules running when my router is offline for those things that would gerenate even more errors eg transforms. Mostly for me a lost WAN connection is due to a periodic reboot in the middle of the night and is only offline for a few minutes but in that time this binding fills my log.

The device I am having trouble with is an amazon plug. It doesn’t do anything other than on and off but it is discovered as Alexa guard!!

Here is what it looks like in the Alexa app

image

I can create a Thing in paperUI but when I try to link with ‘create a new item’ nothing happens, no link is created and no error in the log at debug level either. The item is created and appears at the very end of the item list, unlinked
image

The device is a simple plug from Amazon for Alexa

I checked the code and it’s just a misleading label. I’ll add some debug logging to the next release that’ll help getting more information to find the correct label.

The link problem most probably is a PaperUI issue, not related to the amazonechocontrol binding. Can you link to the item after it is created (i.e. not “Create a new item” but “Existing Item”)?

Thank you a lot.
After this it worked :slight_smile:

I have found another problem.
In my house there are 6 Alexas
included in OH-Echo control binding.

Every time when i say something to any device, i see in the OH-log (debug-level), that a complete configruation-refresh-cycle is running. hundreds of request are made to the amazon-api.

after a while, the binding cannot make tts-commands, because the internal queue is too long or someting. sometimes the command is executed one minute later.

what can it be ?

Ralph