Page 1 of 1

always "returned: 32512" on simple/empty script

Posted: Tuesday 03 December 2019 22:06
by caloux
Hi,
I created my first python script to test the call of python script from "on action" function in a switch.
Sans titre.jpg
Sans titre.jpg (70.33 KiB) Viewed 1058 times

I simplify my script to debug and now the script is empty with only one line:

#!/bin/python

the result log in Domoticz:
2019-12-03 21:47:59.492 Status: User: Admin initiated a switch command (71/mon relais/On)
2019-12-03 21:47:59.715 Status: Executing script: //home/pi/domoticz/scripts/python/capture.py
2019-12-03 21:47:59.726 Error: Error executing script command (/home/pi/domoticz/scripts/python/capture.py). returned: 32512

In SSH my script work but not with switch call "action on"

chmod of my script 777:

-rwxrwxrwx 1 pi pi 17 déc. 4 22:49 capture.py


There are quite a number of posts on this forum already describing various solutions for this problem i make a "sudo chmod 0777 capture.py", save with vi, reboot but i have always a 32512 return...Same problem with Domoticz default scripts like domoticz.py, script_device_demo.py even with sudo chmod 777 ....idem with a basic bash or lua script !... rights issue with pi user, root user... ?

thank you for your help

Re: always "returned: 32512" on simple/empty script

Posted: Thursday 05 December 2019 23:00
by tobydeteckel
I did 2 different things,

Making a start script, so domoticz executed the scripts and thinks it's done immediately, (ending command with '&')

So my script doorbell.sh get executed by doorbell-start.sh
Doorbell.sh got sudo permissions
Doorbell-start.sh has user permissions
And start the doorbell.sh script with a 'sudo bash' command from doorbell-start.sh script.

Thijs