[SOLVED] Feature request for paperui. (Reboot from paperui)

I think it would be a nice feature to have an accessible way in paperui for rebooting and/or restarting the runtimes.
Just my 50 cents :slight_smile:

Hi,

you can do this already. Not without spending some effort, but it works.

I installed the exec-binding defined an item (you can do this also in PaperUI directly)

Switch Do_Reboot                "Reboot"                                <reboot>  (gHarware)             { channel="exec:command:Reboot:run" }

and a thing (but if you want to do it from PaperUI you should link the channel in PaperUI)

Thing exec:command:Reboot                       "Reboot"                   [command="sudo /sbin/reboot", interval=0, autorun=false]

With this I can reboot the OpenHAB from any UI

  • HABPanel
  • BasicUi
  • PaperUI

  • by just setting the switch to ON
4 Likes

Very cool!
I think it is a very good writeup and a good introduction to the exec-binding.
Loving the flexibility of OpenHAB :sunglasses:

Please tick the solution post, thanks.

This was originally a feature request for PaperUI, but OK :slight_smile:

Hm, Its dont work to me. As I think, the system waits the password for sudo command. Please, how do to change command string to add sudo password?

I did this using exec commands instead of the binding. Sudo access is granted in the system.

2 Likes

Thanks a lot. It`s woking!

I tried this but got the following output (Using the output Thing)
image

Hi @theone,

sorry. I am assuming in the above post that you did the “usual” setups in your linux system that allow the reboot command and sudo execution to work. This is the usual message on openhabian - I guess that*s what you are using - when you first execute a command as sudo user.

Please check the post from @rpwong above about how to proceed.