Error executing script command . returned: 256

All kinds of 'OS' scripts

Moderator: leecollings

Post Reply
RduPre
Posts: 53
Joined: Thursday 11 August 2016 18:41
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: The Netherlands
Contact:

Error executing script command . returned: 256

Post 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 1658 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
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Error executing script command . returned: 256

Post by Justintime »

I have same sort of issue. Saw your post after mine. Did you find a solution?
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Error executing script command . returned: 256

Post 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.
Thorgal789
Posts: 852
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Error executing script command . returned: 256

Post 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)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest