# Problem Running Alexa Routines from Amazon Control Binding

**URL:** <https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721>\
**Category:** Bindings\
**Tags:** amazonechocontrol\
**Created:** [August 16, 2020, 4:06am UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721 "2020-08-16T04:06:16Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![KiwiPete](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/8baadc/32.png) [@KiwiPete](https://community.openhab.org/u/KiwiPete)\
**Post date:** [August 16, 2020, 4:06am UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/1 "2020-08-16T04:06:16Z")

</div>

Hi everyone,

I’m having intermittent problems with OpenHab rules that run Amazon Alexa routines using StartRoutine.

At present I have a couple of time triggers which start an Alexa routine to pull the bedroom blinds halfway down at 3pm when the sun blasts in, and then all the way down at sunset.

These have been working perfectly until a few weeks ago. Now they work on occasions, but mostly don’t.

Details of the environment that may be relevant are:  
OpenHAB 2.5.7-1 (Release Build)  
Amazon Control Binding 2.5.7  
Raspbian GNU/Linux 10 (buster)  
Kernel Linux 5.4.51-v71+  
Raspberry Pi 4 Model B Rev1.1  
OpenJDK Runtime Environment Zulu 8.48.1.243

Below is the relevant section from the Openhab log.

I’ve found a few posts about issues with the Amazon Control binding, but I think they’re mostly related to text to speech functions so I’m not sure if it’s the same base problem or not. I’m also not sure if this is even an Openhab problem or possibly something on the Amazon side of things beyond our control.

Very grateful for any suggestions towards fixing this.

Cheers,  
Pete.

```auto
2020-08-16 15:00:00.016 [INFO] [g.eclipse.smarthome.model.script.PAL] - Afternoon Shades Half Down Triggered
2020-08-16 15:00:01.559 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@1520e65': GET url 'https://alexa.amazon.com/api/behaviors/automations?limit=2000' failed: Too Many Requests
org.openhab.binding.amazonechocontrol.internal.HttpException: GET url 'https://alexa.amazon.com/api/behaviors/automations?limit=2000' failed: Too Many Requests
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequest(Connection.java:646) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:502) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.makeRequestAndReturnString(Connection.java:497) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.getRoutines(Connection.java:1459) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.Connection.startRoutine(Connection.java:1392) ~[?:?]
	at org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler.handleCommand(EchoHandler.java:644) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_262]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_262]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_262]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_262]
	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.$Proxy288.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_262]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_262]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_262]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_262]
	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_262]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_262]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_262]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]

```

---

<div class="post-metadata">

**Author:** ![H102](https://community.openhab.org/user_avatar/community.openhab.org/h102/32/25595_2.png) [@H102](https://community.openhab.org/u/H102)\
**Post date:** [August 16, 2020, 2:24pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/2 "2020-08-16T14:24:29Z")

</div>

The log mentions too many request so try and change the rule to have so each blind is not sent a command at the exact time. If you need help with this please post the rule and someone will be glad to assist.

---

<div class="post-metadata">

**Author:** ![KiwiPete](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/8baadc/32.png) [@KiwiPete](https://community.openhab.org/u/KiwiPete)\
**Post date:** [August 16, 2020, 10:08pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/3 "2020-08-16T22:08:06Z")

</div>

Hi, and thanks for responding.

The crazy thing is the routine is only being called once for any given operation. There are five blinds, each with their own RF channel, but they are also bound to a group channel which makes them all operate at once. They are driven by an Orvibo RF hub, which in turn is controlled by an Alexa skill.

So at 3pm the following rule runs:

```php
var command3 = "Shades Down"

//1500 Shades Half Down
rule "Afternoon Shades Half Down"
when
	Time cron "0 0 15 ? * *"
then
	logInfo("PAL", "Afternoon Shades Half Down Triggered")
	AmazonEchoStudio_StartARoutine.sendCommand(command3)
end

```

The “Shades Down” command maps to an Alexa routine which contains a single Orvibo command “Blinds Off” which triggers the shared RF channel. The blinds should then simultaneously go half way down as there is an intermediate stop point programmed into their motors.

That is the only time that OpenHAB calls that routine until sunset, when an Astro trigger runs a similar rule which lowers the blinds fully.

So I don’t understand the “too many requests” error, and as I mentioned these rules used to operate flawlessly.

Cheers,  
Pete.

---

<div class="post-metadata">

**Author:** ![H102](https://community.openhab.org/user_avatar/community.openhab.org/h102/32/25595_2.png) [@H102](https://community.openhab.org/u/H102)\
**Post date:** [August 18, 2020, 3:04pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/4 "2020-08-18T15:04:49Z")

</div>

Try restarting the binding via the console or restarting (not rebooting) OH.

To restart OH use **sudo systemctl restart openhab2** to restart the binding see the doc’s for how to use the console.

---

<div class="post-metadata">

**Author:** ![KiwiPete](https://community.openhab.org/letter_avatar_proxy/v4/letter/k/8baadc/32.png) [@KiwiPete](https://community.openhab.org/u/KiwiPete)\
**Post date:** [August 25, 2020, 8:17am UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/5 "2020-08-25T08:17:02Z")

</div>

Thanks for the suggestion. The OpenHAB restart didn’t achieve anything, but for a while I thought the binding restart may have solved it.

Unfortunately after a few successful operations it failed again. It’s currently working about one time out of every three or four attempts. I don’t understand this - would have thought it would either work all the time or not at all.

---

<div class="post-metadata">

**Author:** ![Rbartlett](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/ba8739/32.png) [@Rbartlett](https://community.openhab.org/u/Rbartlett)\
**Post date:** [January 28, 2021, 7:21pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/6 "2021-01-28T19:21:09Z")

</div>

I implemented this a couple of days ago and it worked perfectly for about 24 hours then I started getting the same errors. I have an Alexa routine setup to notify my phone when a gate is opened.

This is my rule.

triggers:

- id: “1”  
configuration:  
itemName: openHABserver\_ItemBackGateDummy  
state: OPEN  
previousState: CLOSED  
type: core.ItemStateChangeTrigger  
conditions:   
actions:
- inputs: {}  
id: “2”  
configuration:  
itemName: Workshop\_StartaRoutine  
command: back gate is open  
type: core.ItemCommandAction

This is the error.

2021-01-28 12:51:36.081 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.amazonechocontrol.internal.handler.EchoHandler@dbec7f’: GET url ‘[https://alexa.amazon.com/api/behaviors/automations?limit=2000](https://alexa.amazon.com/api/behaviors/automations?limit=2000)’ failed: Not Found

org.openhab.binding.amazonechocontrol.internal.HttpException: GET url ‘[https://alexa.amazon.com/api/behaviors/automations?limit=2000](https://alexa.amazon.com/api/behaviors/automations?limit=2000)’ failed: Not Found

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

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

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

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

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

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

at jdk.internal.reflect.GeneratedMethodAccessor123.invoke(Unknown Source) ~[?:?]

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

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

at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]

at com.sun.proxy.$Proxy860.handleCommand(Unknown Source) [?:?]

at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]

at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]

at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

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

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

at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

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

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

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

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

```

I think I will also submit this to Amazon and see if they have any idea what has happened. It is almost like they changed the link.  
Thank you

---

<div class="post-metadata">

**Author:** ![Wolfgang\_S](https://community.openhab.org/user_avatar/community.openhab.org/wolfgang_s/32/52719_2.png) [@Wolfgang\_S](https://community.openhab.org/u/Wolfgang_S)\
**Post date:** [January 28, 2021, 7:40pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/7 "2021-01-28T19:40:00Z")

</div>

see [Limit=2000' failed: Not Found](https://community.openhab.org/t/limit-2000-failed-not-found/115696/)

---

<div class="post-metadata">

**Author:** ![Rbartlett](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/ba8739/32.png) [@Rbartlett](https://community.openhab.org/u/Rbartlett)\
**Post date:** [January 28, 2021, 8:20pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/8 "2021-01-28T20:20:15Z")

</div>

This worked for me. Back up and running.

update org.openhab.binding.amazonechocontrol [https://janessa.me/esh/org.openhab.binding.amazonechocontrol-3.1.0-SNAPSHOT.jar](https://janessa.me/esh/org.openhab.binding.amazonechocontrol-3.1.0-SNAPSHOT.jar)

Thank you

---

<div class="post-metadata">

**Author:** ![Chris69](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@Chris69](https://community.openhab.org/u/Chris69)\
**Post date:** [February 2, 2021, 3:35pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/9 "2021-02-02T15:35:18Z")

</div>

I have the same problem here - unfortunately @Rbartlett solution didn’t work for me.

Are there any other solutions?

---

<div class="post-metadata">

**Author:** ![Rbartlett](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/ba8739/32.png) [@Rbartlett](https://community.openhab.org/u/Rbartlett)\
**Post date:** [February 2, 2021, 9:45pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/10 "2021-02-02T21:45:24Z")

</div>

My solution was for OH3. What version are you on?

---

<div class="post-metadata">

**Author:** ![Wolfgang\_S](https://community.openhab.org/user_avatar/community.openhab.org/wolfgang_s/32/52719_2.png) [@Wolfgang\_S](https://community.openhab.org/u/Wolfgang_S)\
**Post date:** [February 3, 2021, 5:39am UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/11 "2021-02-03T05:39:03Z")

</div>

> [@Rbartlett](#):
>
> My solution was for OH3. What version are you on?

Link in post 7 points to solution for 3.0 and 2.5.

---

<div class="post-metadata">

**Author:** ![Chris69](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@Chris69](https://community.openhab.org/u/Chris69)\
**Post date:** [February 3, 2021, 9:10am UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/12 "2021-02-03T09:10:55Z")

</div>

Sorry - I forgot to mention it. I’m on OH3 (3.0.1). When I do the update, the things won’t work at all anymore. They are still shown in Paper UI, but all relevant things are shown as “Uninizialized”

---

<div class="post-metadata">

**Author:** ![Rbartlett](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/ba8739/32.png) [@Rbartlett](https://community.openhab.org/u/Rbartlett)\
**Post date:** [February 3, 2021, 8:37pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/13 "2021-02-03T20:37:48Z")

</div>

Try disabling and enabling the account. You may also look at the device Things and make sure the account is selected.

---

<div class="post-metadata">

**Author:** ![Chris69](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@Chris69](https://community.openhab.org/u/Chris69)\
**Post date:** [February 4, 2021, 5:02pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/14 "2021-02-04T17:02:39Z")

</div>

I finally found out why it doesn’t work for me - the jar file is no longer available at the URL given above 😉

---

<div class="post-metadata">

**Author:** ![Rbartlett](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/ba8739/32.png) [@Rbartlett](https://community.openhab.org/u/Rbartlett)\
**Post date:** [February 4, 2021, 5:54pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/15 "2021-02-04T17:54:47Z")

</div>

I see it is now the standard binding. You may need to update your binding. 3.0.1

---

<div class="post-metadata">

**Author:** ![Chris69](https://community.openhab.org/letter_avatar_proxy/v4/letter/c/e47c2d/32.png) [@Chris69](https://community.openhab.org/u/Chris69)\
**Post date:** [February 4, 2021, 6:14pm UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/16 "2021-02-04T18:14:13Z")

</div>

I have version 3.0.1 of the binding. To make sure, I updated the complete system, but still the same error with the routines

---

<div class="post-metadata">

**Author:** ![jpalo](https://community.openhab.org/user_avatar/community.openhab.org/jpalo/32/114845_2.png) [@jpalo](https://community.openhab.org/u/jpalo)\
**Post date:** [February 5, 2021, 5:15am UTC](https://community.openhab.org/t/problem-running-alexa-routines-from-amazon-control-binding/103721/17 "2021-02-05T05:15:33Z")

</div>

[https://janessa.me/esh/org.openhab.binding.amazonechocontrol-3.1.0-SNAPSHOT.jar](https://janessa.me/esh/org.openhab.binding.amazonechocontrol-3.1.0-SNAPSHOT.jar) is dead.
