Hello,
i want to execute a bash script which push a serial command over ssh to my homebridge. When i execute the script in the terminal everything is workin fine but with the exec binding nothing happens. I also get no error message in the Log. This is my config:
rule "Blind 0"
when
Item Rollo_Fenster changed
then
if (Rollo_Fenster.state == ON){
executeCommandLine("bash /home/openhabian/blinds/blind0up.sh")
}
else{
executeCommandLine("bash /home/openhabian/blinds/blind0down.sh")
}
end
one sample of the bash script:
#!/bin/bash
USERNAME=lampi
HOSTS="192.168.0.36"
SCRIPT="echo -e \"send 0 down\" > /dev/ttyACM0"
for HOSTNAME in ${HOSTS} ; do
ssh -l ${USERNAME} ${HOSTNAME} -p333 "${SCRIPT}"
done
I have already set the permissions with
sudo chown openhab:openhab /home/openhabian/blinds/blind0down.sh
and sudo chmod +x /home/openhabian/blinds/blind0down.sh
Please help me