First off, apologies if this post is in the wrong place - I have no idea where to put it.
Anyway, the question is relatively straightforward, I'd like to monitor the UPS status of the Mac and fire triggers accordingly.
More specifics:
I have an APC UPS that my Indigo Mac runs on. You can connect it to the Mac via USB and through what I assume is some sort of standardized interface, there are some options in the Energy Saver control panel that it can control (i.e. if running on battery, put Mac to sleep in X minutes or whatever).
We often get small power dips here which trigger the UPS for a few seconds. This is all fine, my Mac keeps running and so does Indigo. However: I have a lot of plugins that start to behave badly and throw errors when the devices they control reboot. Reloading the plugins solves this.
So what I want to do is just have a trigger for when the UPS activates and goes back to line power, so I can wait a minute or so and then run some actions that reload my plugins.
SO: Any ideas on how to have a trigger pick up that Mac event? Is there some sort of Applescript method I can use or something?
Appreciate any help!