Script works in ssh but not in domoticz
Posted: Monday 07 March 2016 19:53
I have python script relay.py - chmod 755, owner is pi, in scripts folder. In action i call it "script:///home/pi/domoticz/scripts/relay.py 1 1" and it not works. Error 512. When I put on first line "#!/usr/bin/python" error is changing to 32512.
In ssh works fine.
So I wrote scripts 10sh and 11.sh, owned to pi, chmoded 755, scripts code is one line:
python //home/pi/domoticz/scripts/python/relay.py 1 1
and
python //home/pi/domoticz/scripts/python/relay.py 1 0
and call it in action trigger - on: "python //home/pi/domoticz/scripts/11.sh", off: on: "python //home/pi/domoticz/scripts/11.sh"
It works. So where is the problem with execution .py file in action trigger?
In ssh works fine.
So I wrote scripts 10sh and 11.sh, owned to pi, chmoded 755, scripts code is one line:
python //home/pi/domoticz/scripts/python/relay.py 1 1
and
python //home/pi/domoticz/scripts/python/relay.py 1 0
and call it in action trigger - on: "python //home/pi/domoticz/scripts/11.sh", off: on: "python //home/pi/domoticz/scripts/11.sh"
It works. So where is the problem with execution .py file in action trigger?