On Jan 11, 2018, at 3:14 PM, Ken Olum wrote: > > So I monitored the USB port with wireshark (an interesting endeavor > since I didn't start out with any knowledge of USB protocols). But I > have managed to discover that when I ask Tripp Lite's poweralert > software to schedule a UPS shutdown, it does it by using the SET_REPORT > function of the USB HID protocol with ReportType "Feature", ReportID 21 > (0x15), and 3 bytes of data which are 0x15 followed by the number of > seconds to wait before shutting down in two bytes, LSB first. > > Below I include wireshark packet dissections for two such commands. The > difference is in the "data fragment". In the first case it is 150500, > representing a shutdown in 5 seconds, and the second 153701, > representing a shutdown in 311 = 0x0137 seconds. > > Is this helpful?
Definitely. (The trick will be adding support for this without breaking other models.) Here's the debug output describing ReportID 0x15: 0.070916 Path: UPS.OutletSystem.Outlet.DelayBeforeShutdown, Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 65535 (In case you are interested, this mapping between the "Path" and the report ID is in the HID Report Descriptor which should be early in the Wireshark capture.) Other HID UPS models tend to provide both DelayBeforeShutdown and DelayBeforeStartup, so I will need to reacquaint myself with how that is handled in the code, since your UPS only seems to need one of those (and this command is an exception to the usual 1:1 mapping of HID Usage IDs to NUT variables). That might not happen until the weekend. For completeness, would you mind sending the output of "upsrw" and "upscmd -l"? I would like to verify some of the other mappings, and also publish that here: http://networkupstools.org/ddl/Tripp_Lite/index.html _______________________________________________ Nut-upsuser mailing list Nutemail@example.com http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser