Multiple TTS Commands on Amazon Echo Control Binding all at once

I have been playing around with the Amazon Echo Control Binding getting notifications with TTS after rules are completed. I got everything working, the only problem is when I send commands to multiple echo dots at once, i receive errors sometimes and it skips the TTS command to random echo dots. How I got them all working and no error, is staggering them with the sleep command by 2 seconds. Does anyone know if there is a way to send one message to all echo dots defined in a group so they will all notify at the same time instead of staggering them?

Thanks for the help!

Use a bunch of sleep commands is not a good idea. Here’s a link that may help.

That was just what I was looking for, thanks!

btw, why is it not a good idea to use a bunch of sleep commands? I use them a lot in some of my rules and want to know why its not good. Thanks again!

Any idea what this error is ?
This pops up every time i use the command…

gAfterHours_TTS.members.forEach[ i | i.sendCommand(Washer2TTS)]

Didnt happen when i use my sleep commands with it.

2019-03-18 21:18:39.558 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@5fa4ff': POST url 'https://alexa.amazon.com/api/behaviors/preview' failed: Bad Request

org.openhab.binding.amazonechocontrol.internal.HttpException: POST url 'https://alexa.amazon.com/api/behaviors/preview' failed: Bad Request

	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:549) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceNode(Connection.java:1067) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceNodes(Connection.java:1076) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.Connection.textToSpeech(Connection.java:1038) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.startTextToSpeech(EchoHandler.java:640) ~[?:?]

	at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.handleCommand(EchoHandler.java:527) ~[?:?]

	at sun.reflect.GeneratedMethodAccessor147.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]

	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [102:org.eclipse.smarthome.core:0.10.0.oh240]

	at com.sun.proxy.$Proxy162.handleCommand(Unknown Source) [287:org.openhab.binding.amazonechocontrol:2.4.0]

	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:75) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]

	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [109:org.eclipse.smarthome.core.thing:0.10.0.oh240]

	at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown Source) ~[?:?]

	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]

	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [102:org.eclipse.smarthome.core:0.10.0.oh240]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [102:org.eclipse.smarthome.core:0.10.0.oh240]

	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

I too get all these HTTP errors with the binding. No solution as yet

@dastrix80
I haven’t done a lot of testing yet to confirm myself, but does this affect the TTS output to multiple devices? Do you have some that say what you request to be said and some that just get skipped and don’t complete the command? is that what this error is?

For me, some days it works, other days it doesnt. When it does, it plays on all 3 units just fine.

The error is the one you posted above, the same issue. I’ve created a github issue for this from memory.