Shutting down openhab, from the openhab interface

re: 2

I see where your confusion exists. I wrote i used sudo -u openhab sudo reboot but neglected to say that it was from the command prompt - not from within openhab, of course. I read the links and related before posting here and it’s even clearly spelled out in the exec binding docs https://www.openhab.org/addons/bindings/exec/#supported-things. That’s definitely not my problem.

…and at this point I was going to paste in the sudoers line that I only remembered before, when I saw the problem. ‘All’ instead of ‘ALL’ in the first occurrence. ffs. Sometimes code blindness, and I’m sure we’ve all been there. Still, someone might find this helpful in the future: check for uppercase ALL in the sudoers file!

So now the switch works using the rule (I didn’t need the bash script workaround). I’d rather have it work with the binding than having a rule to be checked (are rules less efficient on the system?) . @yves thanks for the question and your persistence on this topic!

No. and even if they were they would not be less efficient enough to be a problem. You pretty much have to go out of your way to have performance problems like this on anything more powerful than an RPi 2.

1 Like