Page 1 of 1

Question: Domoticz System Commands Behaviour On Windows

Posted: Thursday 12 November 2015 10:06
by gcoupe
I know that when running Domoticz on a RPi, then the following commands (in the Setup/More Options menu) have the following behaviour:

Restart System - reboots the RPi
Shutdown System - shuts down the RPi

I've now (temporarily?) installed Domoticz on my WHS 2011 server system, and installed it as a service (since the server is headless). My question is "what do these two commands do now, when Domoticz is running just as another service in Windows?".

Will "Restart System" just restart the Domoticz service (only), or does it reboot the entire Windows server?
Will "Shutdown System" just stop the Domoticz service (only), or does it shutdown the entire Windows server?

Thanks.

Re: Question: Domoticz System Commands Behaviour On Windows

Posted: Thursday 12 November 2015 11:32
by StanHD
I run on Windows 7 (NUC) but have also run previously on my WHS2011. (Both as a service).
With Windows 7 the Restart is a reboot of the entire system, and the shut-down does shut down the entire system.
I think it's the same for the WHS2011, although I didn't test that as I didn't want that to happen. :(

This is why I migrated to a dedicated PC. :)

Re: Question: Domoticz System Commands Behaviour On Windows

Posted: Thursday 12 November 2015 11:38
by gcoupe
Thanks, StanHD!

I suspected as much, but it's good to have confirmation. Now I know to steer clear of those commands in Domoticz, and will tell other members of the household never to go into the Setup menu, on pain of death...

Re: Question: Domoticz System Commands Behaviour On Windows

Posted: Thursday 12 November 2015 16:07
by timldn
Having managed to hit shutdown by accident when aiming for restart I removed the option from the setup menu. You can remove both if you want.

I edited C:\Program Files (x86)\Domoticz\www\index.html with notepad and commented out the relevant line by enclosing it between <!-- and -->

Before editing I'd recommend making a copy of the file just in case.

To remove the shutdown option
<li id="mShutdown"><a id="cShutdown" href="javascript:SwitchLayout('Shutdown')"><img src="images/shutdown.png"> <span data-i18n="Shutdown System">Shutdown System</span></a></li>
becomes
<!-- <li id="mShutdown"><a id="cShutdown" href="javascript:SwitchLayout('Shutdown')"><img src="images/shutdown.png"> <span data-i18n="Shutdown System">Shutdown System</span></a></li> -->

if you want to remove restart
<li id="mRestart"><a id="cRestart" href="javascript:SwitchLayout('Restart')"><img src="images/restart.png"> <span data-i18n="Restart System">Restart System</span></a></li>
becomes
<!-- <li id="mRestart"><a id="cRestart" href="javascript:SwitchLayout('Restart')"><img src="images/restart.png"> <span data-i18n="Restart System">Restart System</span></a></li> -->

If you're removing both you will probably want to comment out the divider as well which is the line above those 2.

Hope that makes sense.

PS you'll probably have to reapply the changes after you do any upgrades to Domoticz

Re: Question: Domoticz System Commands Behaviour On Windows

Posted: Thursday 12 November 2015 17:38
by gcoupe
Thanks for the code, timldn!