Hi all!
I'm running an ongoing home automation project with two Raspberry Pi's, one has Hyperion installed/connected to it. After a morning's work I figured out how to start an effect using a remote ssh connection from one rPi to another:
Code
sshpass -p 'pass' ssh osmc@192.168.1.33 sudo hyperion-remote -p 50 -e \"Knight rider\" -d 6000 > tempoutput.txt 2>&1
This works, as I can see the effect and read the output in tempoutput.txt. However, I want to start this from within a php script. This is the (same) code:
PHP
exec("sshpass -p 'pass' ssh osmc@192.168.1.33 sudo hyperion-remote -p 50 -e \"Knight rider\" -d 6000 > tempoutput.txt 2>&1");
I can see the same output in tempoutput.txt, which would mean the effect is started, but it doesn't. The lights stay off. I'm asuming that the remote ssh does work since a ping test works fine, but I have no clue what could be the case here.
Who can help me?