I came up with a concept while reading a book a few days ago about computer engineering. I'm not going to get into how that interface works too much, but basiclly heres what i hope to do. I can make an interface and software on my computer that can monitor 5 (five) inputs. The inputs can have two states, either GND or +5vdc. So heres what i hope to do with it, i want to run at my cottage a software i will design that can monitor 5 inputs, i want to be be able to monitor things like

In well pump
Furnace blower fan
Security (motion) lights

I'm trying to think of a good way to trigger a two position relay ( i forget the short terms right now ), on that is normally on one position, and then when power is applied, switch to the other position until power is lost.

Would the best way to do this to be to find some relays that are powered by 120 or 220 volts, or to use transformers to power the relays, i was thinking maybe 12v or 24v relays that are used to control "zone valve" relays in hydrological heating systems.

Or if there is another soltion, basiclly have to change the on off 120volts to 5vdc or GND depending on if i have 120 or not. (In the case of the well pump, it's pure 220 volts, so unless i can find a 220 relay for that i'll need to figure out how to get myself a neutral)..

I hope this is sort of clear, i'm not there much and i want to know everytime my well pump, furnace blower, etc get power and for how long.