[Nut-upsdev] feature request -- talk to the router, not the UPS
tedm at mittelstaedt.us
Mon Jun 2 09:50:32 UTC 2014
That kind of scheme should be handled by scripting - not by NUT.
As far as having a _perfectly good UPS with no driver_, ANY UPS can
be converted into a "dumb" UPS with the addition of 2 relays.
The first relay is a primary 110 (or 220v) AC coil and a set of NO
contacts. When main power fails the contacts close.
The second relay is a primary 12v DC coil and a variable resistor and a
set of NO contacts. It is wired across the lead-acid battery contacts
in the UPS. The UPS is unplugged from the wall and battery voltage powers
the load until the UPS drops out. The amount of time this takes is
measured. Then the batteries are recharged and the second relay and
variable resistor is connected across the battery terminals, and the UPS
is run for 1/2 of the time with the load attached, at that time the
variable resistor is turned to reduce voltage across the relay until
the relay contacts drop out.
You end up with a set of 2 contacts, one is connected on loss of AC
power, the second is connected on Low Battery. These contacts can be
wired to a serial port on the PC and the Generic UPS driver in NUT
can then be used. The relays and adjustment pot can be put in a
small plastic case and put inside the UPS in the battery compartment.
A variation on that would be if your UPS has a low-battery light,
that light can also be used with a relay.
Or someone can get fancier and use opto-isolators to do this as well.
Incidentally, there are many other schemes that can be used to get
power state into a PC. Here are some:
1) An attached USB printer can be plugged into NON-UPS power. A script
can be run that polls the printer. When the printer goes away the
system is shut down.
2) Most server-class systems have dual power supplies. You plug one
supply into a UPS the other into the wall. When the wall supply goes
offline, the system is shut down. (look into ipmi to learn how to test
for status of dual supplies in a server)
3) An old junky ethernet switch can be plugged into non-UPS power and
a cable plugged into a spare NIC port on the server. A script polls
that port and when it sees the port lose link, it shuts the system down.
On 6/2/2014 1:38 AM, elliot smith wrote:
> I want to propose a universal UPS driver that will work with any and all
> UPSes out there. That driver is called: PING :-)
> It works like this... the user plugs their router into a power source
> OTHER than the UPS. Instead of talking to the UPS, NUT pings the router
> every say, 30 seconds. If the router doesn't respond to the PING, NUT
> keeps trying for a user-configurable amount of time, say, keep trying
> every 10 seconds for the next 2 minutes... if the router is still down,
> then NUT initiates shut-down, no differently than if the UPS driver was
> reporting the the UPS was was running on battery power.
> Sounds stupid, right? Well it is stupid! But having to replace a
> perfectly good working UPS just because you don't have a needed driver is
> also stupid. So it's a lesser of two evils sort of thing. This router
> PING scheme would provide a bare minimum of functionality for users who
> have a non-supported UPS but can not afford to get a new UPS, for users
> who don't need any extra functionality, or for users who are simply
> waiting for a new UPS to arrive. It would also be great for users who are
> simply too lazy to figure out the right USB port and driver to select. I
> guess it could also be an option for the user to configure this router
> PING as a backup for in case the server loses the connection with the UPS.
> (cat chews through the cable? needed to borrow the USB cable for a
> printer? etc.)
> This scheme is simple, and would be effective, and might be good enough
> for users who aren't running a datacenter and who live with cats.
> Please advise if this is something that can be implemented?
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
More information about the Nut-upsdev