Migrating exec-binding from OpenHab1 to OpenHab2

Hi,
I have a problem with the exec-binding in OH2. Here is my item I used in OH1:

Rollershutter Jalousie_KZ_tuer "Tür" <rollershutter> (Jalousien) { exec=">[UP:/home/pi/hochfahren_tur.sh] >[DOWN:/home/pi/runterfahren_tur.sh] <[/home/pi/jalousie-tur-status.sh:1000:REGEX((.*?))]" }

So far, I have no idea how I can realize this in OH2. Especially, how can I use two different scripts for one item - one for setting the item and one for reading the item’s status (its possible that the item is changed externally)?

This is my exec binding working on OH2B5

Switch          BathroomDehumidifier    "Power" {exec=">[OFF:sudo /home/pi/config/wiringpi/switchOff.sh 3 1] >[ON:sudo /home/pi/config/wiringpi/switchOn.sh 3 1]"}

Im using the Excec2.0-Binding where you have to use channels.

It transpires I hadn’t re-installed the binding since upgrading to Beta5 and I couldn’t get it to work with the Exec2.0 binding with my previous configuration. I’ll have a look through the logs this evening.

I uninstalled the Exec2.0 binding and went back to the 1.9 binding (I have legacy bindings enabled in Configuration -> System -> Extension Management -> Include Legacy (1.x) bindings)

Using my config above I was able to run my exec command successfully.

I’ve now see that the 2.0 binding is still under development so will give it a look at some point in the near future

Did you make some progress with exec-binding in OH2 or are you still on the 1.9 binding?

I am trying to migrate a system that relies for 95% on exec-bindings very similar to your example.

Hi, im facing the same problem, @gowi described in 2017.

For me this now seems to become a show stopper for the openhab3 migration, since the legacy 1.x exec binding will no longer work.

My rollershutter items are looking like this

Rollershutter WAREMA_SHUTTER_1 { exec=">[UP:/scripts/warema_shutter.sh 1 up] >[DOWN:/scripts/warema_shutter.sh 1 down] >[STOP:/scripts/warema_shutter.sh 1 stop]" }

Any ideas for an elegant 2.x exec solution?

Maybe sth like this could work?

Thing exec:command:warema [command="/scripts/warema_shutter.sh  %2$s", interval=0, autorun=true]

String WAREMA_ARGS {channel="exec:command:warema:input"}
Rollershutter WAREMA_SHUTTER_1 { <SET WAREMA_ARGS to "1 up"/"1 down"/"1 stop"> }


But how to change WAREMA_ARGS in the Rollershutter definition? I don’t want to use rules for that, as there are plenty of rollershutters.