Code: Select all
#!/bin/sh
/usr/bin/python /opt/domoticz/userdata/scripts/python/hs110_domoticz.py -d $1 -c $2 > /dev/null 2>&1 &
docker exec -it domoticz sh
sh -xv userdata/scripts/exec_hs110.sh kp1151 off
This was just printing the contents of the script, but not showing any errors. So I ran the python command directly:
/usr/bin/python /opt/domoticz/userdata/scripts/python/hs110_domoticz.py -d kp1151 -c off
At last I got an error!
sh: /usr/bin/python: No such file or directory
I then tried this command, without the path to python:
python /opt/domoticz/userdata/scripts/python/hs110_domoticz.py -d kp1151 -c off
Success!
Is this now the correct way to use python from Docker Domoticz and would you like me to document this for https://wiki.domoticz.com/Scripting_in_ ... ts_scripts?
Cheers - Andrew