Exec Binding "No such file or directory"

Hi there,

I am unable to get the exec binding to execute my shell script which is used to control my Sony TV via curl.

I am running Openhab 1.7.0 on Raspbian with Java 1.8.0.
The exec binding has been added to the Openhab addon directory.
Openhab is running as root to rule out any permissions issues.

The script works correctly when manually executing it from the command line. It is located under the openhab scripts folder.

openhab/configuration/scripts
I’ve chmod 777 to also rule out permissions issues on the script file.
-rwxrwxrwx 1 root root 943 Nov 23 05:36 nx720.sh

openhab/addons directory
-rw-r–r-- 1 root root 38488 Oct 19 22:20 org.openhab.action.mail-1.7.0.jar
-rw-r–r-- 1 root root 63873 Nov 22 11:13 org.openhab.binding.exec-1.7.0.jar
-rw-r–r-- 1 root root 28012 Jul 16 22:21 org.openhab.binding.hue-1.7.0.jar
-rw-r–r-- 1 root root 28597 Jul 17 21:50 org.openhab.binding.mqtt-1.7.0.jar
-rw-r–r-- 1 root root 15891 Jul 28 10:46 org.openhab.binding.mqttitude-1.7.0.jar
-rw-r–r-- 1 root root 10710 Oct 19 21:00 org.openhab.binding.networkhealth-1.7.0.jar
-rw-r–r-- 1 root root 15252 Aug 19 21:13 org.openhab.binding.wemo-1.7.0.jar
-rw-r–r-- 1 root root 1072747 Jul 25 08:38 org.openhab.binding.zwave-1.7.0-SNAPSHOT.jar
-rw-r–r-- 1 root root 1134175 Jul 25 08:39 org.openhab.io.habmin-1.7.0-SNAPSHOT.jar
-rw-r–r-- 1 root root 322270 Aug 3 21:55 org.openhab.io.myopenhab-1.7.0.jar
-rw-r–r-- 1 root root 624536 Oct 17 00:11 org.openhab.persistence.rrd4j-1.7.0.jar

Items file
Switch tv1 “hdmi1” (TV) { exec=“ON:./configutaions/scripts/nx720.sh AAAAAQAAAAEAAAAUAw==” }

sitemap file
Group label=“Lounge” icon=“sofa” {
Switch item=tv1 label=“HDMI 1”

openhab.log error
05:44:07.532 [ERROR] [.o.b.exec.internal.ExecBinding:326 ] - couldn’t execute commandLine ‘./configutaions/scripts/nx720.sh AAAAAQAAAAEAAAAUAw==’
java.io.IOException: Cannot run program “./configutaions/scripts/nx720.sh”: error=2, No such file or directory

The working script file

#!/bin/sh

#### Batch file for curl command to Sony NX720 TV.

code="$1"

/bin/echo "Code entered is:" $code
/bin/echo""

/usr/bin/curl 'http://10.64.7.32/IRCC' -H 'Origin: chrome-extension://fhjcajmcbmldlhcimfajhfbgofnpcjmb' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,en-US;q=0.8,en;q=0.6' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/45.0.2454.101 Chrome/45.0.2454.101 Safari/537.36' -H 'Content-Type: text/plain;charset=UTF-8' -H 'Accept: */*' -H 'Connection: keep-alive' -H 'SOAPAction: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"' --data-binary '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:X_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1"><IRCCCode>'$code'</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>' --compressed

If anyone has any ideas I’d be very thankful for your feedback?

Regards
Mark

Should that be configuration?

Hi David,

Well that’s embarrassing!!! Thank you for pointing out this error, I can’t see the forest from the trees.

This is now working. :grinning:

Glad it is working

Always easier for someone else to see your typos.