MountCMDMountCMD is a software solution to park and shutdown a mount when the computer is shutdown by an UPS. It has been tested with my GM3000 in combination with Windows 10 on a NUC and an APC Back-UPS XS 1400U uninterruptible power supply. MountCMD is a small Java program that I created and which can be found on my server: http://www.dehilster.info/docs/MountCMD.zip In order to use MountCMD the following should be arranged (it is presumed that Java is already installed on the pc):
As the pc has to send the park and shutdown commands through the network to the mount it is essential that the ethernet connection between the pc and mount stays alive during power failure. If the UPS is connected to the pc using a powered USB-hub, then this hub should stay on during power failure as well. A connection to the internet is not required during a power failure. Copy the MountCMD files to the pc At the moment MountCMD has only been tested with the files located in a folder on the desktop. Copy the MountCMD.zip file the desktop and extract it there. Modification of the MountCMD.bat file At line 4 change the path in the command “cd c:\users…” to the directory where the MountCMD files are stored. Basically the section “InFINNity” should be replaced by the username that is used to login into the pc. The current commandset is for 10Micron mounts, but are from the LX200 protocol and may need to be changed the match the commands of your mount. Currently the park position (lines 16 and 18) is set with the scopes facing due east. Modify these lines to customise your parking position. The command :MA# slews the scopes to the position set in these two lines and stops it (i.e. it does not continue with tracking). I have chosen this orientation as it prevents birds to deposit their stuff on the objective when the observatory remains open. Part of the commands is the IP-address (10.0.1.151) and port number (the 10Micron default 3492). These have to be changed where applicable. The “timeout /t …” commands (with time in seconds) can be adjusted at will. The first timeout command is to allow the user to cancel the script when rebooting the pc without the need to shutdown the mount. The second timeout allows the mount to slew to the park position as without this timeout the slew will be stopped immediately or not even begin. Disabling the hibernation mode in WindowsIn order to be able to run a batch script on logoff, hibernation should be disabled:
Enabling visibility of logoff scriptsThis setting allows to cancel the MountCMD script when rebooting the pc while the mount should remain on. This setting is disabled as follows:
Set Maximum wait time for Group Policy scriptsNow we need to tell Windows to wait until MountCMD has finished its job. In the Local Group Policy Editor go to Computer Configuration -> Administrative Templates -> System -> Scripts Then set Maximum wait time for Group Policy scripts to more than the wait time specified in the MountCMD.bat file (e.g. 60s). Set the MountCMD.bat file to be executed on shutdown
Connecting to mount to send “:Sa+00*00:00#”, current date/time is 26/05/2019 10:37:39 Sending :Sa+00*00:00# to 10.0.1.151:3492 Connecting to mount to send “:Sz+90*00:00#”, current date/time is 26/05/2019 10:37:39 Sending :Sz+90*00:00# to 10.0.1.151:3492 Connecting to mount to send “:MA#”, current date/time is 26/05/2019 10:37:39 Sending :MA# to 10.0.1.151:3492 Connecting to mount to send “:shutdown#”, current date/time is 26/05/2019 10:38:09 Sending :shutdown# to 10.0.1.151:3492 When the pc fails to connect to the mount MountCMD will attempt to reconnect up to ten times: Connecting to mount to send “:shutdown#”, current date/time is 26/05/2019 09:38:34 Error connecting to 10.0.1.151:3492 Reconnection attempt #1 Error connecting to 10.0.1.151:3492 … Reconnection attempt #10 Error connecting to 10.0.1.151:3492 No mount found, message not sent… If you have any questions and/or remarks please let me know. |
InFINNity Deck... Astrophotography... Astro-Software... Astro Reach-out... Equipment... White papers...
ASCOM Generic UPS driver ASCOM Envir. SafetyMonitor ASCOM File SafetyMonitor ASCOM SafetyMonitor Hub Astronomical Twilight FITSalize Log10mGrabber MountCMD MountMonitor