[Nut-upsdev] Tripplite OMNI1000LCD Watchdog

Arjen de Korte nut+devel at de-korte.org
Tue Dec 11 20:44:01 UTC 2007


Thomas Golding wrote:

> I'm working with usbhid-ups and a Tripplite OMNI1000LCD. I used a USB packet
> sniffer to discover something cool about the watchdog feature in this unit.
> (not sure if the other OMNI-X-LCD models work the same or not.) Basically
> there's a single HID variable at Report ID 0x52
> (UPS.OutletSystem.Outlet.ffff0092) that's one byte (0-255 int) and it
> contains the Watchdog timeout value. If it's set to zero, the watchdog is
> effectively disabled. If it's set to >0, it represents the amount of time
> (in seconds) the UPS will count down to reboot if it looses comms with the
> PC. Tripplite's PowerAlert software just writes a user-assigned number to
> this location to enable watchdog.

That is a highly dangerous feature. If someone accidentally removes the
USB plug, it would trip the watchdog.

> I've looked at the code for 2.2.0, 2.2.1-pre, and SVN rev. 1170 (12-08-2007)
> and none of them seems to implement watchdog in usbhid-ups at all.

No, although it can be done pretty easily in the subdriver. There is no
need to do this in usbhid-ups (and we won't do that either, see below).

> Could anyone point me in the right direction on how to code
> ups.watchdog.status and reset.watchdog in usbhid-ups?

See if what I came up with in the trunk (r1175) suits your needs. The
following commands control the watchdog:

	upsc <upsname> ups.watchdog.status (shows time left)
	upscmd -u <user> -p <pass>] <ups> reset.watchdog[=seconds]

By default, the latter command will write '60' to this variable if
called without the optional seconds, but you can override this. You'll
need to hack up a script that periodically calls this command to keep
your watchdog happy.

This feature is far too dangerous to include in the mainstream NUT, so
adding these variables to the tripplite-hid subdriver is as far as I
want to go.

Best regards, Arjen



More information about the Nut-upsdev mailing list