gismofx
(C)
1
Using openhabian/RPI
I’m trying to get this to work:
I’ve installed the ADB with apt-get and I can connect and send commands to control the ftv directly via the terminal.
I’ve created a script(ftv1_control.sh):
#!/bin/bash
adb connect FireTV1:5555
adb shell input keyevent 85
adb disconnect
And this rule:
rule "PlayPause"
when Item FTV1_playpause received command
then
executeCommandLine("sudo /etc/openhab2/scripts/FTV/ftv1_control.sh")
end
log entry shows this:
> 2017-09-09 14:47:49.151 [INFO ] [lipse.smarthome.io.net.exec.ExecUtil] - executed commandLine 'sudo ./etc/openhab2/scripts/FTV/ftv1_control.sh'
I’ve tried executing the script directly from the terminal and I get:
the error:
… command not found
Update:
I rewrote the script from scratch with nano and I can execute it from the shell, but it will still not execute from the rule.
I’m somewhat stuck at this point.
Eric_Dycus
(Eric Dycus)
2
I don’t have Linux installation to test but normally this is problem with permissions.
rlkoshak
(Rich Koshak)
3
Log the result of the script and that usually tells you the problem.