Preview and Beta: Amazon Echo Control

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

Does this happen on OH3 or 2.5.x? Please provide the log.

it happens on both versions.

i find out, that the following code in AccountHandler.java is responsible for this:
Line 829…

void refreshAfterCommand() {
   refreshData();
}

When i remark the refreshData()-command, everthing is ok.
Older versions of the binding doesn’t have this behaviour (ex. 2.5.7).

in my opinion, it make no sense to refresh the whole configuration of all devices after every command. if there are more devices in one account, it takes a lot of unnecessary traffic…

1 Like

I tried again with paper UI ‘create new item’ but it didn’t link. An item was created and tried to manully link to it and that failed too.

What happens when you try to link to that item?

Nothing happens.
Now I am trying to manually define things and items in the config files but no luck so far. I got the Thing id from discovery and copy and pasted that into my definition but its not working.

edit … Gave up with thing config file and tried to assign a manually created item to Paper UI thing. It does not liink

Switch AFirstPlug "A On/Off" { channel="amazonechocontrol:smartHomeDevice:account1:smartHomeDevice1:powerState" }

And there is no log why this fails?

@J-N-K, is this something you could consider implementing. It would really change the interaction between OH and Alexa considerably.

Best, Jay