Josar
(Josar)
February 15, 2018, 11:27pm
3
@vtni
Here is a thread where the exec binding is explained and also how to test if the command you want to execute can be executed. Also how you can display the return value of the execution to find errors.
This is a example thread to show how the exec binding 2.x works with detailed explanations.
This tutorial only works since openHAB 2.3.0 Build #1212.
I set up a fresh installation of “Raspbian GNU/Linux 9 (stretch)” and installed OpenHAB just followed my own thread and found some more information i missed at the first time. It is based on the Tutorial from here .
First make sure you connect your transmitter with the Raspberry like follows. Have a look at the RPI pinout .
Pin ATAD Data to 11 - …
So what does the log says? Try to execute it as follows
sudo -u openhab /etc/openhab2/scripts/ws2801.py 1 2 3
Another thing is that the user openhab has no bash enabled. Which you can find explained here.
There are situations where you want to use the Exec Binding to trigger something. Sometimes you need the sudo privilege to do this. I would rather try some group specification to reduce the user rights to a minimum, but here is how i got openHAB to be able to execute sudo.
Try executing a command as openhab
sudo -u openhab sudo -l
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of other…