[Nut-upsuser] How to get started (Windows)
Charles Lepple
clepple at gmail.com
Tue Sep 13 12:29:59 UTC 2016
>
>> I think you have that first link working (assuming usbhid-ups is still
>> running). If the server is not running, you can try starting it manually with
>> one or more "-D" flags to see what is going wrong.
>
> Not much here:
>
> ---------------
> C:\Users\Admin>upsdrvctl -DD start
Sorry, I wasn't clear. I meant for you to try "upsd -D".
(I guess the more accurate *nix term for upsd is "daemon", but I have the terms "server" and "client" stuck in my head.)
>
>> On the other hand, if the driver is only running for that 45 second interval,
>> you can also run the driver manually with "-D". ("upsdrvctl start" is
>> primarily a shortcut for systems that stash the drivers out of $PATH, and
>> also to start multiple drivers in sequence.)
>
> This looks better. Could it be related to the missing libusb.dll?
>
Agreed that it looks better, but it wouldn't get that far if it didn't have the proper libusb files.
> C:\Users\Admin>usbhid-ups.exe -a ups -D
> Network UPS Tools - Generic HID driver 0.38 (Windows-v2.6.5-5-7-g72f380c)
The last part is what tells us exactly where to look. Incidentally, that means there was another release (v2.6.5-6...) after the version you have. The version string looks like a mess, but it's the "Windows" branch, based on the main NUT v2.6.5 codebase, 5th release (but the 7th Git commit after the code was tagged). The last part means "Git revision 72f380c...", which is here:
https://github.com/networkupstools/nut/tree/72f380c74f998b98c9c7c08a74d25b3e3109f241
I suspect you will want the newer version for production (there was some issue regarding the popups when certain events happen), but let's get this version working first before changing another variable.
For reference, I think the source code to NUT.exe is here: https://github.com/networkupstools/nut/blob/Windows-v2.6.5-5/scripts/Windows/wininit.c
Going back to the NUT stack:
UPS <-> Driver (usbhid-ups) <-> Server (upsd) <-> Clients (upsmon, upsc)
To make the second link work, you will want to start the server with "upsd -D" (assuming it is not already running) to see what is wrong.
More information about the Nut-upsuser
mailing list