I’m using OpenHabian. OpenHab2 is version 2.5.12-1.
A switch triggers the execution of a script in /etc/openhab2/scripts, which should switch on/of the screen of another computer.
This is the script:
echo Schalte an >> /home/openhabian/log.log /usr/bin/ssh email@example.com '/opt/vc/bin/vcgencmd display_power 1' >> /home/openhabian/log.log echo Fertig an >> /home/openhabian/log.log
The command to execute it is
The script is executed correctly when the switch state changes. The first and the last line are working, the file /home/openhabian/log.log is written.
But the ssh command seems not to be executed. Nothing is written into the log, the screen is not getting switched on/off.
When I run the script interactively as user openhab everything works fine.
For testing I scheduled the script for user openhab via cron, works too.
But not when executed from OpenHab.
The passwordless login works fine, this should not be the problem I think.
I have no idea what to do. It would be great if somebody could point me into the right direction.