Share a USB connected UPS

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Share a USB connected UPS

      I have an APC Back-UPS RS 1300 LCD hanging off a Windows 2016 server via USB and it's currently using the integrated UPS software.

      I'd like to set it up so I can signal my OMV server to shutdown when the UPS power is low.

      I tried to install WINNUT on the server but the USB drive install fails, either way I'd like to keep the UPS on that server and have OMV monitor it remotely. If I have to, I'll switch it around but I'll need instructions on how to install WINNUT and configure it to monitor either way.

      What about apcupsd, is it an option since I'm using an APC UPS?

      Thanks,
    • I have a similar configuration with a UPS attached to my Linux desktop machine. FYI, the NUT plugin in OMV doesn't allow you to configure monitoring a remote NUT server. The plugin installs NUT, but you'll need to configure NUT manually using a terminal to do remote monitoring. When you do it should work just fine.

      Sorry I have no experience with WINNUT. How old is the UPS? I would think most modern units would work with a generic HID driver.

      Edit: It looks like WINNUT is beta, and I'm not even sure if it includes the server side? At least it used to be client only. You may have better luck attaching the UPS to your OMV machine.

      The post was edited 1 time, last by jollyrogr ().

    • OK so if figured I'd try the path of least resistance an setup the UPS on OMV, then try to figure out WINNT, which I believe I already have.

      However OMV isn't recognizing my UPS.

      I have it setup with the following driver config:

      driver = usbhid-ups
      port = auto

      It's plugged into a USB port on OMV.

      I receive the following error, I've also listed the log entry below:

      Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; systemctl start 'nut-server' 2>&1' with exit code '1': A dependency job for nut-server.service failed. See 'journalctl -xn' for details.


      Error #0:
      exception 'OMV\ExecException' with message 'Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; systemctl start 'nut-server' 2>&1' with exit code '1': A dependency job for nut-server.service failed. See 'journalctl -xn' for details.' in /usr/share/php/openmediavault/system/process.inc:175
      Stack trace:
      #0 /usr/share/php/openmediavault/system/systemctl.inc(86): OMV\System\Process->execute(Array, 1)
      #1 /usr/share/php/openmediavault/system/systemctl.inc(104): OMV\System\SystemCtl->exec('start', NULL, false)
      #2 /usr/share/openmediavault/engined/module/nut.inc(83): OMV\System\SystemCtl->enable(true)
      #3 /usr/share/openmediavault/engined/rpc/config.inc(194): OMVModuleNetworkUPSTools->startService()
      #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      #5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      #6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(150): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
      #7 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusz7...', '/tmp/bgoutputjc...')
      #8 /usr/share/php/openmediavault/rpc/serviceabstract.inc(151): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
      #9 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
      #10 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      #11 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
      #12 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
      #13 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
      #14 {main}


      Log entry:

      UPS [ups@localhost]: connect failed: Connection failure: Connection refused
    • OK, it appears to be running. I didn't get fancy under the identifier and just left it as "ups", as for the "Driver configuration directives" I found a post referring to using the lsusb -vvv command on the command line to list what was identified as plugged into the USB ports. It returned a whole list of information including the "vendorid" and "productid" which was used in the example post I found. This lead me to enter the following entries in the "Driver configuration directives" field:

      driver = usbhid-ups
      port = auto
      vendorid = 051d
      productid = 0002

      I then ran sudo upsdrvctl start as instructed and it started the driver successfully.

      I returned to the UPS service and enabled it, it started and I have a whole list of information about the UPS listed under Services/UPS/Varibles.

      However, I do not see any information under the tabs Charge, Load, Temperature, or Voltage? The charts are blank and Temperature has a bunch of sad faces?

      *** Update ***

      Looks like the graphs started recording information, all except the Temperature, it's still sad....

      So does anyone know if I upgrade to a UPS that supports a network card, can NUT be configured to monitor the card vs. USB?

      The post was edited 1 time, last by daveinfla ().

    • What does your "Driver configuration directives" look like when setup for remote monitoring?

      What OS is the other machine?

      I have WINNUT running but it's a complete hack, it started and I assume it's monitoring my OMV server but I don't see any way to check the status.

      Is there anyway to get NUT (on OMV) to monitor an APC network card?
    • The plugin does not provide for this. Steps are roughly as follows. Thorough documentation is available on the network ups tools website. I also referenced this article on the arch wiki. wiki.archlinux.org/index.php/C…tion_of_Network_UPS_Tools

      [*]On the machine connected to the UPS, configure /etc/ups/upsd.users. Then start/enable the nut-server.
      [*]On the remote machine (omv), configure /etc/nut/upsmon.conf with the info that you put in the upsd.users file on the server like MONITOR upsname@host 1 upsduser password slave
      [*]on omv, systemctl enable nut-monitor and systemctl start nut-monitor

      The post was edited 2 times, last by jollyrogr: fix errors ().

    • I finally got WINNUT for Windows to work...I decided I'll try it because I only have 1 Windows server, the OMV box and I plan on bringing up a pFsense box so it will want to use NUT too...

      The version (15) that's on sourceforge.net has a virus, the one listed on networkupstools.org is a hack, none of the .exe files seem to function. At least not on Server 2016.

      I finally found reference to a version with a "WinNUT Configuration Tool" that makes quick work of the install, including installing it as a service. Once configured it connected to NUT on OMV without an issue. However, it doesn't give you much information all you see is the Status change from "Not Running" to either "Running as an Application" or "Running as a service". The only way I truly knew it was connected to the OMV box was the successful login message in the syslog of OMV.

      Here's the link to the article on this working version...

      opengear.zendesk.com/hc/en-us/…afe-shutdown-using-WinNUT

      and here's the download

      code.google.com/archive/p/winnut/downloads