Page 1 of 1

Error executing script command . returned: 256

Posted: Monday 02 March 2020 12:27
by RduPre
Hi,

I created a bash script see below:

Code: Select all

#!/bin/sh
userid="[email protected]"
password="password"
ipaddress="192.168.3.142"
hubcommand="issue_device_command"
devicecommand="Power_Toggle"
deviceid="57374392"
/home/pi/domoticz/scripts/bash/harmonyhubcontrol_linux_arm.exe $userid $password $ipaddress $hubcommand $deviceid $devicecommand
The script runs perfectly from the CLI, but when I run it as part of an ON/OFF script from a Domoticz device
Schermafbeelding 2020-03-02 om 12.18.42.png
Schermafbeelding 2020-03-02 om 12.18.42.png (124.15 KiB) Viewed 1661 times
I get a 256 error
Error: Error executing script command (/home/pi/domoticz/scripts/bash/HarmonyHub.sh). returned: 256

I found some posts about this error, but none of them gave me the correct solution.

Thank you for your support

Re: Error executing script command . returned: 256

Posted: Sunday 08 March 2020 9:16
by Justintime
I have same sort of issue. Saw your post after mine. Did you find a solution?

Re: Error executing script command . returned: 256

Posted: Sunday 08 March 2020 10:24
by freijn
Can you try it with the full path?

script://home/pi/domoticz/scripts/bash/HarmonyHub.sh

Do a chmod 777 on the script to bypass a rights issue as well.

Re: Error executing script command . returned: 256

Posted: Sunday 08 March 2020 10:31
by Thorgal789
You can send too log error to a debug file.

Im using this kind of command with python command.

Code: Select all

python3 /home/pi/hp/play_radio.py "$@" &>> //home//pi//hp//log2.txt
python3 /home/pi/hp/play_radio.py "$@" > /dev/null 2>&1 &
The first one send log to a file
The second one disable all return (else domoticz error 256 too, you need to redirect the output somewheren)