Hello, sorry for my English first, it is translated directly from Google. I need your help.
I have a script for each alexa echo to create a scene with the previous volume, say the Tts on the volume I want, and then apply the previously saved scene to recover the volume.
These are the scripts:
When I test them individually they work perfectly, the problem comes when I want to put them together and run at the same time. I have tried executing it in an automation and also through another script and the same thing always happens, the first is executed ok but the second is not executed or does not recover its previous state.
I have tried forcing the first script to wait through the “wait for template” option:
There can often be issues when calling concurrent services or calling services on multiple Alexa devices using Alexa media player. The first thing to try is to switch to calling the scripts directly instead of using the script.turn_on service.
Because the scene you are calling will effectively be calling a volume set service as well , you may also need to add a short delay after the scene.turn_on service in each of your scripts.
Hey it works!! I have added a delay of 10 seconds and calling the scripts directly and it works. The only problem is that they don’t say it at the same time. Can you make the Tts say it at the same time?
Waaaaauuuuu!!! I had tried a lot of scripts that I had found googling but none of them work for me, they only said the text without adjusting the volume.
The script that I had done was a huge exponential job and also only half worked, because they were asynchronous. You have helped me a lot with my automations.
Thanks a lot
FWIW, you may still experience some small delays between messages due to how the Alexa media player integration/Alexa works. There is a way around this by setting up speaker groups in the Alexa app. I have not used that method because the minimal improvement doesn’t outweigh the additional setup and other limitations inherent to the method… at least in my setup. YMMV.
Also, since the average word-count is usually 20-35% higher in for sentences in Spanish compared to their English equivalent, you may want to make the last delay: a little bit longer. If the delay isn’t long enough, the volume will not be reset properly. I’ve thought about adding another variable field to have a message length option, but it hasn’t been a big issue so I never got around to it…
Very grateful for your help, take the to my health.
If I have noticed some slight delays but nothing worrying, it can be tolerated. In case of seeing that the volume does not recover, I will increase the delay in the script. By now all the ones I have created have always recovered the volume.