I am using OH2 and want to call a python script that controls my WS2801 led strip. I set the header, gave chmod +x permissions (tried even 777 and chown openhab), but when calling the executeCommandLine from a rule, it doesn’t work:
The user whcih executes the commandline is openhab. So your user seems to be right. Try a simpler commandline, maybe just echo some text to a file.
I always use simple shell scripts (#!/bin/sh), which do the work. These scripts then call other stuff (in your case a python script.). Maybe you could call the python engine with your script as parameter?
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.
So what does the log says? Try to execute it as follows
@vtni or add the Shebang to your script. Explained here.
And please answer in full commands. When you state
i am not 100% sure what you typed. And please also be a little more specific nothing happend, means stripe does not change, but what is the return value from the command line?
Do you use openhabian? Then you have to change everythink you did to openhabian not user openhab. The user listet when you type this is the user you have to configure everything.
When openhab is listet use openhab when openhabian is listet use this user.
sudo cat /etc/passwd |grep open
openhab:x:111:116:openhab2 runtime user,,,:/var/lib/openhab2:/bin/false