Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announcement stopped working on third party devices: Sonos Speakers, ecobee4, Bose #285

Closed
mikkelke opened this issue Aug 13, 2019 · 53 comments
Labels
amazonissue Issue needs to have a change made by Amazon no-issue-activity

Comments

@mikkelke
Copy link

mikkelke commented Aug 13, 2019

Describe the bug
Announce doesn't work, while TTS does. Until Sunday announce worked perfect on my Alexa enabled Sonos speakers (Sonos One and Beam).
If i use the Aleaxa app to do the annoncement it works perfect. In the FAQ is mentioned to check that "Communications" is enabled and it is on all my speakers. But i noties that if I click on "Communications" the Alexa app get stuck loading the page.
It is one of my favorite features and I use it as my doorbell annoncement.

To Reproduce
Steps to reproduce the behavior:

  1. Send announce to Sonos Alexa enabled speaker.
  2. Northing happens

Expected behavior
Play announced message on every speaker taget.

System details

  • Home-assistant (version): 0.97.2
  • Hassio (Yes/No): No, plain Home-assistant docker version.
  • alexa_media (version from const.py or HA startup): 1.4.1 (installed from HACS)
  • alexapy (version from pip show alexapy or HA startup): 0.7.1
@krissen
Copy link

krissen commented Aug 13, 2019

Having the same issue.

As suggested in a comment on the seemingly related albeit closed, issue 200, moving from type: announce to type: tts at least gets Alexa to say something. I'm currently using it as a workaround...

@mikkelke
Copy link
Author

mikkelke commented Aug 13, 2019

My issue with accessing the "Communications" setting is fixed now after i spoke to Amazon support. My account where reset and moved from UK to US. We removed all devices and I setup everything.
Still only the TTS mode works and not the annoncement.

Having the same issue.

As suggested in a comment on the seemingly related albeit closed, issue 200, moving from type: announce to type: tts at least gets Alexa to say something. I'm currently using it as a workaround...

In you reply on the link issue you mentioned the upgrade from 1.3.* to 1.4.1. On Sunday when Annoncement stopped working I where on version 1.2.2 or 1.2.3, and therefore i decieded to upgrade to 1.4.1.
It still did not work, i found the FAQ and it said to go check "Communications" that then where enabled but i could not access it. I can access "Communications" and annoncement works from the Alexa app. What Alexa devices are you using?

@alandtse
Copy link
Owner

Does announce work on any non Sonos speakers? We haven't touched the announce code for a while.

@alandtse

This comment has been minimized.

@krissen
Copy link

krissen commented Aug 14, 2019

I have a Sonos and an Echo Dot. Announce worked on both prior to upgrading to 1.4.1. Works on neither afterwards.

Wonder if it could be related to migration to HACS rather than the upgrade to 1.4.1?

I’ll be away for a couple of days. Will provide logs once I’ve returned!

@mikkelke
Copy link
Author

mikkelke commented Aug 15, 2019

For us to debug we will need the alexapy debug logs. Please provide for announce and tts.

Running in docker where do I get the logs?
I enabled:
logger:
default: critical
logs:
custom_components.alexa_media: debug
alexapy: debug

I have a Sonos and an Echo Dot. Announce worked on both prior to upgrading to 1.4.1. Works on neither afterwards.

Wonder if it could be related to migration to HACS rather than the upgrade to 1.4.1?

I’ll be away for a couple of days. Will provide logs once I’ve returned!

Good to hear its not only a Sonos problem. Upgrading from 1.2.* to 1.4.1 I changed to use HACS.

@krissen
Copy link

krissen commented Aug 15, 2019

Back at home, enabled debug, and was running the exact same service calls as I did prior (indeed, it was cached and ready to go), but "unfortunately" it ran as it should. Ie. no errors. So no logs to send, I'm afraid.

Could it have been some caching error or the like, perhaps related to migrating to HACS? Either fixed by some amount of time having gone by, or X amount of reboots...

@mikkelke

This comment has been minimized.

@alandtse

This comment has been minimized.

@mikkelke
Copy link
Author

mikkelke commented Aug 15, 2019

@krissen HACS shouldn't have any impact. Sometimes it could be an Amazon connectivity issue and we have seen issues where multiple commands to the same Echo may result in some being ignored.

@mikkelke Can you try to do an announce and a tts and show the logs from when it issues those commands?

Announce:
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Message: Someone is at the door, kwargs: {'target': ['media_player.living_room_alexa'], 'data': {'type': 'announce', 'method': 'speak'}}
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's Sonos One: standby>, Mikkel's Sonos One, c****************************404, media_player.bathroom_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Bathroom: standby>, Bathroom, 5****************************1af, media_player.bathroom_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Dining Room: standby>, Dining Room, 0****************************083, media_player.dining_room_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Living Room: standby>, Living Room, 3****************************e5f, media_player.living_room_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Bedroom: standby>, Bedroom, 9****************************f42, media_player.bedroom_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Kitchen: standby>, Kitchen, 7****************************5d9, media_player.kitchen_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's 2nd Sonos One: standby>, Mikkel's 2nd Sonos One, a****************************82d, media_player.bedroom_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's 3rd Sonos One: standby>, Mikkel's 3rd Sonos One, e****************************d07, media_player.dining_room_left_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's 4th Sonos One: standby>, Mikkel's 4th Sonos One, d****************************792, media_player.dining_room_right_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's 5th Sonos One: standby>, Mikkel's 5th Sonos One, 8****************************adf, media_player.kitchen_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's Sonos Beam: standby>, Mikkel's Sonos Beam, 8****************************6d5, media_player.living_room_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Converting: media_player.living_room_alexa to (entities): <Entity Mikkel's Sonos Beam: standby>
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity This Device: standby>, This Device, 6****************************5df, media_player.this_device_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's Sonos One: standby>, Mikkel's Sonos One, c****************************404, media_player.bathroom_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Bathroom: standby>, Bathroom, 5****************************1af, media_player.bathroom_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Dining Room: standby>, Dining Room, 0****************************083, media_player.dining_room_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Living Room: standby>, Living Room, 3****************************e5f, media_player.living_room_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Bedroom: standby>, Bedroom, 9****************************f42, media_player.bedroom_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Kitchen: standby>, Kitchen, 7****************************5d9, media_player.kitchen_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's 2nd Sonos One: standby>, Mikkel's 2nd Sonos One, a****************************82d, media_player.bedroom_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's 3rd Sonos One: standby>, Mikkel's 3rd Sonos One, e****************************d07, media_player.dining_room_left_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's 4th Sonos One: standby>, Mikkel's 4th Sonos One, d****************************792, media_player.dining_room_right_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's 5th Sonos One: standby>, Mikkel's 5th Sonos One, 8****************************adf, media_player.kitchen_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's Sonos Beam: standby>, Mikkel's Sonos Beam, 8****************************6d5, media_player.living_room_alexa)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Converting: <Entity Mikkel's Sonos Beam: standby> to (serialnumbers): 8ef4bb9e261e40ceaa10cf76ffb796d5
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity This Device: standby>, This Device, 6****************************5df, media_player.this_device_2)
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] Announce targets: ['8****************************6d5'] entities: [<Entity Mikkel's Sonos Beam: standby>]
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [custom_components.alexa_media.notify] m******e@gmail.com: Announce by <Entity Mikkel's Sonos Beam: standby> to targets: ['8****************************6d5']: Someone is at the door
2019-08-15 22:25:59 DEBUG (SyncWorker_30) [alexapy.alexaapi] Running sequence: AlexaAnnouncement data: {"behaviorId": "PREVIEW", "sequenceJson": "{\"@type\": \"com.amazon.alexa.behaviors.model.Sequence\", \"startNode\": {\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"AlexaAnnouncement\", \"operationPayload\": {\"deviceType\": \"A3NPD82ABCPIDP\", \"deviceSerialNumber\": \"8ef4bb9e261e40ceaa10cf76ffb796d5\", \"locale\": \"en-us\", \"customerId\": \"A1VLQF1TDI6MEL\", \"expireAfter\": \"PT5S\", \"content\": [{\"locale\": \"en-us\", \"display\": {\"title\": \"\", \"body\": \"\"}, \"speak\": {\"type\": \"text\", \"value\": \"Someone is at the door\"}}], \"target\": {\"customerId\": \"A1VLQF1TDI6MEL\", \"devices\": [{\"deviceSerialNumber\": \"8ef4bb9e261e40ceaa10cf76ffb796d5\", \"deviceTypeId\": \"A3NPD82ABCPIDP\"}]}}}}", "status": "ENABLED"}
2019-08-15 22:26:16 DEBUG (Thread-5) [alexapy.alexawebsocket] Received WebSocket MSG.
2019-08-15 22:26:16 DEBUG (Thread-5) [alexapy.alexawebsocket] Received b'MSG 0x00000362 0x78d9d423 f 0x00000001 0x2233aea3 0x00000235 GWM MSG 0x0000b479 0x0000005c urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService:domain:prod:realm:USAmazon 0x00000081 urn:tcomm-endpoint:device:customerId:A1VLQF1TDI6MEL:deviceType:ALEGCNGL9K0HM:deviceSerialNumber:134-4642686-3180638-1565878758000 {"payload":"{\\"destinationUserId\\":\\"A1VLQF1TDI6MEL\\",\\"dopplerId\\":{\\"deviceSerialNumber\\":\\"8ef4bb9e261e40ceaa10cf76ffb796d5\\",\\"deviceType\\":\\"A3NPD82ABCPIDP\\"},\\"isMuted\\":false,\\"volumeSetting\\":10}","command":"PUSH_VOLUME_CHANGE"}FABE'
2019-08-15 22:26:16 DEBUG (Thread-5) [alexapy.alexawebsocket] Received Standard MSG.
2019-08-15 22:26:16 DEBUG (Thread-5) [custom_components.alexa_media] m******e@gmail.com: Received websocket command: PUSH_VOLUME_CHANGE : {'destinationUserId': 'A1VLQF1TDI6MEL', 'dopplerId': {'deviceSerialNumber': '8ef4bb9e261e40ceaa10cf76ffb796d5', 'deviceType': 'A3NPD82ABCPIDP'}, 'isMuted': False, 'volumeSetting': 10}
2019-08-15 22:26:16 DEBUG (Thread-5) [custom_components.alexa_media] Updating media_player volume: {'destinationUserId': 'A1VLQF1TDI6MEL', 'dopplerId': {'deviceSerialNumber': '8ef4bb9e261e40ceaa10cf76ffb796d5', 'deviceType': 'A3NPD82ABCPIDP'}, 'isMuted': False, 'volumeSetting': 10}
2019-08-15 22:26:16 DEBUG (SyncWorker_37) [custom_components.alexa_media.media_player] Mikkel's Sonos Beam volume updated: 10
TTS:
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Message: Someone is at the door, kwargs: {'target': ['media_player.living_room_alexa'], 'data': {'type': 'tts', 'method': 'speak'}}
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's Sonos One: standby>, Mikkel's Sonos One, c****************************404, media_player.bathroom_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Bathroom: standby>, Bathroom, 5****************************1af, media_player.bathroom_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Dining Room: standby>, Dining Room, 0****************************083, media_player.dining_room_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Living Room: standby>, Living Room, 3****************************e5f, media_player.living_room_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Bedroom: standby>, Bedroom, 9****************************f42, media_player.bedroom_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Kitchen: standby>, Kitchen, 7****************************5d9, media_player.kitchen_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's 2nd Sonos One: standby>, Mikkel's 2nd Sonos One, a****************************82d, media_player.bedroom_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's 3rd Sonos One: standby>, Mikkel's 3rd Sonos One, e****************************d07, media_player.dining_room_left_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's 4th Sonos One: standby>, Mikkel's 4th Sonos One, d****************************792, media_player.dining_room_right_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's 5th Sonos One: standby>, Mikkel's 5th Sonos One, 8****************************adf, media_player.kitchen_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity Mikkel's Sonos Beam: standby>, Mikkel's Sonos Beam, 8****************************6d5, media_player.living_room_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Converting: media_player.living_room_alexa to (entities): <Entity Mikkel's Sonos Beam: standby>
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: media_player.living_room_alexa against (<Entity This Device: standby>, This Device, 6****************************5df, media_player.this_device_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's Sonos One: standby>, Mikkel's Sonos One, c****************************404, media_player.bathroom_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Bathroom: standby>, Bathroom, 5****************************1af, media_player.bathroom_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Dining Room: standby>, Dining Room, 0****************************083, media_player.dining_room_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Living Room: standby>, Living Room, 3****************************e5f, media_player.living_room_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Bedroom: standby>, Bedroom, 9****************************f42, media_player.bedroom_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Kitchen: standby>, Kitchen, 7****************************5d9, media_player.kitchen_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's 2nd Sonos One: standby>, Mikkel's 2nd Sonos One, a****************************82d, media_player.bedroom_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's 3rd Sonos One: standby>, Mikkel's 3rd Sonos One, e****************************d07, media_player.dining_room_left_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's 4th Sonos One: standby>, Mikkel's 4th Sonos One, d****************************792, media_player.dining_room_right_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's 5th Sonos One: standby>, Mikkel's 5th Sonos One, 8****************************adf, media_player.kitchen_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity Mikkel's Sonos Beam: standby>, Mikkel's Sonos Beam, 8****************************6d5, media_player.living_room_alexa)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Converting: <Entity Mikkel's Sonos Beam: standby> to (entities): <Entity Mikkel's Sonos Beam: standby>
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] Testing item: <Entity Mikkel's Sonos Beam: standby> against (<Entity This Device: standby>, This Device, 6****************************5df, media_player.this_device_2)
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] TTS entities: [<Entity Mikkel's Sonos Beam: standby>]
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [custom_components.alexa_media.notify] TTS by <Entity Mikkel's Sonos Beam: standby> : Someone is at the door
2019-08-15 22:27:32 DEBUG (SyncWorker_10) [alexapy.alexaapi] Running sequence: Alexa.Speak data: {"behaviorId": "PREVIEW", "sequenceJson": "{\"@type\": \"com.amazon.alexa.behaviors.model.Sequence\", \"startNode\": {\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"Alexa.Speak\", \"operationPayload\": {\"deviceType\": \"A3NPD82ABCPIDP\", \"deviceSerialNumber\": \"8ef4bb9e261e40ceaa10cf76ffb796d5\", \"locale\": \"en-us\", \"customerId\": \"A1VLQF1TDI6MEL\", \"textToSpeak\": \"Someone is at the door\"}}}", "status": "ENABLED"}
2019-08-15 22:27:33 DEBUG (Thread-5) [alexapy.alexawebsocket] Received WebSocket MSG.
2019-08-15 22:27:33 DEBUG (Thread-5) [alexapy.alexawebsocket] Received b'MSG 0x00000362 0x78da2131 f 0x00000001 0x776726fa 0x00000237 GWM MSG 0x0000b479 0x0000005c urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService:domain:prod:realm:USAmazon 0x00000081 urn:tcomm-endpoint:device:customerId:A1VLQF1TDI6MEL:deviceType:ALEGCNGL9K0HM:deviceSerialNumber:134-4642686-3180638-1565878758000 {"payload":"{\\"destinationUserId\\":\\"A1VLQF1TDI6MEL\\",\\"key\\":{\\"entryId\\":\\"1565900852982#A3NPD82ABCPIDP#8ef4bb9e261e40ceaa10cf76ffb796d5\\",\\"registeredUserId\\":\\"A1VLQF1TDI6MEL\\"},\\"timestamp\\":1565900853478}","command":"PUSH_ACTIVITY"}FABE'
2019-08-15 22:27:33 DEBUG (Thread-5) [alexapy.alexawebsocket] Received Standard MSG.
2019-08-15 22:27:33 DEBUG (Thread-5) [custom_components.alexa_media] m******e@gmail.com: Received websocket command: PUSH_ACTIVITY : {'destinationUserId': 'A1VLQF1TDI6MEL', 'key': {'entryId': '1565900852982#A3NPD82ABCPIDP#8ef4bb9e261e40ceaa10cf76ffb796d5', 'registeredUserId': 'A1VLQF1TDI6MEL'}, 'timestamp': 1565900853478}
2019-08-15 22:27:33 DEBUG (Thread-5) [custom_components.alexa_media] m******e@gmail.com: Updated last_called: {'serialNumber': '8****************************6d5', 'timestamp': 1565900853478}
2019-08-15 22:27:33 DEBUG (Thread-5) [custom_components.alexa_media] m******e@gmail.com: last_called changed: {'serialNumber': '8****************************6d5', 'timestamp': 1565898571982} to {'serialNumber': '8****************************6d5', 'timestamp': 1565900853478}
2019-08-15 22:27:33 DEBUG (SyncWorker_43) [custom_components.alexa_media.media_player] Mikkel's Sonos Beam is last_called: 8****************************6d5
2019-08-15 22:27:33 DEBUG (Thread-5) [alexapy.alexawebsocket] Received WebSocket MSG.
2019-08-15 22:27:33 DEBUG (Thread-5) [alexapy.alexawebsocket] Received b'MSG 0x00000362 0x78da2131 f 0x00000001 0x776726fa 0x00000237 GWM MSG 0x0000b479 0x0000005c urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService:domain:prod:realm:USAmazon 0x00000081 urn:tcomm-endpoint:device:customerId:A1VLQF1TDI6MEL:deviceType:ALEGCNGL9K0HM:deviceSerialNumber:134-4642686-3180638-1565878758000 {"payload":"{\\"destinationUserId\\":\\"A1VLQF1TDI6MEL\\",\\"key\\":{\\"entryId\\":\\"1565900852982#A3NPD82ABCPIDP#8ef4bb9e261e40ceaa10cf76ffb796d5\\",\\"registeredUserId\\":\\"A1VLQF1TDI6MEL\\"},\\"timestamp\\":1565900853478}","command":"PUSH_ACTIVITY"}FABE'
2019-08-15 22:27:33 DEBUG (Thread-5) [alexapy.alexawebsocket] Received Standard MSG.
2019-08-15 22:27:33 DEBUG (Thread-5) [custom_components.alexa_media] m******e@gmail.com: Received websocket command: PUSH_ACTIVITY : {'destinationUserId': 'A1VLQF1TDI6MEL', 'key': {'entryId': '1565900852982#A3NPD82ABCPIDP#8ef4bb9e261e40ceaa10cf76ffb796d5', 'registeredUserId': 'A1VLQF1TDI6MEL'}, 'timestamp': 1565900853478}
2019-08-15 22:27:33 DEBUG (Thread-5) [custom_components.alexa_media] m******e@gmail.com: Updated last_called: {'serialNumber': '8****************************6d5', 'timestamp': 1565900853478}
2019-08-15 22:27:33 DEBUG (Thread-5) [custom_components.alexa_media] m******e@gmail.com: last_called changed: {'serialNumber': '8****************************6d5', 'timestamp': 1565898571982} to {'serialNumber': '8****************************6d5', 'timestamp': 1565900853478}
2019-08-15 22:27:33 DEBUG (SyncWorker_43) [custom_components.alexa_media.media_player] Mikkel's Sonos Beam is last_called: 8****************************6d5

EDIT: Proper quoting

@alandtse
Copy link
Owner

@mikkelke
Ok, I'm not seeing anything wrong with the data. Can you try renaming the pickle file and relogging in and seeing if that helps?

The next thing may be to craft an announcement by itself without the subsequent volume change. This is so we can make sure it's not because the Sonos is dropping a command because it's getting hit by more than one.

If that doesn't work, there may be something special about the way the Sonos packet has to be configured. I'd need you to create a routine with announce targeting your Sonos in the app, and then pull the sequence data. Basically you'd follow the instructions here, and then stop at step 7 and provide the entire operationPayload portion to compare to what we're sending.

@mikkelke
Copy link
Author

mikkelke commented Aug 16, 2019

@alandtse Thanks for your help. I made this rutine and when I play it from the app or say "Test this" northing happens, I think I must contact Amazon again (Annonce works when i go into "Communicate" and "Annonce":

  {
    "@type": "com.amazon.alexa.behaviors.model.Automation",
    "automationId": "amzn1.alexa.automation.55ad9f56-555b-4b2b-83ae-c28425f58b3a",
    "name": null,
    "triggers": [
      {
        "payload": {
          "customerId": "A1VLQF1TDI6MEL",
          "utterance": "test this",
          "locale": "en-DK",
          "marketplaceId": "ATVPDKIKX0DER"
        },
        "id": "amzn1.alexa.trigger.791afa5c-6778-4c2b-8446-597fc0d92c98",
        "type": "CustomUtterance",
        "timeLapse": null
      }
    ],
    "sequence": {
      "@type": "com.amazon.alexa.behaviors.model.Sequence",
      "sequenceId": "amzn1.alexa.sequence.a3e04491-2cf5-43d0-844a-70d65f0d04c5",
      "startNode": {
        "@type": "com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode",
        "type": "AlexaAnnouncement",
        "skillId": "amzn1.ask.1p.messaging",
        "operationPayload": {
          "expireAfter": "PT5S",
          "content": [
            {
              "locale": "en-DK",
              "display": {
                "title": "Alexa Routines",
                "body": "Someone is at the door"
              },
              "speak": {
                "type": "text",
                "value": "Someone is at the door"
              }
            }
          ],
          "customerId": "A1VLQF1TDI6MEL",
          "target": {
            "customerId": "A1VLQF1TDI6MEL"
          }
        },
        "name": null
      }
    },
    "owner": null,
    "clientAlias": null,
    "condition": null,
    "status": "ENABLED",
    "creationTimeEpochMillis": 1565936035434,
    "lastUpdatedTimeEpochMillis": 1565936117095
  }
]

@alandtse
Copy link
Owner

Ok I agree, I think if you can't get the Alexa App to get it to work, then there's something happening in your setup. I noticed that the locale is being populated as en-DK, which I believe is English in Denmark? This is the first time I saw that locale and I don't know if Announce is supposed to work for there. Amazon support may know better.

@mikkelke
Copy link
Author

The issue started before i changed locale.
When I started using the Alexa Media Player, my Alexa account where on amazon.com, I got the impression that I could get faster responds time (lower latency) if I change my locale. I contacted Amazon and they change it to Germany. All skils text where now written in German, so I made them change it to UK and that have been working for more then half a year. When i contacted Amazon I contacted Amazon they gave me this link: https://www.amazon.com/mycd and this time I put in my correct address and region where changed to Denmark. When I logged in on Alexa I could see that I was back on alexa.amazon.com aka the US servers.

@krissen
Copy link

krissen commented Aug 16, 2019

I will also continue to troubleshoot this, as I noticed this morning that the Echo dot indeed announced as it should in my morning routine, having switched back from ‘type: tts’ to ‘type: announce’, but the Sonos did not. (Prior to 1.4.1 and HACS, both announced. With ‘type: tts’, both tts:ed.) So +1 that it might be something Sonos-specific.

I’ll get back with logs and whatnot within a day, I hope.

@krissen
Copy link

krissen commented Aug 16, 2019

Announcement through the Alexa app works here; announces on Sonos as well as the Echo dot.

@krissen
Copy link

krissen commented Aug 16, 2019

Testing with the following data, for service notify.alexa_media_MYSONOSDEVICE: { "message": "test", "data": { "type": "announce", "method": "speak" } }

Debug lines for Sonos, announce (does not work):

2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Message: test, kwargs: {'target': ['REDACTED'], 'data': {'type': 'announce', 'method': 'speak'}}
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Vardagsrum: standby>, Vardagsrum, a****************************0cc, media_player.vardagsrum_2)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Sonos One: standby>, Sonos One, 2****************************2f8, media_player.sonos_one_2)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Converting: REDACTED to (entities): <Entity Sonos One: standby>
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Pricken: paused>, Pricken, G************XT5, media_player.pricken)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity This Device: standby>, This Device, B****************************C74, media_player.this_device_4)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Kristian's Alexa Apps: standby>, Kristian's Alexa Apps, 6****************************8B5, media_player.kristian_s_alexa_apps)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity This Device: standby>, This Device, 1****************************03d, media_player.this_device_3)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Vardagsrum: standby>, Vardagsrum, a****************************0cc, media_player.vardagsrum_2)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Sonos One: standby>, Sonos One, 2****************************2f8, media_player.sonos_one_2)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Converting: <Entity Sonos One: standby> to (serialnumbers): REDACTED
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Pricken: paused>, Pricken, G************XT5, media_player.pricken)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity This Device: standby>, This Device, B****************************C74, media_player.this_device_4)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Kristian's Alexa Apps: standby>, Kristian's Alexa Apps, 6****************************8B5, media_player.kristian_s_alexa_apps)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity This Device: standby>, This Device, 1****************************03d, media_player.this_device_3)
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] Announce targets: ['2****************************2f8'] entities: [<Entity Sonos One: standby>]
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [custom_components.alexa_media.notify] k************i@gmail.com: Announce by <Entity Sonos One: standby> to targets: ['2****************************2f8']: test
2019-08-16 22:18:22 DEBUG (SyncWorker_1) [alexapy.alexaapi] Running sequence: AlexaAnnouncement data: {"behaviorId": "PREVIEW", "sequenceJson": "{\"@type\": \"com.amazon.alexa.behaviors.model.Sequence\", \"startNode\": {\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"AlexaAnnouncement\", \"operationPayload\": {\"deviceType\": \"A2OSP3UA4VC85F\", \"deviceSerialNumber\": \"REDACTED\", \"locale\": \"en-gb\", \"customerId\": \"REDACTED\", \"expireAfter\": \"PT5S\", \"content\": [{\"locale\": \"en-gb\", \"display\": {\"title\": \"\", \"body\": \"\"}, \"speak\": {\"type\": \"text\", \"value\": \"test\"}}], \"target\": {\"customerId\": \"REDACTED\", \"devices\": [{\"deviceSerialNumber\": \"REDACTED\", \"deviceTypeId\": \"A2OSP3UA4VC85F\"}]}}}}", "status": "ENABLED"}

Debug line for Sonos, service data { "message": "test", "data": { "type": "tts", "method": "speak" } } (does work)

2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Message: test, kwargs: {'target': ['REDACTEDSERIAL'], 'data': {'type': 'tts', 'method': 'speak'}}
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: REDACTEDSERIAL against (<Entity Vardagsrum: standby>, Vardagsrum, a****************************0cc, media_player.vardagsrum_2)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: REDACTEDSERIAL against (<Entity Sonos One: standby>, Sonos One, 2****************************2f8, media_player.sonos_one_2)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Converting: REDACTEDSERIAL to (entities): <Entity Sonos One: standby>
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: REDACTEDSERIAL against (<Entity Pricken: paused>, Pricken, G************XT5, media_player.pricken)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: REDACTEDSERIAL against (<Entity This Device: standby>, This Device, B****************************C74, media_player.this_device_4)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: REDACTEDSERIAL against (<Entity Kristian's Alexa Apps: standby>, Kristian's Alexa Apps, 6****************************8B5, media_player.kristian_s_alexa_apps)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: REDACTEDSERIAL against (<Entity This Device: standby>, This Device, 1****************************03d, media_player.this_device_3)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Vardagsrum: standby>, Vardagsrum, a****************************0cc, media_player.vardagsrum_2)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Sonos One: standby>, Sonos One, 2****************************2f8, media_player.sonos_one_2)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Converting: <Entity Sonos One: standby> to (entities): <Entity Sonos One: standby>
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Pricken: paused>, Pricken, G************XT5, media_player.pricken)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity This Device: standby>, This Device, B****************************C74, media_player.this_device_4)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Kristian's Alexa Apps: standby>, Kristian's Alexa Apps, 6****************************8B5, media_player.kristian_s_alexa_apps)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity This Device: standby>, This Device, 1****************************03d, media_player.this_device_3)
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] TTS entities: [<Entity Sonos One: standby>]
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [custom_components.alexa_media.notify] TTS by <Entity Sonos One: standby> : test
2019-08-16 22:22:05 DEBUG (SyncWorker_3) [alexapy.alexaapi] Running sequence: Alexa.Speak data: {"behaviorId": "PREVIEW", "sequenceJson": "{\"@type\": \"com.amazon.alexa.behaviors.model.Sequence\", \"startNode\": {\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"Alexa.Speak\", \"operationPayload\": {\"deviceType\": \"A2OSP3UA4VC85F\", \"deviceSerialNumber\": \"REDACTEDSERIAL\", \"locale\": \"en-gb\", \"customerId\": \"REDACTED\", \"textToSpeak\": \"test\"}}}", "status": "ENABLED"}
2019-08-16 22:22:07 DEBUG (Thread-13) [alexapy.alexawebsocket] Received WebSocket MSG.
2019-08-16 22:22:07 DEBUG (Thread-13) [alexapy.alexawebsocket] Received b'MSG 0x00000362 0x71d04211 f 0x00000001 0xdf2c9798 0x00000237 GWM MSG 0x0000b479 0x0000005c urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService:domain:prod:realm:USAmazon 0x00000081 urn:tcomm-endpoint:device:customerId:REDACTED:deviceType:ALEGCNGL9K0HM:deviceSerialNumber:REDACTEDSERIAL {"payload":"{\\"destinationUserId\\":\\"A23OMPP8TJ9THO\\",\\"key\\":{\\"entryId\\":\\"1565986926830#A2OSP3UA4VC85F#REDACTEDSERIAL\\",\\"registeredUserId\\":\\"REDACTED\\"},\\"timestamp\\":1565986927192}","command":"PUSH_ACTIVITY"}FABE'
2019-08-16 22:22:07 DEBUG (Thread-13) [alexapy.alexawebsocket] Received Standard MSG.
2019-08-16 22:22:07 DEBUG (Thread-13) [custom_components.alexa_media] k************i@gmail.com: Received websocket command: PUSH_ACTIVITY : {'destinationUserId': 'REDACTED', 'key': {'entryId': '1565986926830#A2OSP3UA4VC85F#REDACTEDSERIAL', 'registeredUserId': 'REDACTED'}, 'timestamp': 1565986927192}
2019-08-16 22:22:07 DEBUG (Thread-13) [custom_components.alexa_media] k************i@gmail.com: Updated last_called: {'serialNumber': '2****************************2f8', 'timestamp': 1565986927192}
2019-08-16 22:22:07 DEBUG (Thread-13) [custom_components.alexa_media] k************i@gmail.com: last_called changed: {'serialNumber': '2****************************2f8', 'timestamp': 1565986481057} to {'serialNumber': '2****************************2f8', 'timestamp': 1565986927192}
2019-08-16 22:22:07 DEBUG (SyncWorker_4) [custom_components.alexa_media.media_player] Sonos One is last_called: 2****************************2f8

Debug line for Echo dot (notify.alexa_media_MYECHODOTDEVICE), service data { "message": "test", "data": { "type": "announce", "method": "speak" } } (does work):

2019-08-16 21:54:24 DEBUG (SyncWorker_8) [alexapy.alexaapi] Running sequence: Alexa.Speak data: {"behaviorId": "PREVIEW", "sequenceJson": "{\"@type\": \"com.amazon.alexa.behaviors.model.Sequence\", \"startNode\": {\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"Alexa.Speak\", \"operationPayload\": {\"deviceType\": \"A32DOYMUN6DTXA\", \"deviceSerialNumber\": \"REDACTEDSERIAL\", \"locale\": \"en-us\", \"customerId\": \"REDACTED\", \"textToSpeak\": \"test\"}}}", "status": "ENABLED"}
2019-08-16 21:54:25 DEBUG (Thread-13) [alexapy.alexawebsocket] Received WebSocket MSG.
2019-08-16 21:54:25 DEBUG (Thread-13) [alexapy.alexawebsocket] Received b'MSG 0x00000362 0x71c973b2 f 0x00000001 0xd0fcd4e7 0x00000227 GWM MSG 0x0000b479 0x0000005c urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService:domain:prod:realm:USAmazon 0x00000081 urn:tcomm-endpoint:device:customerId:REDACTED:deviceType:ALEGCNGL9K0HM:deviceSerialNumber:REDACTEDSERIAL {"payload":"{\\"destinationUserId\\":\\"REDACTED\\",\\"key\\":{\\"entryId\\":\\"1565985265370#A32DOYMUN6DTXA#REDACTED\\",\\"registeredUserId\\":\\"REDACTED\\"},\\"timestamp\\":1565985265698}","command":"PUSH_ACTIVITY"}FABE'
2019-08-16 21:54:25 DEBUG (Thread-13) [alexapy.alexawebsocket] Received Standard MSG.
2019-08-16 21:54:25 DEBUG (Thread-13) [custom_components.alexa_media] k************i@gmail.com: Received websocket command: PUSH_ACTIVITY : {'destinationUserId': 'REDACTED', 'key': {'entryId': '1565985265370#A32DOYMUN6DTXA#REDACTED', 'registeredUserId': 'REDACTED'}, 'timestamp': 1565985265698}
2019-08-16 21:54:25 DEBUG (Thread-13) [custom_components.alexa_media] k************i@gmail.com: Updated last_called: {'serialNumber': 'G************XT5', 'timestamp': 1565985265698}
2019-08-16 21:54:25 DEBUG (Thread-13) [custom_components.alexa_media] k************i@gmail.com: last_called changed: {'serialNumber': 'G************XT5', 'timestamp': 1565983010478} to {'serialNumber': 'G************XT5', 'timestamp': 1565985265698}
2019-08-16 21:54:25 DEBUG (SyncWorker_13) [custom_components.alexa_media.media_player] Pricken is last_called: G************XT5

@krissen
Copy link

krissen commented Aug 16, 2019

Prior to running the above, I 1) removed alexa_media through HACS. 2) Turned off HA. 3) Removed the pickle file. 4) Checked there no longer was a directory custom_components/alexa_media(there wasn't). 5) Started HA. 6) Installed alexa_media through HACS. 7) Rebooted. 8) Logged into Amazon/alexa_media again. 9) Tested announcements. Worked on Echo dot. Did not work on Sonos. TTS worked on Sonos, too.

@alandtse
Copy link
Owner

If any of you are a 0.96 version or HA and try a 1.3.1 version of the component for comparison that would be helpful. I'm not seeing anything specifically wrong from the output.

I'm working on a revamp major release that may impact the way we interact so may need to table debugging this until we migrate since the way we interact here will be deprecated.

@krissen
Copy link

krissen commented Aug 19, 2019

Don't know if it matters, but I tried pulling the nodestoExecute data, for a routine I had created in the Alexa app for the purpose and noticed

  1. My Sonos device was not listed among devices possible to announce to. Despite that, I can do a manual announcement in the Alexa app, announced on the Sonos. But not create a routine which does it.

  2. Locale, in the nodestoExecute data, is set to en-SE. 🤷‍♂️Haven't seen that before.

{"@type":"com.amazon.alexa.behaviors.model.Automation","automationId":"amzn1.alexa.automation.bed72266-d475-4b07-9530-c3aa81bbe345","name":null,"triggers":[{"payload":{"customerId":"CUSTOMERID","utterance":"make it rain","locale":"en-SE","marketplaceId":"MARKETPLACEID"},"id":"amzn1.alexa.trigger.f6744e87-ad91-4e56-84ca-f8f9efa01270","type":"CustomUtterance","timeLapse":null}],"sequence":{"@type":"com.amazon.alexa.behaviors.model.Sequence","sequenceId":"amzn1.alexa.sequence.e273f122-8f3b-43c8-ba69-aeb1d4e8f932","startNode":{"@type":"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode","type":"AlexaAnnouncement","skillId":"amzn1.ask.1p.messaging","operationPayload":{"expireAfter":"PT5S","content":[{"locale":"en-SE","display":{"title":"Alexa Routines","body":"Testing"},"speak":{"type":"text","value":"Testing"}}],"customerId":"CUSTOMERID","target":{"customerId":"CUSTOMERID"}},"name":null}},"owner":null,"clientAlias":null,"condition":null,"status":"ENABLED","creationTimeEpochMillis":1566242209772,"lastUpdatedTimeEpochMillis":1566242209772}

@alandtse

This comment has been minimized.

@krissen
Copy link

krissen commented Aug 24, 2019

Upgraded, restarted; it is as before. type: announce does not work; type: tts does work.

@krissen
Copy link

krissen commented Aug 24, 2019

Debug output of (failed) type: announce:

2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Message: test, kwargs: {'target': ['REDACTED'], 'data': {'type': 'announce', 'method': 'all'}}
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Vardagsrum: standby>, Vardagsrum, a****************************0cc, media_player.vardagsrum_2)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Sonos One: standby>, Sonos One, 2****************************2f8, media_player.sonos_one_2)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Converting: REDACTED to (entities): <Entity Sonos One: standby>
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Pricken: paused>, Pricken, G************XT5, media_player.pricken)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity This Device: standby>, This Device, B****************************C74, media_player.this_device_4)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Kristian's Alexa Apps: standby>, Kristian's Alexa Apps, 6****************************8B5, media_player.kristian_s_alexa_apps)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity This Device: standby>, This Device, 1****************************03d, media_player.this_device_3)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Vardagsrum: standby>, Vardagsrum, a****************************0cc, media_player.vardagsrum_2)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Sonos One: standby>, Sonos One, 2****************************2f8, media_player.sonos_one_2)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Converting: <Entity Sonos One: standby> to (serialnumbers): REDACTED
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Pricken: paused>, Pricken, G************XT5, media_player.pricken)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity This Device: standby>, This Device, B****************************C74, media_player.this_device_4)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Kristian's Alexa Apps: standby>, Kristian's Alexa Apps, 6****************************8B5, media_player.kristian_s_alexa_apps)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity This Device: standby>, This Device, 1****************************03d, media_player.this_device_3)
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] Announce targets: ['2****************************2f8'] entities: [<Entity Sonos One: standby>]
2019-08-24 08:25:40 DEBUG (MainThread) [custom_components.alexa_media.notify] k************i@gmail.com: Announce by <Entity Sonos One: standby> to targets: ['2****************************2f8']: test
2019-08-24 08:25:40 DEBUG (MainThread) [alexapy.alexaapi] Running sequence: AlexaAnnouncement data: {"behaviorId": "PREVIEW", "sequenceJson": "{\"@type\": \"com.amazon.alexa.behaviors.model.Sequence\", \"startNode\": {\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"AlexaAnnouncement\", \"operationPayload\": {\"deviceType\": \"A2OSP3UA4VC85F\", \"deviceSerialNumber\": \"REDACTED\", \"locale\": \"en-gb\", \"customerId\": \"A23OMPP8TJ9THO\", \"expireAfter\": \"PT5S\", \"content\": [{\"locale\": \"en-gb\", \"display\": {\"title\": \"Home Assistant\", \"body\": \"test\"}, \"speak\": {\"type\": \"text\", \"value\": \"test\"}}], \"target\": {\"customerId\": \"REDACTED\", \"devices\": [{\"deviceSerialNumber\": \"REDACTED\", \"deviceTypeId\": \"A2OSP3UA4VC85F\"}]}}}}", "status": "ENABLED"}

Debug output of (successful) type: tts:

2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Message: test, kwargs: {'target': ['REDACTED'], 'data': {'type': 'tts', 'method': 'all'}}
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Vardagsrum: standby>, Vardagsrum, a****************************0cc, media_player.vardagsrum_2)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Sonos One: standby>, Sonos One, 2****************************2f8, media_player.sonos_one_2)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Converting: REDACTED to (entities): <Entity Sonos One: standby>
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Pricken: paused>, Pricken, G************XT5, media_player.pricken)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity This Device: standby>, This Device, B****************************C74, media_player.this_device_4)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity Kristian's Alexa Apps: standby>, Kristian's Alexa Apps, 6****************************8B5, media_player.kristian_s_alexa_apps)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: REDACTED against (<Entity This Device: standby>, This Device, 1****************************03d, media_player.this_device_3)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Vardagsrum: standby>, Vardagsrum, a****************************0cc, media_player.vardagsrum_2)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Sonos One: standby>, Sonos One, 2****************************2f8, media_player.sonos_one_2)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Converting: <Entity Sonos One: standby> to (entities): <Entity Sonos One: standby>
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Pricken: paused>, Pricken, G************XT5, media_player.pricken)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity This Device: standby>, This Device, B****************************C74, media_player.this_device_4)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity Kristian's Alexa Apps: standby>, Kristian's Alexa Apps, 6****************************8B5, media_player.kristian_s_alexa_apps)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] Testing item: <Entity Sonos One: standby> against (<Entity This Device: standby>, This Device, 1****************************03d, media_player.this_device_3)
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] TTS entities: [<Entity Sonos One: standby>]
2019-08-24 08:30:58 DEBUG (MainThread) [custom_components.alexa_media.notify] TTS by <Entity Sonos One: standby> : test
2019-08-24 08:30:58 DEBUG (MainThread) [alexapy.alexaapi] Running sequence: Alexa.Speak data: {"behaviorId": "PREVIEW", "sequenceJson": "{\"@type\": \"com.amazon.alexa.behaviors.model.Sequence\", \"startNode\": {\"@type\": \"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\", \"type\": \"Alexa.Speak\", \"operationPayload\": {\"deviceType\": \"A2OSP3UA4VC85F\", \"deviceSerialNumber\": \"REDACTED\", \"locale\": \"en-gb\", \"customerId\": \"REDACTED\", \"textToSpeak\": \"test\"}}}", "status": "ENABLED"}
2019-08-24 08:31:00 DEBUG (MainThread) [alexapy.alexawebsocket] msg: WSMessage(type=<WSMsgType.BINARY: 2>, data=b'MSG 0x00000362 0x6137ac19 f 0x00000001 0xda5ecc6c 0x00000237 GWM MSG 0x0000b479 0x0000005c urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService:domain:prod:realm:USAmazon 0x00000081 urn:tcomm-endpoint:device:customerId:REDACTED:deviceType:ALEGCNGL9K0HM:deviceSerialNumber:REDACTED {"payload":"{\\"destinationUserId\\":\\"REDACTED\\",\\"key\\":{\\"entryId\\":\\"1566628259577#A2OSP3UA4VC85F#REDACTED\\",\\"registeredUserId\\":\\"REDACTED\\"},\\"timestamp\\":1566628259917}","command":"PUSH_ACTIVITY"}FABE', extra='')
2019-08-24 08:31:00 DEBUG (MainThread) [alexapy.alexawebsocket] Received WebSocket MSG.
2019-08-24 08:31:00 DEBUG (MainThread) [alexapy.alexawebsocket] Received b'MSG 0x00000362 0x6137ac19 f 0x00000001 0xda5ecc6c 0x00000237 GWM MSG 0x0000b479 0x0000005c urn:tcomm-endpoint:service:serviceName:DeeWebsiteMessagingService:domain:prod:realm:USAmazon 0x00000081 urn:tcomm-endpoint:device:customerId:A23OMPP8TJ9THO:deviceType:ALEGCNGL9K0HM:deviceSerialNumber:REDACTED {"payload":"{\\"destinationUserId\\":\\"REDACTED\\",\\"key\\":{\\"entryId\\":\\"1566628259577#A2OSP3UA4VC85F#REDACTED\\",\\"registeredUserId\\":\\"REDACTED\\"},\\"timestamp\\":1566628259917}","command":"PUSH_ACTIVITY"}FABE'
2019-08-24 08:31:00 DEBUG (MainThread) [alexapy.alexawebsocket] Received Standard MSG.
2019-08-24 08:31:00 DEBUG (MainThread) [custom_components.alexa_media] k************i@gmail.com: Received websocket command: PUSH_ACTIVITY : {'destinationUserId': 'REDACTED', 'key': {'entryId': '1566628259577#A2OSP3UA4VC85F#REDACTED', 'registeredUserId': 'REDACTED'}, 'timestamp': 1566628259917}
2019-08-24 08:31:00 DEBUG (MainThread) [custom_components.alexa_media] k************i@gmail.com: Updated last_called: {'serialNumber': '2****************************2f8', 'timestamp': 1566628259917}
2019-08-24 08:31:00 DEBUG (MainThread) [custom_components.alexa_media] k************i@gmail.com: last_called changed: {'serialNumber': '2****************************2f8', 'timestamp': 1566628096869} to {'serialNumber': '2****************************2f8', 'timestamp': 1566628259917}
2019-08-24 08:31:00 DEBUG (MainThread) [custom_components.alexa_media.media_player] Sonos One is last_called: 2****************************2f8

@krissen
Copy link

krissen commented Aug 24, 2019

As mentioned previously, I can not create a routine, in the Alexa app, which would trigger announcement on the Sonos. (Only my Dot is listed as a valid device for the function.) I don't know if I was able to, earlier; never tried it.

What I can do, from the Alexa app, is to use the "Communicate" tab, and send an announcement that way to all devices. (Can't seem to specify only one device.) Doesn't work quite the same way as the announce available as routine though. Instead of just "Bling Test", I get "Bling From NAME, Test". That gets broadcasted to both the Sonos and the Echo Dot.

@alandtse
Copy link
Owner

@krissen Thanks for the help debugging, I really appreciate the log generation even if I'm not directly responding. The reason I try to get the routine info is that at least can show us acceptable syntax. Again, the syntax looks fine, so I'm a bit stumped. The fact it's not an option in the routine makes me think perhaps Amazon stopped supporting it?

Some additional tests I can think of:

  • Are you able to create a whole house audio group and add in the sonos and dot and then try announcing to the group? (HA group won't work because we just iterate within the group). I'm trying to figure out how the "Communicate" tab differs.
  • You mentioned this worked before 1.4.x right? Can you try going back to 1.3.1?
  • Are you testing using a dev_service call or using an automation/script? I just want to eliminate the chance you may be issuing multiple commands like a volume set immediately before the announce. We have seen issues where multiple commands results in erratic completion of commands.

@krissen
Copy link

krissen commented Aug 24, 2019

Whole house audio group. Normal Alexa-groups doesn't seem to support more than one speaker. Tried to create a multi-room music group, but was told no compatible speakers were found. So far, I haven't been able to find a way to create a group within Alexa, for the two speakers.

1.3.1 Tried that some days ago, but seemed the alexa_media -component wouldn't run? I don't recall the exact errors; sorry. Also downgraded alexapy, but that didn't help. I thought that maybe 1.3.1 required HA < 0.97? (I'm on 0.97.2. If it can be avoided, I'd rather not downgrade HA itself.)

Testing via dev_service. (Though I've tested via automations as well.)

Let me know if you've got something else to try or troubleshoot. Testing custom .py files or the like is fine as well.

@alandtse alandtse changed the title Announcement on Sonos Speakers Announcement stopped working on Sonos Speakers Aug 30, 2019
@alandtse alandtse added the bug Something isn't working label Aug 30, 2019
@mikkelke
Copy link
Author

mikkelke commented Sep 3, 2019

I contected Amazon severeal times and thay could not tell me why it stopped working. They say the escalated my issue to techincal team but I never got a responds.
Since i use the announcement for my doorbell (I can enable the old ringer) I will try to change to Google Assistant. Thanks for the help and support.

@martin3000

This comment has been minimized.

@alandtse

This comment has been minimized.

@gericho
Copy link

gericho commented Sep 27, 2019

same here, both on Echo Dot and Echo Spot announcements stopped working, TTS does work. (amazon.it)

@martin3000

This comment has been minimized.

@krissen
Copy link

krissen commented Oct 12, 2019

Just updating to say, that matters are still functioning, or not, in the same manner in v2.3.2 as before. That is, TTS works; announce does not, on a Sonos.

@alandtse
Copy link
Owner

@krissen thanks for the update. What may be helpful is to see if the routine mechanism ever starts working. As soon as it does, then I think we can edit the command to follow that.

@SamB-GB
Copy link

SamB-GB commented Oct 14, 2019

Is there any advantage of using Announce rather than TTS since TTS works?

@krissen
Copy link

krissen commented Oct 14, 2019

Is there any advantage of using Announce rather than TTS since TTS works?

Minor advantage: it adds a chime prior to the message. Sounds trivial, but it's nice. 🤷‍♂️ Could be achieved by playing a custom sound prior to message, too.

@ehendrix23
Copy link

With announcement there are also other things possible like change voice, intonation, ....

@SamB-GB
Copy link

SamB-GB commented Oct 14, 2019

I know over at Smartthings I used to use an application that's called EchoSpeaks and he could never integrate the Sonos as Amazon doesn't treat these like true Alexa devices apparently.

@Flight777
Copy link

Sames issues here, must be a Sonos thing... Like SamB-GB set, they are always a little bit special in Alexa's eyes.

@septeven

This comment has been minimized.

@alandtse

This comment has been minimized.

@septeven

This comment has been minimized.

@alandtse

This comment has been minimized.

@septeven

This comment has been minimized.

@SamB-GB

This comment has been minimized.

@alandtse

This comment has been minimized.

@CiquattroFPV
Copy link

Sames issues here, must be a Sonos thing... Like SamB-GB set, they are always a little bit special in Alexa's eyes.

I have a bose and I have the same issue the announce feature seems don't work

@alandtse alandtse pinned this issue Dec 20, 2019
@alandtse alandtse changed the title Announcement stopped working on Sonos Speakers and ecobee4 Announcement stopped working on third party devices: Sonos Speakers, ecobee4, Bose Dec 20, 2019
@alandtse alandtse added the amazonissue Issue needs to have a change made by Amazon label Dec 29, 2019
@justinhelmer
Copy link

Unlike others, tts does not work for me either, on my Bose devices.

announce and tts both work on my Echo, but neither work on my Bose devices.

@alandtse alandtse removed the bug Something isn't working label Jun 24, 2020
@github-actions
Copy link

Stale issue message

@beyer-martin
Copy link

I'm having the same issue on my bose smart speaker, tts works but announce does not

@mcc05
Copy link

mcc05 commented Aug 9, 2022

Same here Yamaha YAS-109, tts works but announce does not. Alexa app announce works however

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amazonissue Issue needs to have a change made by Amazon no-issue-activity
Projects
None yet
Development

No branches or pull requests