Closed gmaffia closed 3 years ago
The logs appear truncated. When you first login it should provide a lot more information than that. You should be seeing items from custom_components.alexa_media
and alexapy
.
@alandtse You're right, sorry. Here's the logs. Let me know if this is good enough.
2021-10-13 15:26:46 INFO (MainThread) [custom_components.alexa_media] Loaded alexapy==1.25.1
2021-10-13 15:26:46 DEBUG (MainThread) [custom_components.alexa_media.helpers] *******@****************: Returning uuid {'uuid': '7c2e0ab641c38e911705be388d4edf69', 'index': 0}
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Login created for *******@**************** - amazon.com
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Trying to load cookie from file /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Pickled cookie loaded: <class 'collections.defaultdict'> defaultdict(<class 'http.cookies.SimpleCookie'>, {'amazon.com': <SimpleCookie: at-main='Atza|...."' ubid-main='134-7147818-8137508' x-main='xj27pbvfNRyGTY?Vni9wcgG5FIwpnxfn'>})
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Trying to load aiohttpCookieJar to session
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Loaded 10 cookies
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/alexa_media.*******@****************.pickle
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Using cookies to log in
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Testing whether logged in to alexa.amazon.com
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Cookies: Set-Cookie: at-main=Atza|[redacted]
Set-Cookie: .....
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] Header: {"User-Agent": "AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone", "Accept": "*/*", "Accept-Language": "*", "DNT": "1", "Upgrade-Insecure-Requests": "1"}
2021-10-13 15:26:46 WARNING (MainThread) [alexapy.alexalogin] No access token found; falling back to credential login instead of oauth.
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] No refresh token found to get access token
2021-10-13 15:26:46 DEBUG (MainThread) [alexapy.alexalogin] CSRF already exists; no need to discover
2021-10-13 15:26:47 DEBUG (MainThread) [alexapy.alexalogin] GET:
https://alexa.amazon.com/api/bootstrap with
<CIMultiDictProxy('Host': 'alexa.amazon.com', 'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Accept-Encoding': 'gzip, deflate', 'Cookie': '...')>
returned 200: with response <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '156', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Wed, 13 Oct 2021 18:26:47 GMT', 'x-amz-rid': 'KQH7AR358QJMMG2799EW', 'x-amzn-RequestId': '5dfa3394-e8c5-45f9-bb0d-441619f457f2', 'Content-Encoding': 'gzip', 'Vary': 'Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent', 'Permissions-Policy': 'interest-cohort=()', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 ae96d40a91e1448111c0037e1c86443d.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'EZE51-C1', 'X-Amz-Cf-Id': '...')>
2021-10-13 15:26:47 DEBUG (MainThread) [alexapy.alexalogin] Logged in as *******@**************** to amazon.com with id: A2P7DL31U1T8N0
2021-10-13 15:26:47 DEBUG (MainThread) [alexapy.alexalogin] Domain amazon.com matches reported account domain: https://www.amazon.com
2021-10-13 15:26:47 DEBUG (MainThread) [alexapy.alexalogin] Saving cookie to /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 15:26:47 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
Set-Cookie: .....
2021-10-13 15:26:47 DEBUG (MainThread) [custom_components.alexa_media] Testing login status: {'login_successful': True}
2021-10-13 15:26:47 DEBUG (MainThread) [custom_components.alexa_media] Setting up Alexa devices for *******@****************
2021-10-13 15:26:47 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c6565fe50>
2021-10-13 15:26:47 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634149607000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-3103' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 15:26:48 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #0 in 5s
2021-10-13 15:26:48 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c6a03ad90>
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634149608000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 15:26:48 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 15:26:48 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Creating coordinator
2021-10-13 15:26:48 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Refreshing coordinator
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/devices-v2/device returned 200:OK:application/json
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/device-preferences returned 200:OK:application/json
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/phoenix returned 200::application/json
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: get_network_details response: {'locationDetails': {'locationDetails': {'Default_Location': {'locationId': 'Default_Location', 'amazonBridgeDetails': {'amazonBridgeDetails': {'LambdaBridge_SKILL/eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9': {'amazonBridgeIdentifier': {'amazonBridgeDSN': 'SKILL/eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9', 'amazonBridgeType': 'LambdaBridge', 'lambdaBridge': True, 'amazonBridgeSource': 'SKILL'}, 'applianceDetails': {'applianceDetails': {'SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9_mac:B09575FE8BFF': {'applianceId': 'SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9_mac:B09575FE8BFF', 'endpointTypeId': '', 'driverIdentity': {'namespace': 'SKILL', 'identifier': 'eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9'}, 'manufacturerName': 'Tapo', 'friendlyDescription': 'Tapo Smart Wi-Fi Camera C200, MAC B0-95-75-FE-8B-FF', 'modelName': '', 'deviceType': 'CLOUD_DISCOVERED_DEVICE', 'version': '0', 'friendlyName': 'Lobby', 'friendlyNameModifiedAt': 1633376134316, 'capabilitiesModifiedAt': 1633376134316, 'ipAddress': '', 'port': '', 'entityId': 'aef42428-7410-4f7b-ba6f-28032dbad016', 'applianceNetworkState': {'reachability': 'REACHABLE', 'lastSeenAt': 1634149608831, 'createdAt': 1633376134316, 'lastSeenDiscoverySessionId': {'value': 'a15fdc70-6c5b-42a8-8d99-ffd1b1790754'}}, 'tags': {'tagNameToValueSetMap': {}}, 'additionalApplianceDetails': {'additionalApplianceDetails': {'_type': 'smbCamera'}}, 'firmwareVersion': '0', 'actions': [], 'capabilities': [{'capabilityType': 'AVSInterfaceCapability', 'type': 'AlexaInterface', 'version': '3', 'interfaceName': 'Alexa'}, {'capabilityType': 'AVSCameraStreamControllerCapability', 'type': 'AlexaInterface', 'version': '3', 'cameraStreamConfigurations': [{'protocols': ['RTSP'], 'resolutions': [{'width': 640, 'height': 480}], 'authorizationTypes': ['NONE'], 'videoCodecs': ['H264'], 'audioCodecs': ['G711']}], 'interfaceName': 'Alexa.CameraStreamController'}, {'capabilityType': 'AVSInterfaceCapability', 'type': 'AlexaInterface', 'version': '3', 'properties': {'supported': [{'name': 'connectivity'}], 'proactivelyReported': True, 'retrievable': True, 'readOnly': False}, 'interfaceName': 'Alexa.EndpointHealth'}], 'applianceTypes': ['CAMERA'], 'isEnabled': True, 'aliases': [], 'connectedVia': '', 'alexaDeviceIdentifierList': [], 'applianceKey': 'aef42428-7410-4f7b-ba6f-28032dbad016', 'applianceDriverIdentity': {'namespace': 'SKILL', 'identifier': 'eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9'}, 'ipaddress': '', 'applianceLambdaControlled': True, 'mergedApplianceIds': ['SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9_mac:B09575FE8BFF']}}}}}}, 'applianceGroups': {'applianceGroups': {}}}}}, 'version': '1.0', 'relations': []}
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/bluetooth?cached=false returned 200:OK:application/json
2021-10-13 15:26:48 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/bootstrap returned 200::application/json
2021-10-13 15:26:49 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 15:26:49 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 15:26:49 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-3139' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 15:26:49 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 15:26:49 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 15:26:50 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/dnd/device-status-list returned 200:OK:application/json
2021-10-13 15:26:50 DEBUG (MainThread) [custom_components.alexa_media] Alexa entities have been loaded. Prepared for discovery.
2021-10-13 15:26:50 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Found 1 devices, 1 bluetooth
2021-10-13 15:26:50 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/notifications returned 200::application/json
2021-10-13 15:26:50 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Updated 0 notifications for 1 devices at 2021-10-13 15:26:50.347240-03:00
2021-10-13 15:26:50 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/activities?startTime=&size=10&offset=1 returned 200:OK:application/json
2021-10-13 15:26:50 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Updated last_called:
2021-10-13 15:26:50 DEBUG (MainThread) [custom_components.alexa_media] Excluding This Device for lacking capability
2021-10-13 15:26:50 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Existing: [] New: []; Filtered out by not being in include: [] or in exclude: []
2021-10-13 15:26:50 DEBUG (MainThread) [alexapy.alexalogin] Saving cookie to /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 15:26:50 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
Set-Cookie: .....
2021-10-13 15:26:50 DEBUG (MainThread) [custom_components.alexa_media] Finished fetching alexa_media data in 2.018 seconds (success: True)
2021-10-13 15:26:51 DEBUG (MainThread) [custom_components.alexa_media] Completing remaining startup tasks.
2021-10-13 15:26:59 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #1 in 10s
2021-10-13 15:26:59 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c603f1670>
2021-10-13 15:26:59 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634149619000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 15:27:00 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 15:27:00 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 15:27:00 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-3864' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 15:27:00 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 15:27:00 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 15:27:20 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #2 in 20s
2021-10-13 15:27:20 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c6568de50>
2021-10-13 15:27:20 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634149640000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 15:27:21 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 15:27:21 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 15:27:21 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-4131' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 15:27:21 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 15:27:21 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 15:28:01 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #3 in 40s
2021-10-13 15:28:01 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c603e9ca0>
2021-10-13 15:28:01 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634149681000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 15:28:02 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 15:28:02 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 15:28:02 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-4357' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 15:28:02 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 15:28:02 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 15:29:22 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #4 in 80s
2021-10-13 15:29:22 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c657c6b50>
2021-10-13 15:29:22 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634149762000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 15:29:23 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 15:29:23 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 15:29:23 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-4717' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 15:29:23 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 15:29:23 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 15:32:03 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; retries exceeded; polling
2021-10-13 15:32:03 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/bluetooth?cached=false returned 200:OK:application/json
2021-10-13 15:32:03 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/devices-v2/device returned 200:OK:application/json
2021-10-13 15:32:03 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/device-preferences returned 200:OK:application/json
2021-10-13 15:32:04 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/dnd/device-status-list returned 400:Bad Request:application/json
2021-10-13 15:32:04 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/notifications returned 200::application/json
2021-10-13 15:32:04 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Updated 0 notifications for 1 devices at 2021-10-13 15:32:04.672673-03:00
2021-10-13 15:32:04 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/activities?startTime=&size=10&offset=1 returned 200:OK:application/json
2021-10-13 15:32:04 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Updated last_called:
2021-10-13 15:32:04 DEBUG (MainThread) [custom_components.alexa_media] Excluding This Device for lacking capability
2021-10-13 15:32:04 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Existing: [] New: []; Filtered out by not being in include: [] or in exclude: []
2021-10-13 15:32:04 DEBUG (MainThread) [alexapy.alexalogin] Saving cookie to /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 15:32:04 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
Set-Cookie:.....
2021-10-13 15:32:04 DEBUG (MainThread) [custom_components.alexa_media] Finished fetching alexa_media data in 1.551 seconds (success: True)
2021-10-13 17:09:30 DEBUG (MainThread) [custom_components.alexa_media] Attempting to unload entry for *******@****************
2021-10-13 17:09:30 DEBUG (MainThread) [custom_components.alexa_media] Forwarding unload entry to media_player
2021-10-13 17:09:30 DEBUG (MainThread) [custom_components.alexa_media] Forwarding unload entry to notify
2021-10-13 17:09:30 DEBUG (MainThread) [custom_components.alexa_media] Forwarding unload entry to switch
2021-10-13 17:09:30 DEBUG (MainThread) [custom_components.alexa_media] Forwarding unload entry to sensor
2021-10-13 17:09:30 DEBUG (MainThread) [custom_components.alexa_media] Forwarding unload entry to alarm_control_panel
2021-10-13 17:09:30 DEBUG (MainThread) [custom_components.alexa_media] Forwarding unload entry to light
2021-10-13 17:09:30 DEBUG (MainThread) [custom_components.alexa_media.notify] Attempting to unload notify
2021-10-13 17:09:30 DEBUG (MainThread) [alexapy.alexalogin] Saving cookie to /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
Set-Cookie: .....
2021-10-13 17:09:31 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Connection closed: True
2021-10-13 17:09:31 DEBUG (MainThread) [custom_components.alexa_media] Removing accounts data and services
2021-10-13 17:09:31 DEBUG (MainThread) [custom_components.alexa_media] Removing config_flows data
2021-10-13 17:09:31 DEBUG (MainThread) [custom_components.alexa_media] Removing alexa_media data structure
2021-10-13 17:09:31 DEBUG (MainThread) [custom_components.alexa_media] Unloaded entry for *******@****************
2021-10-13 17:09:31 INFO (MainThread) [custom_components.alexa_media]
-------------------------------------------------------------------
alexa_media
Version: 3.10.10
This is a custom component
If you have any issues with this you need to open an issue here:
https://github.com/custom-components/alexa_media_player/issues
-------------------------------------------------------------------
2021-10-13 17:09:31 INFO (MainThread) [custom_components.alexa_media] Loaded alexapy==1.25.1
2021-10-13 17:09:31 DEBUG (MainThread) [custom_components.alexa_media.helpers] *******@****************: Returning uuid {'uuid': '7c2e0ab641c38e911705be388d4edf69', 'index': 0}
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Login created for *******@**************** - amazon.com
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Trying to load cookie from file /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Pickled cookie loaded: .....
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Trying to load aiohttpCookieJar to session
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Loaded 10 cookies
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/alexa_media.*******@****************.pickle
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Using cookies to log in
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Testing whether logged in to alexa.amazon.com
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Cookies: Set-Cookie: ....
Set-Cookie: .....
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
Set-Cookie: .....
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Header: {"User-Agent": "AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone", "Accept": "*/*", "Accept-Language": "*", "DNT": "1", "Upgrade-Insecure-Requests": "1"}
2021-10-13 17:09:31 WARNING (MainThread) [alexapy.alexalogin] No access token found; falling back to credential login instead of oauth.
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] No refresh token found to get access token
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] CSRF already exists; no need to discover
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] GET:
https://alexa.amazon.com/api/bootstrap with
<CIMultiDictProxy('Host': 'alexa.amazon.com', 'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Accept-Encoding': 'gzip, deflate', 'Cookie': '...')>
returned 200: with response <CIMultiDictProxy('Content-Type': 'application/json', 'Content-Length': '156', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Wed, 13 Oct 2021 20:09:31 GMT', 'x-amz-rid': '....', 'x-amzn-RequestId': '...', 'Content-Encoding': 'gzip', 'x-amzn-ActionTrace': 'amzn1.tr.71889385-3e87-11e6-99f3-0a51a1b50200.533.s9SFFZ.bifIPI', 'Vary': 'Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent', 'Permissions-Policy': 'interest-cohort=()', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 4e6914a651880fafa65640c6561ae2a8.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'EZE51-C1', 'X-Amz-Cf-Id': '...')>
2021-10-13 17:09:31 DEBUG (MainThread) [alexapy.alexalogin] Logged in as *******@**************** to amazon.com with id: A2P7DL31U1T8N0
2021-10-13 17:09:32 DEBUG (MainThread) [alexapy.alexalogin] Domain amazon.com matches reported account domain: https://www.amazon.com
2021-10-13 17:09:32 DEBUG (MainThread) [alexapy.alexalogin] Saving cookie to /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 17:09:32 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
Set-Cookie: ......
2021-10-13 17:09:32 DEBUG (MainThread) [alexapy.alexalogin] Login confirmed for *******@**************** - amazon.com; saving cookie to /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 17:09:32 DEBUG (MainThread) [alexapy.alexalogin] Saving cookie to /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 17:09:32 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
Set-Cookie: ...
2021-10-13 17:09:32 DEBUG (MainThread) [custom_components.alexa_media] Testing login status: {'login_successful': True}
2021-10-13 17:09:32 DEBUG (MainThread) [custom_components.alexa_media] Setting up Alexa devices for *******@****************
2021-10-13 17:09:32 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c5f0e7580>
2021-10-13 17:09:32 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634155772000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-28322' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 17:09:33 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #0 in 5s
2021-10-13 17:09:33 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c6029a550>
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634155773000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 17:09:33 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 17:09:33 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Creating coordinator
2021-10-13 17:09:33 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Refreshing coordinator
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/devices-v2/device returned 200:OK:application/json
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/phoenix returned 200::application/json
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: get_network_details response: {'locationDetails': {'locationDetails': {'Default_Location': {'locationId': 'Default_Location', 'amazonBridgeDetails': {'amazonBridgeDetails': {'LambdaBridge_SKILL/eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9': {'amazonBridgeIdentifier': {'amazonBridgeDSN': 'SKILL/eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9', 'amazonBridgeType': 'LambdaBridge', 'amazonBridgeSource': 'SKILL', 'lambdaBridge': True}, 'applianceDetails': {'applianceDetails': {'SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9_mac:B09575FE8BFF': {'applianceId': 'SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9_mac:B09575FE8BFF', 'endpointTypeId': '', 'driverIdentity': {'namespace': 'SKILL', 'identifier': 'eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9'}, 'manufacturerName': 'Tapo', 'friendlyDescription': 'Tapo Smart Wi-Fi Camera C200, MAC B0-95-75-FE-8B-FF', 'modelName': '', 'deviceType': 'CLOUD_DISCOVERED_DEVICE', 'version': '0', 'friendlyName': 'Lobby', 'friendlyNameModifiedAt': 1633376134316, 'capabilitiesModifiedAt': 1633376134316, 'ipAddress': '', 'port': '', 'entityId': 'aef42428-7410-4f7b-ba6f-28032dbad016', 'applianceNetworkState': {'reachability': 'REACHABLE', 'lastSeenAt': 1634155773534, 'createdAt': 1633376134316, 'lastSeenDiscoverySessionId': {'value': 'a15fdc70-6c5b-42a8-8d99-ffd1b1790754'}}, 'tags': {'tagNameToValueSetMap': {}}, 'additionalApplianceDetails': {'additionalApplianceDetails': {'_type': 'smbCamera'}}, 'firmwareVersion': '0', 'actions': [], 'capabilities': [{'capabilityType': 'AVSInterfaceCapability', 'type': 'AlexaInterface', 'version': '3', 'interfaceName': 'Alexa'}, {'capabilityType': 'AVSCameraStreamControllerCapability', 'type': 'AlexaInterface', 'version': '3', 'cameraStreamConfigurations': [{'protocols': ['RTSP'], 'resolutions': [{'width': 640, 'height': 480}], 'authorizationTypes': ['NONE'], 'videoCodecs': ['H264'], 'audioCodecs': ['G711']}], 'interfaceName': 'Alexa.CameraStreamController'}, {'capabilityType': 'AVSInterfaceCapability', 'type': 'AlexaInterface', 'version': '3', 'properties': {'supported': [{'name': 'connectivity'}], 'proactivelyReported': True, 'retrievable': True, 'readOnly': False}, 'interfaceName': 'Alexa.EndpointHealth'}], 'applianceTypes': ['CAMERA'], 'isEnabled': True, 'aliases': [], 'connectedVia': '', 'alexaDeviceIdentifierList': [], 'applianceKey': 'aef42428-7410-4f7b-ba6f-28032dbad016', 'applianceDriverIdentity': {'namespace': 'SKILL', 'identifier': 'eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9'}, 'ipaddress': '', 'applianceLambdaControlled': True, 'mergedApplianceIds': ['SKILL_eyJza2lsbElkIjoiYW16bjEuYXNrLnNraWxsLjU2NzFkNDMxLTMxNDgtNDFlMS1iNmRlLTJjMjY4YTdmMmZhZCIsInN0YWdlIjoibGl2ZSJ9_mac:B09575FE8BFF']}}}}}}, 'applianceGroups': {'applianceGroups': {}}}}}, 'version': '1.0', 'relations': []}
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/bluetooth?cached=false returned 200:OK:application/json
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/bootstrap returned 200::application/json
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/device-preferences returned 200:OK:application/json
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 17:09:33 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-28343' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 17:09:34 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 17:09:34 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 17:09:35 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/dnd/device-status-list returned 200:OK:application/json
2021-10-13 17:09:35 DEBUG (MainThread) [custom_components.alexa_media] Alexa entities have been loaded. Prepared for discovery.
2021-10-13 17:09:35 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Found 1 devices, 1 bluetooth
2021-10-13 17:09:35 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/notifications returned 200::application/json
2021-10-13 17:09:35 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Updated 0 notifications for 1 devices at 2021-10-13 17:09:35.600670-03:00
2021-10-13 17:09:35 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/activities?startTime=&size=10&offset=1 returned 200:OK:application/json
2021-10-13 17:09:35 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Updated last_called:
2021-10-13 17:09:35 DEBUG (MainThread) [custom_components.alexa_media] Excluding This Device for lacking capability
2021-10-13 17:09:35 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Existing: [] New: []; Filtered out by not being in include: [] or in exclude: []
2021-10-13 17:09:35 DEBUG (MainThread) [alexapy.alexalogin] Saving cookie to /config/.storage/alexa_media.*******@****************.pickle
2021-10-13 17:09:35 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
Set-Cookie:....
2021-10-13 17:09:35 DEBUG (MainThread) [custom_components.alexa_media] Finished fetching alexa_media data in 2.622 seconds (success: True)
2021-10-13 17:09:44 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #1 in 10s
2021-10-13 17:09:44 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c5f0b7a00>
2021-10-13 17:09:44 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634155784000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 17:09:44 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 17:09:44 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 17:09:44 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-28417' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 17:09:44 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 17:09:44 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 17:10:04 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #2 in 20s
2021-10-13 17:10:04 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c5f0d99d0>
2021-10-13 17:10:04 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634155804000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 17:10:05 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 17:10:05 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 17:10:05 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-28500' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 17:10:05 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 17:10:05 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 17:10:45 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #3 in 40s
2021-10-13 17:10:45 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c656b6250>
2021-10-13 17:10:45 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634155845000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 17:10:47 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 17:10:47 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 17:10:47 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-28621' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 17:10:47 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 17:10:47 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 17:12:07 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; reconnect #4 in 80s
2021-10-13 17:12:07 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket created: <alexapy.alexawebsocket.WebsocketEchoClient object at 0x7f9c5f060a90>
2021-10-13 17:12:07 DEBUG (MainThread) [alexapy.alexawebsocket] Connecting to wss://dp-gw-na-js.amazon.com/?x-amz-device-type=ALEGCNGL9K0HM&x-amz-device-serial=-1634155927000 with {'User-Agent': 'AmazonWebView/Alexa Media Player/2.2.223830.0/iOS/11.4.1/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Referer': 'https://alexa.amazon.com/api/bootstrap', 'Origin': 'https://alexa.amazon.com'}
2021-10-13 17:12:08 DEBUG (MainThread) [alexapy.alexawebsocket] Initating Async Handshake.
2021-10-13 17:12:08 DEBUG (MainThread) [alexapy.alexawebsocket] Starting message parsing loop.
2021-10-13 17:12:08 DEBUG (MainThread) [alexapy.alexawebsocket] WebSocket Connection Closed. <Task finished name='Task-28861' coro=<WebsocketEchoClient.process_messages() done, defined at /usr/local/lib/python3.9/site-packages/alexapy/alexawebsocket.py:138> result=None>
2021-10-13 17:12:08 DEBUG (MainThread) [alexapy.alexawebsocket] Encoding WebSocket Handshake MSG.
2021-10-13 17:12:08 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket creation failed: Cannot write to closing transport
2021-10-13 17:14:48 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Websocket closed; retries exceeded; polling
2021-10-13 17:14:48 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/bluetooth?cached=false returned 200:OK:application/json
2021-10-13 17:14:48 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/devices-v2/device returned 200:OK:application/json
2021-10-13 17:14:49 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/device-preferences returned 200:OK:application/json
2021-10-13 17:14:49 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/dnd/device-status-list returned 400:Bad Request:application/json
2021-10-13 17:14:50 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/notifications returned 200::application/json
2021-10-13 17:14:50 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Updated 0 notifications for 1 devices at 2021-10-13 17:14:50.180570-03:00
2021-10-13 17:14:50 DEBUG (MainThread) [alexapy.alexaapi] *******@****************: static GET: https://alexa.amazon.com/api/activities?startTime=&size=10&offset=1 returned 200:OK:application/json
2021-10-13 17:14:50 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Updated last_called:
2021-10-13 17:14:50 DEBUG (MainThread) [custom_components.alexa_media] Excluding This Device for lacking capability
2021-10-13 17:14:50 DEBUG (MainThread) [custom_components.alexa_media] *******@****************: Existing: [] New: []; Filtered out by not being in include: [] or in exclude: []
2021-10-13 17:14:50 DEBUG (MainThread) [alexapy.alexalogin] Saving cookie to /config/.storage/alexa_media.*******@****************.pickle
Set-Cookie: ....
2021-10-13 17:14:50 DEBUG (MainThread) [custom_components.alexa_media] Finished fetching alexa_media data in 2.131 seconds (success: True)
I do see that there is one device (a TAPO camera) that comes from alexa, but the Echo is not showing up anywhere?
What do you see if you go to this page here in your browser? https://alexa.amazon.com/api/devices-v2/device
This is how we identify devices.
@alandtse This is the output
{ devices: [ { accountName: "Este dispositivo", appDeviceList: [ { deviceAccountId: "A03515402SWDCI9YO8HXC", deviceType: "A2IVLV5VM2W81", serialNumber: "7c2e0ab641c38e911705be388d4edf69" } ], capabilities: [ "ADAPTIVE_LISTENING", "VOLUME_SETTING", "MICROPHONE" ], charging: null, clusterMembers: [ ], deviceAccountId: "A03515402SWDCI9YO8HXC", deviceFamily: "VOX", deviceOwnerCustomerId: "A2P7DL31U1T8N0", deviceType: "A2IVLV5VM2W81", deviceTypeFriendlyName: null, essid: null, language: null, macAddress: null, online: true, parentClusters: [ ], postalCode: null, registrationId: null, remainingBatteryLevel: null, serialNumber: "7c2e0ab641c38e911705be388d4edf69", softwareVersion: "1" } ] }
Are you logging into the correct Amazon domain for your region?
@alandtse How do I know which is the correct domain for my region? I am in Argentina, but if you go to amazon.com.ar, that redirects to amazon.com. Should I try amazon.com.ar, or would it be just the same? If I try using amazon.com.ar, then I'm taken to the alexa login page twice, asked for a OTP twice, but then when hitting this endpoint on public cloud: https://public_cloud_url/auth/alexamedia/callback?flow_id=015d319b58b44a88bca0ff2dcd6c0066 I get a 500 error back. Here's some logs:
Please login to alexa.amazon.com on your browser. Does it have your echo devices? If not, it's the wrong one. I don't know what is the appropriate Argentina domain. You will need to discover that.
@alandtse indeed, the echo was set on a different account. I was pretty sure it was on my main account, but it was set on a secondary one. I'm sorry to have bothered you with this. Thanks a lot for your help!
All my devices appear on the Amazonhttps://alexa.amazon.com/api/devices-v2/device page but all I see is a Browswer and VLC_Client.
Adding the Alexa Media Player integration to my Home Assistant instance goes through the configuration process without any errors, but it does not display my Echo device for adding to Home Assistant after authentication happens. Log also shows an error about no access token being found.
Steps to reproduce the behavior:
Expected behavior I would expect the list of Alexa devices for me to choose the Echo from.
System details
const.py
or HA startup): 3.10.10pip show alexapy
or HA startup):Logs 2021-10-13 13:05:08 WARNING (MainThread) [homeassistant.core] Unable to remove unknown service notify/alexa_media 2021-10-13 13:16:50 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /homeassistant/restart request Server disconnected 2021-10-13 13:16:50 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session 2021-10-13 13:17:08 WARNING (MainThread) [alexapy.alexalogin] No access token found; falling back to credential login instead of oauth