Alexa/echo throwing errors

The last days I see error messages from alexa/echo. Can someone help me understand the meaning?
I use the echo control to send text to speech to 4 echos on certain triggers. I’m not sure if it runs fine every time or if I miss events. At least sometimes it does work.

2019-12-10 23:01:00.071 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@1076b08': POST url 'https://alexa.amazon.de/api/behaviors/preview' failed: Too Many Requests
org.openhab.binding.amazonechocontrol.internal.HttpException: POST url 'https://alexa.amazon.de/api/behaviors/preview' failed: Too Many Requests
        at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:648) ~[?:?]
        at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceNode(Connection.java:1193) ~[?:?]
        at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceCommand(Connection.java:1178) ~[?:?]
        at org.openhab.binding.amazonechocontrol.internal.Connection.executeSequenceCommandWithVolume(Connection.java:1169) ~[?:?]
        at org.openhab.binding.amazonechocontrol.internal.Connection.textToSpeech(Connection.java:1147) ~[?:?]
        at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.startTextToSpeech(EchoHandler.java:779) ~[?:?]
        at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.handleCommand(EchoHandler.java:631) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_152]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_152]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_152]
        at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
        at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
        at com.sun.proxy.$Proxy1959.handleCommand(Unknown Source) [?:?]
        at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74) [bundleFile:?]
        at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_152]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_152]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_152]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_152]
        at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152) [bundleFile:?]
        at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_152]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_152]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_152]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]

Just read the end of the first line in the error report: failed: Too Many Requests
I would understand that as: you requested the service (TTS) to often in a (short) timeframe.

Event Log:

2019-12-11 06:13:47.369 [ome.event.ItemCommandEvent] - Item 'gEcho_Ausgabe' received command Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.416 [ome.event.ItemCommandEvent] - Item 'Echo_Schlafzimmer_Ausgabe' received command Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.480 [ome.event.ItemCommandEvent] - Item 'Echo_Finja_Ausgabe' received command Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.523 [ome.event.ItemCommandEvent] - Item 'Echo_Kueche_Ausgabe' received command Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.556 [ome.event.ItemCommandEvent] - Item 'Echo_Arbeitszimmer_Ausgabe' received command Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.563 [nt.ItemStatePredictedEvent] - Echo_Schlafzimmer_Ausgabe predicted to become Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.579 [nt.ItemStatePredictedEvent] - Echo_Finja_Ausgabe predicted to become Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.628 [nt.ItemStatePredictedEvent] - Echo_Kueche_Ausgabe predicted to become Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.651 [nt.ItemStatePredictedEvent] - Echo_Arbeitszimmer_Ausgabe predicted to become Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.687 [vent.ItemStateChangedEvent] - Echo_Schlafzimmer_Ausgabe changed from  to Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.690 [vent.ItemStateChangedEvent] - Echo_Finja_Ausgabe changed from  to Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.694 [vent.ItemStateChangedEvent] - Echo_Kueche_Ausgabe changed from  to Das Fenster im Bad ist noch offen
2019-12-11 06:13:47.696 [vent.ItemStateChangedEvent] - Echo_Arbeitszimmer_Ausgabe changed from  to Das Fenster im Bad ist noch offen
2019-12-11 06:13:49.302 [vent.ItemStateChangedEvent] - Echo_Schlafzimmer_Ausgabe changed from Das Fenster im Bad ist noch offen to
2019-12-11 06:13:49.340 [vent.ItemStateChangedEvent] - Echo_Kueche_Ausgabe changed from Das Fenster im Bad ist noch offen to

with the Items:

Group gEcho_Ausgabe "Echo Ausgabe"

String  Echo_Schlafzimmer_Ausgabe           (gEcho_Ausgabe) {channel = "amazonechocontrol:echo:xxx:textToSpeech"}
String  Echo_Finja_Ausgabe                  (gEcho_Ausgabe) {channel = "amazonechocontrol:echoxxx:textToSpeech"}
String  Echo_Kueche_Ausgabe                 (gEcho_Ausgabe) {channel = "amazonechocontrol:echo:xxx:textToSpeech"}
String  Echo_Arbeitszimmer_Ausgabe          (gEcho_Ausgabe) {channel = "amazonechocontrol:echoxxx:textToSpeech"}

Calling the group from a rule:

gEcho_Ausgabe.sendCommand("Ein Fenster im Arbeitszimmer ist noch offen")

Isn’t that the way I’m supposed to configure this?

That looks like an syntactically correct use of openHAB.
Does it make sense? IMHO no, separate voice messages for each item will get you annoyed real quick.
The major problem is that Amazon probably does not allow so many request in a short time hence the eror5!

It’s only one message on all 4 echos. Nothing AWS shouldn’t be able to handle.

And yes, the application is very good. The window sensors start a 10 min timer, so I don’t forget to close them + an incoming phone call will trigger the echos.

But reading the error you get they are complaining!

Did look closer this time:
I got two errors thrown. We were listening to two echos and both did tell us the info. The error messages are identical, with only difference in timestamp by 200ms.

So I did some more testing. When I use the text to speech with the group of amazon echos, some of them won’t talk and the errors are thrown.
If I code my rule in a “bad style”:

            val Text = "Ein Fenster im Arbeitszimmer ist noch offen"
            Echo_Arbeitszimmer_Ausgabe.sendCommand(Text)
            Echo_Schlafzimmer_Ausgabe.sendCommand(Text)
            Echo_Kueche_Ausgabe.sendCommand(Text)
            Echo_Finja_Ausgabe.sendCommand(Text)

all is working well.