Problem with exec binding and Alexa

  • Platform information:
    • Hardware: RP 3
    • OS: _Openhabian
    • openHAB version: 2.1

I have problems to access the exec binding via Alexa and the openhab Cloud

my exec.things file
Thing exec:command:AnySwitch1_control [ command="/usr/bin/ 1 %2$s", interval=0, autorun=true ]

my exec.items file
Switch LeseLampe “Leselampe” [“Switchable”] { channel=“exec:command:AnySwitch1_control:input”, autoupdate=“false” }

With the settings above the “Leselampe” is detected by Alexa and i can (try to) switch it via "Alexa turn Leselampe on"
In the log “Item ‘LeseLampe’ received command ON” appears - but nothing happens (the lamp doesn’t switch on because the command is not started by openhab)

When I change the exec.items to
String LeseLampe “Leselampe” [“Switchable”] { channel=“exec:command:AnySwitch23_control:input”, autoupdate=“false” }
then it works, the command is started and the lamp powers on.
But in this case (“String” instead of “Switch”) the device is not found by Alexa.
Therefore if I want to add a new device I have first enter “Switch” in the exec.items, run the detection in Alexa and then change the exec.item to “String” to get it work. Strange!

Has anybody an idea what is wrong?


I think the only channel only supports being linked to a String item. So that explains that.

I don’t use Alexa so can’t help with that part but if Alexa only works with a Switch you will probably need to use a proxy Switch item and a rule to forward the commands sent to the switch to the String Item.

1 Like