I’m still trying (unsuccessfully) to read from a file.
I’m trying to debug the executeCommandLine action using the documentation here:
https://community.openhab.org/t/how-to-solve-exec-binding-problems/18131
in the following rule, the switch does not turn on.
//Turn on the wemo mini switch when openhab2 launches
rule "first rule"
when
System started
then
// val input = "the lights need adjustment"//this works fine
val input = executeCommandLine("C:\\head@@-n@@1@@openhabinput.txt", 5000)//no errors, but the switch does not turn on
logDebug("testExec", input)
if (input.contains("lights")) {
Switch1_state.sendCommand(ON)
}
end
Also, I don’t see any debugging information!
Am I understanding the documentation correctly? I uninstalled the Exec bindings.
I wasn’t sure what to put for the 1st argument of logDebug. In addition to “testExec” I tried the name of the rule and the name of the .rules file. Didn’t make any difference.
I also used the console “log” command to change the log level to DEBUG. This produced a very large amount of output into the log file but there was no reporting of the value of “input”.
Regards,
Joe