I go bush on New Moon with the imaging rig to a dark sky site and need to shutdown the computer because of battery power.
I had been using APT and it has an easy to use script eg #Shutdown, and shuts down the computer. I then have a USB switch that turns off the Dew Heaters, etc.
We all know automation means more sleep and knowing the mount is parked, the dew heaters are off and battery power is saved, helps.
I’m only new to SGP, but find the software great to use. It was a bit of a jump from APT, but I do like the auto focus, the CMOS camera Gain ability, PHD2 start up and the easy plate solve automation.
I thought a Planisphere link to populate RA and DEC could be useful, especially out bush away from internet coverage.
I manually populate the coordinates from Sky Safari, until I can save an image, then plate solve away.
I have to run a command to shut down my PC as I’m working remotely.
I discovered psshutdown in the pstools.
Basically, in Win 7, you extract the psshutdown.cmd file and pop it in the windows folder. I call it with a little text file psshutdown.cmd /s /f /t 5 - which means shutdown, force apps to close and do it in 5 seconds. You will find examples on the web. You may be able to run a script at the end of the sequence in SGP and do the same.
Thanks for the tips.
I’m a little confused at the moment about this topic.
In Event Settings, Post Event Settings, there’s an option to Park Telescope etc.
There is an option to run a script from there. Am I to understand that I can add a file in here to
shutdown the apps and computer?
Is there a way to shut down SGP at the end of the sequence? Nothing more than that.
If so then a separate application could sit there looking to see if SGP was still running, using the API to see if it was still responding maybe. Then when this application detects that SGP isn’t running it does any remaining close down and turns the PC off.
This has the advantage that it would close down if SGP crashes. It could make an observatory safe as well.
Or could the notification system be used? SGP sends an end of sequence notification and that is picked up and used to do the shut down.
That would be useful, some kind of watchdog monitor, which provides an indicator to an external application to make safe and shut down safely. Of course, if there are issues with ASCOM devices, another application may also have difficulty parking and shutting up shop.
For observatory power and equipment power control (including PC) I use the Lunatico Astronomia Dragonfly; both at my home observatory and remotely in Spain at a shared facility with my imaging partner, Gnomus.
As an example, at my home observatory, the Dragonfly is connected to the observatory network, its ascom driver controls my roof with magnetic sensors for open/close, its relays power on/off my equipment (including booting up, shutting down my mount). Sensors can monitor park position either with direct magnetic sensors on RA and Dec axis or by IR sensors reflecting off say the counterweight bar when in park position. These sensor state changes can trigger scripts. Lunatico provide a number of scripts and templates for adaptation.
In my case, I have added to the script for ShutterClose, inserting my equipment power off, mount shutdown and PC sleep. Within I have inserted double checks for park, sleep delays for ccd to warm up, mount to shut down etc. So when my roof closes, triggered by End of Sequence events (either at the completion of my sequence or due to a safety switch call), the action of closing triggers my observatory shutdown.
There are plenty of other ways of carrying out an observatory shutdown I’m sure.
There are also other lan or usb enabled relay devices that can be scripted - I have used devices made by Aviosys (eg IP switch 9258) previously with scripts for equipment control and observatory shutdown triggered by the Windows Scheduler at a set time.
Thanks for the tips on computer shutdown.
I gave Horia’s script a try in “run script at end of sequence” and it worked ok.
Checked "park telescope at sequence end"
Checked "disconnect all equipment at sequence end"
Added a few seconds on the script to be sure everything finished.
Computer then shut down. It’s a little crude, but much the same as APT.
This will be ok when camping out to save battery power and get some sleep.
It might be to much to ask, though, I wonder if there is a way to shut down other apps running
on the computer, from this script?