Web Power Switch Question/Help


#1

I was wondering if anyone would be able to answer my question and/or help me with something. I currently use a digital loggers Web Power Switch to remotely turn on all my equipment, Computer, Camera Power, Filter Wheel, Rotator, Focuser, etc. Annway, I usually head to bed once I know everything is running and there is no chance of any rain. In the morning I typically find everything is as expected the mount is parked and all of the equipment is disconnected via SGPro. What I would like to know is has anyone written a script that would power down all of the equipment via the Web Power Switch? I believe there is a ASCOM driver for the switch that Chris Rowland wrote but what I don’t know can things be powered down via the Power Switch with a script running in SGPro at the end of the night?

Typically, when I get up in the morning I need to power everything down. It would be great if there is a way to have a script run that would do that for me. There is no reason to wast the power for those hours when it is not needed.

I did a search on the forum and only found a couple of references to this Web Power Switch.

Thanks,
Mark


#2

Watching this thread. I have the same question.


#3

Mark, this has come up a few times before in various guises. We wondered about scripts, but we then realized that an end of sequence script is not the last thing that is executed. I have a similar idea in mind, to close down my obsy once the camera has warmed up gently. Currently, I have an iPad on my bedside table and just log in and power down manually with a few button presses. A couple of simple alternatives spring to mind but they are not exactly elegant: If I have a definitive end of sequence time, then I could equally program one of the WiFi controlled mains switches to turn off 10 minutes afterwards (TPLink or similar). Trouble is, if the obsy shuts down for bad weather, it could be powered up until the morning. The logic to shut the power off requires a number of considerations, including whether to power down the PC itself. I could not find an easy answer.


#4

The difficult bit seems to be turning off the power to the PC, that’s a bit like cutting off the branch you are sitting on.

What I’d do is work on ways that everything else can be made safe and shut down, and only when this is working well then worry about the PC.

Can SGP be closed automatically when the sequence stops? If so some other program, maybe a script, could monitor things and when SGP was no longer running would close the PC. This might also be able to be used to monitor if SGP hasn’t crashed and f it does make the observatory safe.

It’s a bit convoluted but maybe an end of sequence script in SGP could start or signal to an independent process that waited 10 minutes then closed SGP.

There’s no need to physically turn the power to the PC off if it can be shut down or put into some sleep state.


#5

I solved this conundrum via a different route with the Lunatico Astronomia Dragonfly which has an ascom driver and very versatile ability to script. My roof is also controlled by the Dragonfly and as part of the roof close script I call for the power to each device to be switched off allowing for ccd warm ups, booting off my mount, ‘wsleep’ durations between relay triggers etc, the last task is it sends the pc to sleep.

I had used a couple of different ethernet power switches prior to this that had scheduling abilities and could also be scripted. It worked via their own schedules or with a script triggered in Windows task Scheduler but if the obs shut down earlier than anticipated the devices remained powered for many hours, as Buzz noted.

I use this system with the Dragonfly in my home obs and also in the shared remote setup in e-Eye with my imaging partner Steve Milne. The pc is also powered by the Dragonfly with its own bios set to start when the power supply cycles power so we can re-boot remotely if needed. The Dragonfly has an app enabling connection to its relays from anywhere.

It is an excellent product and Jaime from Lunatico is very helpful and responsive.

I’m not sure if I’m transgressing the forum rules here by endorsing the Dragonfly and Lunatico . . . .

HTH

Barry


#6

One useful piece of info - before Win10 allowed for remote shutdown, rather than logoff, I used pstools in small batch files to shut down or restart my PC. I guess I can always still use those - in some script that takes its cue from SGP, makes everything safe, turns the equipment off and finally powers down itself. Sounds like a summer project.


#7

Hello

I use a IPX800 relay webserver who accepts to receive HTTP commands.
Below, two vbs scripts, one to put on the flat screen and the second to put off the flat screen which is connected on relay 7
If that can help
Claude

'Flat_On.vbs
aURL = "http://user:password@192.xxx.xxx.xxx/preset.htm?led7=1"
Set aXMLHTTP = CreateObject(“MSXML2.XMLHTTP”)
Call aXMLHTTP.Open(“GET”, aURL, False)
Call aXMLHTTP.send
Set aXMLHTTP = Nothing

'Flat_Off.vbs
aURL = "http://user:password@192.xxx.xxx.xxx/preset.htm?led7=0"
Set aXMLHTTP = CreateObject(“MSXML2.XMLHTTP”)
Call aXMLHTTP.Open(“GET”, aURL, False)
Call aXMLHTTP.send
Set aXMLHTTP = Nothing


#8

Thanks everyone for your feedback and help.I’m going to play some with the Web Power Switch to see if I can get a script to run. Maybe I can get things to power up and down using a script without needing to log onto the switch each time.

Regards,
Mark


www.mainsequencesoftware.com