Results 1 to 4 of 4

Hybrid View

  1. #1

    Default Tips&Tricks: Using Weather Safety to handle power outage

    I mentioned this yesterday at AIC when Bob was presenting.

    Increasingly we have power shutoffs in California because of wild fires and this has motivated me to find some way to safeguard Observatory and equipment in case power goes off. Especially since after power goes off you could have a rain event mucking everything up!

    Here's what I have done. I have AAG Cloudwatcher and SkyAlert. Both of these output Boltwood II one line file which is being consumed by ACP via the BoltWood File server.

    When either of these weather stations lose power, they basically stop updating the one line file, which is interpreted by ACP as a weather unsafe event (you could look at the BoltwoodFile.wsc to see how). This happens, worst case, after 60 seconds of losing power (that's the update frequency used by BoltWood File server. You could change this, but it should be plenty).

    I have powered by Dome, Mount and Camera system through a UPS. The UPS has enough capacity to power everything for 20 minutes after a powerfailure assuming full charge when this happens. Should be plenty to safe guard everything.

    So here's what happens:
    - If power goes out, weather is marked unsafe
    - This is seen by ACP and triggers weather safety script
    - In weather safety script you want to differentiate between a power failure and and a normal weather safety event
    - To do this, my observatory computer (a Laptop with it's own battery) is NOT powered through the UPS. If there is a power failure it switches from wall power (plugged-in) to battery power
    - I detect if laptop is on battery power and if it is, we determine it is a power failure. This is by reading the wmic database:

    function onBatteryPower()
        Console.PrintLine("Checking if laptop is on battery power (indicating power failure)...");
        try {
            var mgmtObj = new ActiveXObject("WbemScripting.SWbemLocator").ConnectServer(".","root/CIMV2");
            var x = new Enumerator(mgmtObj.ExecQuery("Select * from Win32_Battery")).item().BatteryStatus;
            if(x == 1) {
                Console.PrintLine("...Laptop is on battery power");
                return true;
            } else {
                Console.PrintLine("...Laptop is NOT on battery power");            
                return false;
        } catch(ex) {
            Console.PrintLine("WMI: " + (ex.message ? ex.message : ex));
            return true;
    - In the main weather safety routine, first check if it's power failure, if it is, shut everything down similar to what i do in my shutdownobs for the morning (i.e, park mount/dome, warm camera, and turn off power to everything)
    - if it is not a power failure, then park mount and close up dome and wait to see to see if weather clears up (similar to the default provided with ACP)

    Hope that helps!

  2. #2
    Join Date
    Mar 2015
    Westford, MA


    I like the idea of differentiating between power outage and weather!

    We have very unreliable power, but not for the same reason you have. We had our SkyAlert modified with the power sense add-on. If line voltage drops, it immediately changes condition to rain and then ACP reads the updated Boltwood file. The computer and dome on UPS would still be able to close, but you don't know the true reason why. If the computer dies, the SkyAlert also senses this and sends a hardware trigger directly to dome.

  3. #3
    Join Date
    Oct 2005
    Mesa, AZ


    Once again, thank you Manoj!! Copied to the Add-Ons, Enhancements, and Helper Components ​section, but keep posting them here first. This is the best place!!
    -- Bob

  4. #4
    Join Date
    Apr 2013
    Milton, ON, Canada


    This is the same sort of thing I was trying to do a couple years back for my solar-powered observatory.
    I have a voltage monitoring device (West Mountain Radio PWR Guard Plus) that if the juice goes below 11.5V I typically want to start a shutdown.
    I would love to have a more complete solution for this than my hack.
    Differentiating between power and WX would be very beneficial.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Tips & Tricks: Automatically tabulating needed flats
    By Manoj Koushik in forum Add-Ons, Enhancements, and Helper Components
    Replies: 1
    Last Post: Nov 19, 2019, 17:54
  2. Will ACP tolerate mount power being turning off for safety?
    By Barry Megdal in forum Hardware/Software/Driver Topics Not Directly Related to Our Software
    Replies: 5
    Last Post: Mar 17, 2014, 14:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts