I’ve been trying to get the Lightify script working with the Exec2 binding, and think the issue could be a user permission problem.
I installed OH2 via apt-get.
And I have a python test script located here
And when I trigger the switch and the rule fires, I see this in the log
017-01-30 16:20:18.373 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '[python, /home/ptmuldoon/myscript.py]'
Yet the script never executes. I think the issue is that the script is located in /home/ptmuldoon/ and that the user openhab probably doesn’t have permissions to it? I tried making the file a full 777 in permissions to no avail as well.
I think when you install OH via apt-get, there is an actual openhab user home location, but I can’t find that information.
Is there a specific openhab user home location and where is that located? I think it may be the var/lib/openhab…something?
EDIT
Well, I tried placing the script in the same /etc/openhab2/scripts/ location, but appears the script is still not running.
So my file is located here:
And the rule firing the script is:
Rule "Lightify Workaround Lightify1"
when
Item Lightify1_OnOff changed or
Item Lightify1_Colour changed
then
var cmd = 'python@@/etc/openhab2/scripts/myscript.py'
executeCommandLine(cmd)
And the in the log it fires and looks like this, but seems to never actually execute:
2017-01-30 16:47:09.489 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine '[python, /etc/openhab2/scripts/myscript.py]'