It seems the only way to shut down HS4 on Windows is to use the Task Manager or reboot the machine. Then the log says "HomeSeer was not shut down successfully the previous time it was started." So how can it be shut down "successfully"?
Announcement
Collapse
No announcement yet.
No way to gracefully shut down or reboot running on Windows 10
Collapse
X
-
If you can run a batch file command, try this. It works for HS3 at least. I run this from my UPS shutdown script.
Code:curl -X POST -F "scriptcmd=hs.shutdown()" -F "runscript=Execute Command" "http://localhost:[COLOR=#e74c3c]80[/COLOR]/ControlPanel"
The curl command wasn't originally in Windows 10, but has been added in recent builds. On my Win7 Hometroller, I installed it from here: https://curl.haxx.se/windows/
-
Originally posted by ChasNH View PostIt seems the only way to shut down HS4 on Windows is to use the Task Manager or reboot the machine. Then the log says "HomeSeer was not shut down successfully the previous time it was started." So how can it be shut down "successfully"?1 Photo
Comment
-
There are also several plug-ins and utilities that will allow you to shut HS down and restart it programmatically.Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
-
srodgers: HS4 was being started by the Task Scheduler. Therefore, no HS4 window was on the desktop. At this point it is now getting started with Startup Delayer by r2 Stiudios so there is a window. After fighting with my office machine's Avast, I managed to get Remote Desktop Connection working so all is well.
Uncle Michael: As of this writing, there don't seem to be any available for HS4. I have read about numerous plug-ins with that capability but none are listed now.
Comment
-
Originally posted by ChasNH View PostUncle Michael: As of this writing, there don't seem to be any available for HS4. I have read about numerous plug-ins with that capability but none are listed now.
https://shop.homeseer.com/collection...ilities?page=1
Mike____________________________________________________________ __________________
HS3 Pro Edition 3.0.0.548, NUC i3
HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti
Comment
-
Originally posted by Uncle Michael View PostAccording to the HS4 product page, BLShutdown for HS3 is compatible with HS4.
https://shop.homeseer.com/collection...ilities?page=1
Comment
-
OK, so there is supposedly a way to shut down gracefully. That is to click on the little X i8n the upper right corner of the application window. I have done that twice. Both times files got corrupted. Fortunately I did a backup immediately before the last time, so I was able to fix the mess.
So I repeat my question: Is there a way to gracefully shut down HS4? (BTW, it is running on a Windows 10 Pro machine that seems to work fine in all other ways.)
- Likes 1
Comment
-
This is not elegant, but it works. The two-step process gracefully shuts down HomeSeer (HS4), reboots the computer, and has HS4 start automatically. 1) Create an event to run a batch file to shut down Chrome, HS4, and reboot the computer, 2) Create a batch file that Windows 10 initiates when the operating system boots up to start HS4.
In the process I needed a “shortcut” to run the shutdown batch file because the batch file required administrator privileges to shut down HS4. Once the shutdown batch shortcut was created, I used the properties function to specify that the shortcut – and the subsequent batch file -- be executed with administrator privileges. The event in HomeSeer runs the shortcut at the time specified.
Here are the piece parts:
Shutdown and reboot batch file name: Kmptr_Shutdown_Chrome_HS4_reboot.bat
Batch file:REM chrome.exe
REM hs4.exe
REM gracefully shutdown chrome
C:\windows\system32\Taskkill /im chrome.exe
REM wait 10 second
TIMEOUT /T 10
REM gracefully shutdown HS4
C:\windows\system32\taskkill /im hs4.exe
REM Wait one minute for HS4 to shut down
TIMEOUT /T 60
REM reboot the computer
SHUTDOWN /r
Shortcut path for the HS event:
c:\Users\GizzmoSr\Desktop\Kmptr_Shutdown_Chrome_HS4_reboot.b at - Shortcut.lnk
Bootup batch file to load HS4 name: HS_Start.bat
Batch file:REM HSTART BAT File
TIMEOUT /T 180
REM Load HS Speaker Client
START "" "C:\Program Files (x86)\HomeSeer HS3\Speaker.exe"
TIMEOUT /T 60
REM Load HomeSeer
START "" "C:\Program Files (x86)\HomeSeer HS3\HS4.exe"
Some nuances:- This entire process takes about five minutes.
- The timeout in the shutdown batch file allows HS4 to gracefully close before the computer is commanded to reboot. My HS4 takes about 30 seconds to gracefully close.
- The timeouts in the start batch file are to make sure the operating system is stable before the speaker client is loaded, and then to make sure the speaker client is stable before HS4 is started. The Windows 10 reboot start is much quicker than a hardware start from a physical shutdown, but the batch file is used for both. NOTE: The loading of the speaker client is a holdover from HS3, it probably is not require for HS4.
- The “taskkill” functions, executed from the batch file actually close the “windows”; if taskkill is executed from task manger it will instantly (not gracefully) shut down Chrome and HS4.
- The shortcut has the .lnk extension and that needs to be part of the path for the HS4 event.
Final thought, I am driven to this kabuki dance because my Alien Aurora 4 Windows 10 computer which only runs HS4 for home control repeatably crashes every five days and 16 hours – go figure. The crash dump reports a problem with the storport.sys driver. I am still working that, but in the meantime this process allows a gentle shutdown and restart for the HS4 and the resident alien. Do not wish to get the alien beaked at me.
Comment
-
mcsMQTT provides a HS shutdown and a HS restart. It does the same for all plugins individually. The general approach is to follow the API to gracefully shutdown and after a timeout and the process is still running then force it closed. It integrates performance characteristics such as CPU, RAM and Handles that can be used as triggers for event actions that do the shutdown and optionally restart.
Comment
-
I have a shortcut on my device desktop named "Stop HS4" with http://192.168.1.xxx/JSON?request=runevent&id=6. Simple to create and easy to use. One or two seconds after clicking it the page opens and says { "Response":"ok" }
Comment
-
I still use BLShutdown under HS4. It still works just fine. One has to make sure HS starts when the computer reboots with either a scheduled task or R2 Studios Startup Delayer (my choice). BLShutdown cannot make HS start with Windows. It can restart HS without the server restarting. In addition to using Startup Delayer to start HS I also set UAC to minimum so it will start without intervention. I use Jon00’s links to create a menu with the choices
Each choice runs an Event. The Events can also trigger automatically or from a Virtual Device.
These choices are available, though I haven’t needed any automatic restarts since 2016 or so.
HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon
Comment
Comment