Hello Stef T.
I'm using the exec binding..
Switch TV_Status "TV" <video> { exec="ON:/home/haj/bin/TVon_hdmi2, OFF:/home/haj/bin/TVoff" }
And actually I run a bash script in cron that keeps the status of the TV updated.. (as well as sync other stuff that I'm not using bindings for), below is the relevant part of the cron script;
<code>
# TV status
TVSTATE=`curl --connect-timeout 3 -s --header 'Content-Type: text/plain' --request POST --data '{"id":20,"method":"getPowerStatus","version":"1.0","params":[]}'
http://tv/sony/system`if [ $? == 28 ];then
TVSTATE=off
else TVSTATE=`echo $TVSTATE | cut -d\" -f8`
fi
if [ "$TVSTATE" == "off" ];then
TV_Status=OFF
elif [ "$TVSTATE" == "standby" ];then
TV_Status=OFF
elif [ "$TVSTATE" == "active" ];then
TV_Status=ON
fi
curl -s --header "Content-Type: text/plain" --request PUT --data "$TV_Status"
http://192.168.1.103:8180/rest/items/TV_Status/state</code>