Problem with exec binding1

I have problem using exec binding
I use this binding

{exec=">[ON:sshpass -p password ssh pi@192.168.3.5 sudo /usr/bin/1_start.sh]"} autoupdate="false"

the openhab run the command, i have see this in log file But nothing happened.

when i run this command directly from openhab machine console work good, but when openhab run this command nothing happened

Somebody have idea how to fix this?

Please pay close attention to the usage of “@@”: https://github.com/openhab/openhab/wiki/Exec-Binding#general

Try either of the two and also check your log

sshpass@@-p@@password@@ssh pi@192.168.3.5 sudo /usr/bin/1_start.sh
sshpass@@-p@@password@@ssh@@pi@192.168.3.5@@sudo@@/usr/bin/1_start.sh

I’m also not 100% percent sure if your “pi@” is a problem im that case.

Not work with this.

I think the problem is user and usergroup i use openhab with user openhab and may be this user haven’t access to sshpass. but i don’t know were is located this program stupid linux installing every program on different places and haven’t search. Other possibility is this user “openhab” haven’t access to remote file.

That may well be. Find the full path of sshpass by the help of whereis sshpass or which sshpass

If you want to test run your command, use

sudo su -s /bin/bash -c 'your command here' openhab