Hello everybody,
I know the title sounds like an typical problem. But I am really confused. This is the current state:
.rules File: Owner is openhab, in the executeCommandLine() I call an python Script where GPIOS are set. The owner of that Script is also openhab
Now I changed in my Terminal to the openhab user and I called: python name/of/my/script.py. Everything works fine.
But when I call the script through an item, I get the error: No access to /dev/mem. The openhab User is already added to the GPIO Group btw.
I even set in visudo : openhab ALL=NOPASSWD: ALL but even that worked not
Has anybody an idea whats going wrong here? All I wanna do I just to call an .py script where I could set the GPIOS
What is the owner and group of /dev/mem? On my Pi it is owned by root and a the group is kmem. If your’s is the same then you need to add openhab to the kmem group as well. I don’t think this is GPIO specific and probably has something to do with how the Python script was written. I could be wrong though.
Hello Rich! Thank you for your answer!
I made an stupid error, I forgot the sudo in my executeCommandLine. So now my executeCommandLine in my Rule looks like that: