Using Sonos Speakers as Alexa Echo via Amazon Echo Control Binding--> Sonos Arc works, Sonos Move not

I’ve several Sonos speakers. I added a Sonos ARC as Amazon Echo device, so that I can use the text to speach channel.

With my Sonos Arc everything works fine, but my Sonos Move doesn’t work as an Amazon Echo device.

Let me explain the configuration of the Sonos Arc as Echo Device: I Installed the Amazon Echo Control Binding.
And I grapped the serial number of my Arc here.

http://openhabian:8080/amazonechocontrol/AmazonAccount

After that I manually added an Amazon echo device.
You can’t use the scan function from the binding to recognize an Sonos speaker as Amazon echo device.

And here the channel linked to the Item “AmazonArc_Sprich”

And the following ECMA Script works fine, with an perfect amazon voice (neural quality)

items.getItem("AmazonArc_Sprich").sendCommand("<speak> <voice language=\"en-AU\">Hello World </voice> </speak> ");

I can setup a Thing with my Sonos Move as Amazon Echo device, it even gets Online and I can link the text to Speech Channel to an Item also. It’s possible to send commands to the Item in the same way, but i can’t here anything.

After bit testing I figured out, the following speakers works as Echo:

  • Sonos Arc
  • Sonos Beam Gen 1
  • Sonos Beam Gen 2 (tested by @pleedell )
  • Sonos Roam
  • Sonos Move
  • Sonos One

And following not:

  • with the solution described below in the discussion all works (thank to @the-ninth)

Has anybody an idea how to configure the One, Move or Roam?

I know, that I can use the Amazon Polly binding and use the native openhab voice/say command, but with the Echo device I everthing is faster and sounds much better, and I can use the neural voices for free.

And Sorry for my bad english, I’m not a native speaker…

Here a linked issue/post for the bug with the Volume:
https://community.openhab.org/t/update-state-of-channel-without-updating-device-amazon-echo-control-volume/144046/9

1 Like

Works like a charm on Sonos Beam 2. Thanks much for the thing setup tutorial, this should be added to either the sonos or echo binding documentation.

Cheers

Maybe using audio sink as discussed here will be a workaround for you?

Yup, both approaches work fine.
TTS to sonos beam via audio sink and TTS to sonos beam via echo configuration (from the binding config page).

In my opinion the approach with the echo has some advantages.

It sounds better, because of the Amazon neuronal voices. And if you are playing music, the volume of the music would be reduced and the voice speaks parallel the music. When the voice has finished speaking, the volume of the Music would be increased again.

The approach with the audio sink would stop and start the music with some delays.

But the question is:
What I can do, to run a Sonos Roam, Sonos Move or Sonos One as Echo?

Agreed, the amazon alexa voice agent is the way to go, but nice to have more than one options. As for the other sonos devices I’d guess that they have to register their alexa voice agents in exactly the same way as the beam or the echo.

Blockquote …this should be added to either the sonos or echo binding documentation. …

Any Idea how to do that?

Using the echo control binding link appears to be documented (at least lightly) at Amazon Echo Control - Bindings | openHAB

This functionality is quite useful when trying to use the echo control binding for non-amazon devices that use alexa. I’ve used it successfully now for a sonos soundbar and also on ecobee thermostats that aren’t directly discoverable by the echocontrol binding.

Cheers

Good morning,

Did anyone test this yet with OH 3.4.0?

I just tried with a Sonos Beam (I think it is 2nd generation) and a Sonos One. I can add both of them as Things and they are shown as Online, but sending a command to the textToSpeech channel does not do anything. I also added an Echo Dot, and there it works fine.

Here is the code I used, more or less copied from the postings above:

var echo = items.getItem( "Amazon_Schlafzimmer_Speak" );
echo.sendCommand( "<speak> <voice language=\"en-AU\">Hello World </voice> </speak>" );

Does the Echo binding have some kind of debug logging? Right now there are no entries in the log files from the binding.

I’ve openHAB 3.4.1 and it works.
And i tried this code, that is very similar to yours and it works:

var echoTest = items.getItem( "AmazonBeam_Sprich" );
echoTest.sendCommand( "<speak> <voice language=\"en-AU\">Hello World </voice> </speak>" );

But there is a seperate volumecontrol for TextToSpeech.

With the german translation of the Amazonbinding, it is something like that.

 items.getItem("AmazonBeam_SprichLautstarke").sendCommand(30);

Maybay the Echo Binding has a debug logging. I think we could increase the debuglevel somehow over the karaf console. But I don’t know much about that…

I looked at this a bit further. I can actually control all my Sonos (Amps, Ones and a Beam) via the Echo binding as music player, so in principle the connection seems to work, only the speak channel does not.

When looking at the Sonos devices in the Amazon Echo Control page (http://<My openHAB IP>:8080/amazonechocontrol), they are listed as THIRD_PARTY_AVS_MEDIA_DISPLAY, and when clicking on the link in the Thing column, under Capabilities they do not have ALEXA_VOICE listed. For our Echo Dot devices ALEXA_VOICE is listed and for them also the speak command works.

How does this look like in your system?

that was a good hint. Each Sonos Speaker appears as two different devices in the device overview.

And i seems as the “Family” is the crucial point
THIRD_PARTY_AVS_SONOS_BOOTLEG → TextToSpeech does work
THIRD_PARTY_AVS_MEDIA_DISPLAY → TextToSpeech doesn`t work

I don´t no why there are two devices, it must be something within the alexa app. I´m going to investigate that at the weekend.

Here an example. Both marked lines are the same Sonos One Speaker.

Interesting, so I have to find a way to get these SONOS_BOOTLEG devices into my system. Looking forward to the result of your investigation. :slight_smile:

And I am wondering why “BOOTLEG” - it reminds me of the time when I was still trading recordings of my favorite bands concerts over mail. :wink:

OK, got it to work now. :slight_smile:

To get the BOOTLEG devices I removed the Alexa voice assistant in the Sonos app, removed the devices in the Alexa app, then re-added the Alexa voice assistant in the Sonos app and with that got everything back in the Alex app. Now for all Sonos devices that have Alexa enabled I also got two devices in the Amazon Echo Control page, one with family “THIRD_PARTY_AVS_MEDIA_DISPLAY” and another with “THIRD_PARTY_AVS_SONOS_BOOTLEG”.

And for the Things created with the serial number of the “THIRD_PARTY_AVS_SONOS_BOOTLEG” device, the speak channel now works. In my case this are Sonos Ones (2nd generation) and a Sonos Beam. @ML1982, have you in the meantime been able to get it to work on your Ones?

What does not work is use Sonos devices that do not support Alexa because of the lack of microphone, such as the Amp or One SL. For those there is no “THIRD_PARTY_AVS_SONOS_BOOTLEG” device with the ALEXA_VOICE capability that seems to be needed for the speak channel to work.

Another small issue I have found is that it seems the volume channel of the Echo thing does not get updated if I change the volume via the Sonos binding or the Sonos app. But when using the speak channel while playing music, the volume of the music then gets set to the value the volume channel of the Echo Thing, not the actual volume that was playing via Sonos.

This can be remedied by setting the Echo volume to the Sonos volume before issuing the voice command:

items.getItem( "Echo_Control_Sonos_Badezimmer_Volume" ).sendCommand( items.getItem( "Sonos_Badezimmer_Volume" ).state );
items.getItem( "Echo_Control_Sonos_Badezimmer_Speak" ).sendCommand( '<speak>Hello World!</speak>' );

And I have another issue/question that may be a bit off-topic because it is probably not related to Sonos. I’d like to use the speak channel to play a notification sound via the <audio> tag. However that does seem to work only in conjunction with text.

This works, with spoken text:
<speak>Now comes the sound: <audio src="soundbank://soundlibrary/home/amzn_sfx_doorbell_chime_01"/></speak>

Without spoken text it does not work:
<speak><audio src="soundbank://soundlibrary/home/amzn_sfx_doorbell_chime_01"/></speak>

Does anyone has an idea how to make a notification sound work without spoken text?

Why I want to do that? There is a notification sound channel in the Sonos binding that could do this as well, but with that, any music played from Spotify Connect is stopped and not restarted after the notification. When using the speak channel via the Echo binding that is not an issue, music continues to play.

1 Like

I created an issue for this - not sure if developers want to look into it, since I guess Sonos devices are not officially supported as per the documentation, but still it would be neat if it would work. :slight_smile:

@the-ninth
I got all my Sonos devices working. (Arc, Beam, Move, Roam, One) The crucial point, is, as assumed the “Family” that must be THIRD_PARTY_AVS_SONOS_BOOTLEG.
Thanks a lot for your input.

I can confirm the bug you figured out, concerning the volume. I’m using the workaround you suggested.

I can also confirm the behaviour concerning playing the notification sound.
I’ve tested this workaround successfully.

let MessageToSay = "<speak>  <prosody volume=\"silent\">dummy</prosody> <audio src=\"soundbank://soundlibrary/home/amzn_sfx_doorbell_chime_01\"/></speak>";
    
items.getItem("ArbeitszimmerAmazonMove_Sprich").sendCommand(MessageToSay);

you wouldn’t here the word “dummy” but the notification.

But I’ve another question. In my opinion the voice is played a little bit delayed. Between 3-5s after sending the command to the item. (I don’t mean the first execution of the script, that is always slow.)
Can you confirm that? Is there a difference between your Sonos Devices and the Echo Dot. I don’t have a dot anymore. Thats why i’m asking.
And any ideas how to reduce the delay?

A similar issue is this Git Hub Issue 14318

Thanks, works for me as well!

Yes, I also have that delay, and it is the same on the Echo and the Sonos devices.

I have now activated debug logging on the Karaf console with log:set DEBUG org.openhab.binding.amazonechocontrol. Here are the entries that are now shown when sending a command to the speak channel. It seems everything happens fairly quickly, with the exception of the very last entry. Not sure what that thread/device “174564037” is about, but it seems to get removed only after the voice message is played. Everything else happens before the voice message is played.

2023-02-04 06:26:44.012 [DEBUG] [mazonechocontrol.internal.Connection] - added 174564037 device a4be996f491e47f1a09892a7f8c4d446 
2023-02-04 06:26:44.287 [DEBUG] [mazonechocontrol.internal.Connection] - thread 174564037 device 
2023-02-04 06:26:44.288 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.de/api/behaviors/preview
2023-02-04 06:26:44.288 [DEBUG] [mazonechocontrol.internal.Connection] - POST: {"behaviorId":"PREVIEW","sequenceJson":"{\"@type\":\"com.amazon.alexa.behaviors.model.Sequence\",\"startNode\":{\"@type\":\"com.amazon.alexa.behaviors.model.SerialNode\",\"nodesToExecute\":[{\"@type\":\"com.amazon.alexa.behaviors.model.ParallelNode\",\"nodesToExecute\":[{\"@type\":\"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\",\"type\":\"Alexa.DeviceControls.Volume\",\"operationPayload\":{\"deviceType\":\"AVD3HM0HOJAAL\",\"deviceSerialNumber\":\"a4be996f491e47f1a09892a7f8c4d446\",\"locale\":\"\",\"customerId\":\"A1LMGQTD3VDC7X\",\"value\":20}}]},{\"@type\":\"com.amazon.alexa.behaviors.model.ParallelNode\",\"nodesToExecute\":[{\"@type\":\"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\",\"type\":\"Alexa.Speak\",\"operationPayload\":{\"deviceType\":\"AVD3HM0HOJAAL\",\"deviceSerialNumber\":\"a4be996f491e47f1a09892a7f8c4d446\",\"locale\":\"\",\"customerId\":\"A1LMGQTD3VDC7X\",\"textToSpeak\":\"Das ist ein Test!\"}}]}]}}","status":"ENABLED"}
2023-02-04 06:26:44.512 [DEBUG] [control.internal.handler.EchoHandler] - Handle updateState amazonechocontrol:echo:85dfcc877e
2023-02-04 06:26:44.513 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.de/api/np/player?deviceSerialNumber=a4be996f491e47f1a09892a7f8c4d446&deviceType=AVD3HM0HOJAAL&screenWidth=1440
2023-02-04 06:26:44.513 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.de/api/behaviors/preview succeeded
2023-02-04 06:26:44.626 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.de/api/np/player?deviceSerialNumber=a4be996f491e47f1a09892a7f8c4d446&deviceType=AVD3HM0HOJAAL&screenWidth=1440 succeeded
2023-02-04 06:26:44.626 [DEBUG] [mazonechocontrol.internal.Connection] - Result of GET https://alexa.amazon.de/api/np/player?deviceSerialNumber=a4be996f491e47f1a09892a7f8c4d446&deviceType=AVD3HM0HOJAAL&screenWidth=1440:{"playerInfo":{"hint":null,"infoText":null,"isPlayingInLemur":false,"lemurVolume":null,"lyrics":null,"mainArt":null,"mediaId":null,"miniArt":null,"miniInfoText":null,"playbackSource":null,"playingInLemurId":null,"progress":null,"provider":null,"quality":null,"queueId":null,"state":null,"template":null,"transport":null,"upNextItems":null,"volume":null}}
2023-02-04 06:26:44.877 [DEBUG] [control.internal.WebSocketConnection] - Message received: {"command":"PUSH_VOLUME_CHANGE","payload":"{\"destinationUserId\":\"A1LMGQTD3VDC7X\",\"dopplerId\":{\"deviceType\":\"AVD3HM0HOJAAL\",\"deviceSerialNumber\":\"a4be996f491e47f1a09892a7f8c4d446\"},\"volumeSetting\":20,\"isMuted\":false}","timeStamp":1675488404797}
2023-02-04 06:26:44.878 [DEBUG] [control.internal.handler.EchoHandler] - Handle push command PUSH_VOLUME_CHANGE
2023-02-04 06:26:45.336 [DEBUG] [control.internal.WebSocketConnection] - Message received: {"command":"PUSH_ACTIVITY","payload":"{\"destinationUserId\":\"A1LMGQTD3VDC7X\",\"timestamp\":1675488405220,\"key\":{\"registeredUserId\":\"A1LMGQTD3VDC7X\",\"entryId\":\"1675488405192#AVD3HM0HOJAAL#a4be996f491e47f1a09892a7f8c4d446\"}}","timeStamp":null}
2023-02-04 06:26:45.336 [DEBUG] [mazonechocontrol.internal.Connection] - Make request to https://alexa.amazon.de/api/activities?startTime=1675488405220&size=10&offset=1
2023-02-04 06:26:45.532 [DEBUG] [mazonechocontrol.internal.Connection] - Call to https://alexa.amazon.de/api/activities?startTime=1675488405220&size=10&offset=1 succeeded
2023-02-04 06:26:45.534 [DEBUG] [mazonechocontrol.internal.Connection] - Result of GET https://alexa.amazon.de/api/activities?startTime=1675488405220&size=10&offset=1:{"activities":[{"_disambiguationId":null,"activityStatus":"SUCCESS","creationTimestamp":1675488405192,"description":"{\"summary\":\"\",\"firstUtteranceId\":\"AVD3HM0HOJAAL:1.0/2023/02/04/05/DEVICE_UNSPECIFIED/26:44::TNIH_2V.amzn1.alexa.skillConnections.tzullz.0c94be93-6069-4ca0-8c13-083eab57022aLPM\",\"firstStreamId\":null}","domainAttributes":"{\"allowAnalysis\":true,\"applicationMetadata\":{\"applicationId\":\"amzn1.ask.skill.fbc8bd0f-13ee-48c3-8f88-0deee48c5740\",\"applicationName\":\"Simon Says EU\",\"vendorId\":\"MFA1URM5Z2P1S\",\"initiator\":\"Routines\",\"privacyAndComplianceMetadata\":null},\"card\":null,\"redacted\":false}","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675488405192#AVD3HM0HOJAAL#a4be996f491e47f1a09892a7f8c4d446","intentType":null,"providerInfoDescription":"This request was sent to Simon Says EU","registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"AVD3HM0HOJAAL","serialNumber":"a4be996f491e47f1a09892a7f8c4d446"}],"utteranceId":"AVD3HM0HOJAAL:1.0/2023/02/04/05/DEVICE_UNSPECIFIED/26:44::TNIH_2V.amzn1.alexa.skillConnections.tzullz.0c94be93-6069-4ca0-8c13-083eab57022aLPM","version":1},{"_disambiguationId":null,"activityStatus":"SUCCESS","creationTimestamp":1675488305170,"description":"{\"summary\":\"\",\"firstUtteranceId\":\"AVD3HM0HOJAAL:1.0/2023/02/04/05/DEVICE_UNSPECIFIED/25:04::TNIH_2V.amzn1.alexa.skillConnections.tzullz.55aaf93e-41ac-46c7-b518-47c3343f5850LPM\",\"firstStreamId\":null}","domainAttributes":"{\"allowAnalysis\":true,\"applicationMetadata\":{\"applicationId\":\"amzn1.ask.skill.fbc8bd0f-13ee-48c3-8f88-0deee48c5740\",\"applicationName\":\"Simon Says EU\",\"vendorId\":\"MFA1URM5Z2P1S\",\"initiator\":\"Routines\",\"privacyAndComplianceMetadata\":null},\"card\":null,\"redacted\":false}","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675488305170#AVD3HM0HOJAAL#a4be996f491e47f1a09892a7f8c4d446","intentType":null,"providerInfoDescription":"This request was sent to Simon Says EU","registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"AVD3HM0HOJAAL","serialNumber":"a4be996f491e47f1a09892a7f8c4d446"}],"utteranceId":"AVD3HM0HOJAAL:1.0/2023/02/04/05/DEVICE_UNSPECIFIED/25:04::TNIH_2V.amzn1.alexa.skillConnections.tzullz.55aaf93e-41ac-46c7-b518-47c3343f5850LPM","version":1},{"_disambiguationId":null,"activityStatus":"SUCCESS","creationTimestamp":1675487915041,"description":"{\"summary\":\"\",\"firstUtteranceId\":\"AVD3HM0HOJAAL:1.0/2023/02/04/05/DEVICE_UNSPECIFIED/18:34::TNIH_2V.amzn1.alexa.skillConnections.tzullz.560ee306-748d-40fa-8ac3-4b5b547a91acLPM\",\"firstStreamId\":null}","domainAttributes":"{\"allowAnalysis\":true,\"applicationMetadata\":{\"applicationId\":\"amzn1.ask.skill.fbc8bd0f-13ee-48c3-8f88-0deee48c5740\",\"applicationName\":\"Simon Says EU\",\"vendorId\":\"MFA1URM5Z2P1S\",\"initiator\":\"Routines\",\"privacyAndComplianceMetadata\":null},\"card\":null,\"redacted\":false}","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675487915041#AVD3HM0HOJAAL#a4be996f491e47f1a09892a7f8c4d446","intentType":null,"providerInfoDescription":"This request was sent to Simon Says EU","registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"AVD3HM0HOJAAL","serialNumber":"a4be996f491e47f1a09892a7f8c4d446"}],"utteranceId":"AVD3HM0HOJAAL:1.0/2023/02/04/05/DEVICE_UNSPECIFIED/18:34::TNIH_2V.amzn1.alexa.skillConnections.tzullz.560ee306-748d-40fa-8ac3-4b5b547a91acLPM","version":1},{"_disambiguationId":null,"activityStatus":"SUCCESS","creationTimestamp":1675487833566,"description":"{\"summary\":\"\",\"firstUtteranceId\":\"AVD3HM0HOJAAL:1.0/2023/02/04/05/DEVICE_UNSPECIFIED/17:13::TNIH_2V.amzn1.alexa.skillConnections.tzullz.1d5e5cbb-1f2a-4711-a12d-0f1e0cd017bbLPM\",\"firstStreamId\":null}","domainAttributes":"{\"allowAnalysis\":true,\"applicationMetadata\":{\"applicationId\":\"amzn1.ask.skill.fbc8bd0f-13ee-48c3-8f88-0deee48c5740\",\"applicationName\":\"Simon Says EU\",\"vendorId\":\"MFA1URM5Z2P1S\",\"initiator\":\"Routines\",\"privacyAndComplianceMetadata\":null},\"card\":null,\"redacted\":false}","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675487833566#AVD3HM0HOJAAL#a4be996f491e47f1a09892a7f8c4d446","intentType":null,"providerInfoDescription":"This request was sent to Simon Says EU","registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"AVD3HM0HOJAAL","serialNumber":"a4be996f491e47f1a09892a7f8c4d446"}],"utteranceId":"AVD3HM0HOJAAL:1.0/2023/02/04/05/DEVICE_UNSPECIFIED/17:13::TNIH_2V.amzn1.alexa.skillConnections.tzullz.1d5e5cbb-1f2a-4711-a12d-0f1e0cd017bbLPM","version":1},{"_disambiguationId":null,"activityStatus":"DISCARDED_NON_DEVICE_DIRECTED_INTENT","creationTimestamp":1675456080410,"description":"{\"summary\":\"\",\"firstUtteranceId\":\"Alexa3P:1.0/2023/02/03/20/DEVICE_UNSPECIFIED/28:00::TNIH_2V.5fc54f7d-6280-446c-81f8-ba5e3a283aeeLPM\",\"firstStreamId\":\"Alexa3P:1.0/2023/02/03/20/DEVICE_UNSPECIFIED/28:00::TNIH_2V.5fc54f7d-6280-446c-81f8-ba5e3a283aeeLPM\"}","domainAttributes":"FALSE_WAKE_WORD_1P","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675456080410#A3NPD82ABCPIDP#27419407dda449d8b56f9c173859c43a","intentType":null,"providerInfoDescription":null,"registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"A3NPD82ABCPIDP","serialNumber":"27419407dda449d8b56f9c173859c43a"}],"utteranceId":"Alexa3P:1.0/2023/02/03/20/DEVICE_UNSPECIFIED/28:00::TNIH_2V.5fc54f7d-6280-446c-81f8-ba5e3a283aeeLPM","version":1},{"_disambiguationId":null,"activityStatus":"DISCARDED_NON_DEVICE_DIRECTED_INTENT","creationTimestamp":1675449927259,"description":"{\"summary\":\"\",\"firstUtteranceId\":\"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.26e1dd91-36ca-48b1-9dd8-383c2a5189fdLPM\",\"firstStreamId\":\"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.26e1dd91-36ca-48b1-9dd8-383c2a5189fdLPM\"}","domainAttributes":"ASR_TIMEOUT","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675449927259#AVD3HM0HOJAAL#66c9352b0ce246aa882e2f1c139c9121","intentType":null,"providerInfoDescription":null,"registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"AVD3HM0HOJAAL","serialNumber":"66c9352b0ce246aa882e2f1c139c9121"}],"utteranceId":"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.26e1dd91-36ca-48b1-9dd8-383c2a5189fdLPM","version":1},{"_disambiguationId":null,"activityStatus":"PUBLISH","creationTimestamp":1675449924117,"description":"{\"summary\":\"\",\"firstUtteranceId\":\"A3NPD82ABCPIDP:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:24::TNIH_2V.3d777770-f93f-432b-aa68-dc0ab517082dLPM\",\"firstStreamId\":\"A3NPD82ABCPIDP:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:24::TNIH_2V.3d777770-f93f-432b-aa68-dc0ab517082dLPM\"}","domainAttributes":"{\"contentId\":\"AlexaPleasantryService/v1/61f88902-dd7a-4727-9a9d-8268d91c746d\",\"contentText\":\"<speak><break time=\\\"500ms\\\"/><prosody volume=\\\"x-loud\\\">Hab einen schönen <emphasis level=\\\"moderate\\\">Abend<\\/emphasis>.\\n<\\/prosody><\\/speak>\"}","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675449924117#A3NPD82ABCPIDP#27419407dda449d8b56f9c173859c43a","intentType":null,"providerInfoDescription":null,"registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"A3NPD82ABCPIDP","serialNumber":"27419407dda449d8b56f9c173859c43a"}],"utteranceId":"A3NPD82ABCPIDP:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:24::TNIH_2V.3d777770-f93f-432b-aa68-dc0ab517082dLPM","version":1},{"_disambiguationId":null,"activityStatus":"SUCCESS","creationTimestamp":1675449923293,"description":"{\"summary\":\"wie spät ist es\",\"firstUtteranceId\":\"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.8aa4a567-9313-4cf1-afac-7081a3ae4167LPM/1\",\"firstStreamId\":\"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.8aa4a567-9313-4cf1-afac-7081a3ae4167LPM\"}","domainAttributes":null,"domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675449923293#A3NPD82ABCPIDP#27419407dda449d8b56f9c173859c43a","intentType":null,"providerInfoDescription":null,"registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"A3NPD82ABCPIDP","serialNumber":"27419407dda449d8b56f9c173859c43a"}],"utteranceId":"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.8aa4a567-9313-4cf1-afac-7081a3ae4167LPM","version":1},{"_disambiguationId":null,"activityStatus":"SUCCESS","creationTimestamp":1675449922256,"description":"{\"summary\":\"alexa\",\"firstUtteranceId\":\"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.26e1dd91-36ca-48b1-9dd8-383c2a5189fdLPM/0\",\"firstStreamId\":\"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.26e1dd91-36ca-48b1-9dd8-383c2a5189fdLPM\"}","domainAttributes":"WAKE_WORD_ONLY","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675449922256#AVD3HM0HOJAAL#66c9352b0ce246aa882e2f1c139c9121","intentType":null,"providerInfoDescription":null,"registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"AVD3HM0HOJAAL","serialNumber":"66c9352b0ce246aa882e2f1c139c9121"}],"utteranceId":"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.26e1dd91-36ca-48b1-9dd8-383c2a5189fdLPM","version":1},{"_disambiguationId":null,"activityStatus":"SUCCESS","creationTimestamp":1675449922101,"description":"{\"summary\":\"alexa\",\"firstUtteranceId\":\"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.8aa4a567-9313-4cf1-afac-7081a3ae4167LPM/0\",\"firstStreamId\":\"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.8aa4a567-9313-4cf1-afac-7081a3ae4167LPM\"}","domainAttributes":"WAKE_WORD_ONLY","domainType":null,"feedbackAttributes":null,"id":"A1LMGQTD3VDC7X#1675449922101#A3NPD82ABCPIDP#27419407dda449d8b56f9c173859c43a","intentType":null,"providerInfoDescription":null,"registeredCustomerId":"A1LMGQTD3VDC7X","sourceActiveUsers":null,"sourceDeviceIds":[{"deviceAccountId":null,"deviceType":"A3NPD82ABCPIDP","serialNumber":"27419407dda449d8b56f9c173859c43a"}],"utteranceId":"Alexa3P:1.0/2023/02/03/18/DEVICE_UNSPECIFIED/45:21::TNIH_2V.8aa4a567-9313-4cf1-afac-7081a3ae4167LPM","version":1}],"endDate":1675488405192,"startDate":1675449922101}
2023-02-04 06:26:49.304 [DEBUG] [trol.internal.handler.AccountHandler] - updateSmartHomeState started with deviceFilterId=null
2023-02-04 06:26:51.063 [DEBUG] [mazonechocontrol.internal.Connection] - removed 174564037 device a4be996f491e47f1a09892a7f8c4d446 

I assume that the delay is due to the processing in the Amazon cloud, but not sure. Right now, it seems to me the delay is less, which may be due to the early hour and less people being awake using their Alexa. :wink:

I’ve just played a little around.

It seems if there is something like a rate limiter on the amazon web site.
When I play the same sentence within 1-2s seconds, the second voice seems to be delayed at least 5s sometime even up to 10s.
Waiting a few seconds between the “sendCommands” seems to reduce the delay.

I also increased polling interval in “amazon account thing”.

I’m using the amazon binding just for TTS so the high values do not bother me.

I seems that it helps to avoid running into the rate limiter. But i’m not really sure. Currently this are felt values. I have to investigate that a bit more.

2 Likes