i'm in ubuntu, latest version of domo. simple dummy hardware, simple dummy switch. in the scripts/python directory i've made test.py:
Code: Select all
#!usr/bin/python
import domoticz
domoticz.log("script")
domoticz.error("error")
script://home/dave/domoticz/scripts/python/test.py
script is set to executable:
-rwxrwxrwx 1 dave dave 225 Oct 29 22:10 test.py
"which python" shows py 2.7 installed appropriately at /usr/bin/python
python --version shows 2.7.12
i get *nothing* when i click the switch in the UI. i see it's clicking, because there are log entries, but i get no indication my script is being run.
i changed the URL of the script to have three slashes, and that throws a script error 32512 which i believe means it's not finding the script appropriately, so back to double slashes. the log shows:
2016-10-30 12:01:43.025 User: dz initiated a switch command (1/test switch/Off)
2016-10-30 12:01:43.025 (test) Light/Switch (test switch)
2016-10-30 12:01:47.510 User: dz initiated a switch command (1/test switch/On)
2016-10-30 12:01:47.510 (test) Light/Switch (test switch)
this is the most simple of the simple. yet, i'm stuck.
i'd appreciate some guidance, apologies for such a dumb one.
--- dz