i’m trying to start and stop applications on my HTPC with the exec binding.
Openhab 1.8 is running on a Raspberry PI.
My HTPC is running Windows 10 with a SSH Powershell Server.
From a ssh shell on the RPI with my PI User the commands are working fine. For example: sshpass -p "htpcpassword" ssh username@htpc kill -processname Steam
So i created a killsteam.sh file in /opt/openhab/configurations/scripts
and a item: Switch HTPC_Steam "Steam starten" (Status,Network,HTPC) {exec="*:/opt/openhab/configurations/scripts/killsteam.sh"}
Create a rule and call your exec command using executeCommandLine (cmd, timeout)and log what gets returned. This is the only way to see what error message is being printed. In my experience 99% f the time problems running ssh through the exec binding is caused by permission problems on the openhab user. My most recent problem was caused by the openhab start script changing the permissions on the files in ~openhab/.ssh.