Hi,
my 1.83. exec rules do not work anymore with 2.2.0 snapshot…
I now checked in documentations that in v2 there is a thing/channel configuration required.
My Question, is the old style (look below) still working with v2.
rule "ETA SH20_Start/Stop Logger"
when
Item EtaKesselState received update
then
if (EtaKesselState.state=="Heizen" && EtaState_Switch.state==OFF) {
executeCommandLine("/etc/openhab2/scripts/etastart.sh")
EtaState_Switch.sendCommand(ON) }
else
if (EtaKesselState.state=="Bereit" && EtaState_Switch.state==ON){
executeCommandLine("/etc/openhab2/scripts/etastop.sh")
EtaState_Switch.sendCommand(OFF) }
end
I’m asking as my rules do not work anymore…read about @rlkoshak 's summary on issues with exec but nothing helped. only i tried not to make openhab a su. but my scripts work also in shell without any root rights.
Did you add a timeout to the executeCommandLine and print the results from the attempt to run your scripts? That is the first suggestion on the solving exec problems paying and is least to figuring out why the script fails.
so, guess that chown and chmod would not change anything as its already set.but thanks for trying!
Rich, will change and look for the log result. but again my question…does exec 2.2 support still the old structure as above or anyway it would not work (despite to permissions,…) and i have to change to thing/channel structure.
executeCommandLine is a default Action and should not be confused with the Exec binding. As far as I know it is the exact same code as executeCommandLine in 1.8.