1

I am trying to configure NUT for my Mecer UPS and it is asking me for the port that the UPS is connected to, in the NUT ups.conf example it shows

port = /dev/ttyS1

How can I determine the port that the UPS USB is connected to?

The Linux is CentOS 6 and it is a Mecer USB UPS.

I tried to plug it in and run dmesg put I can't make any sense of the output

usb 1-6: new low speed USB device number 103 using xhci_hcd
usb 1-6: New USB device found, idVendor=0665, idProduct=5161
usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-6: Product: USB to Serial
usb 1-6: Manufacturer: INNO TECH
usb 1-6: configuration #1 chosen from 1 choice
generic-usb 0003:0665:5161.0067: hiddev96,hidraw0: USB HID v1.00 Device [INNO TECH USB to Serial] on usb-0000:00:14.0-6/input0
TheLovelySausage
  • 4,183
  • 9
  • 30
  • 49

1 Answers1

1

The CentOS rpm probably comes with utility nut-scanner which will do the hard work for you. Run it to check for any suitable usb devices:

$ nut-scanner -U

and it will ouput a suitable stanza if it finds the device. Since it seems your device has been recognised as HID (human interface device) you will probably just need a minimal ups.conf entry giving the driver:

[myups]
 driver = usbhid-ups
 port = auto
 desc = myMecer
meuh
  • 49,672
  • 2
  • 52
  • 114
  • Thanks for the response, I tried the entry you suggested but when I ran upsdrvctl start I got an error saying No mathcing HID UPS found, Driver failed to start (exit status=1) – TheLovelySausage Dec 09 '16 at 06:31
  • Run `nut-scanner`. – meuh Dec 09 '16 at 06:51
  • 1
    It seems that if I changed the driver to blazer_usb and installed usbutils then it seems to find the UPS. It seems the problem was related to a combination of the wrong driver and missing the usbutils. Your answer was the most helpful to get me on the right track so I will mark this as the answer – TheLovelySausage Dec 09 '16 at 07:28
  • Thanks. I have an Eaton UPS and lots of packages already installed so I didnt see any problems when doing the scan and config. Your experience and solution will no doubt help others with the same problem. – meuh Dec 09 '16 at 08:17
  • All the other UPS I have set up have been Eatons, I love them they just cooperate with Linux so nicely – TheLovelySausage Dec 09 '16 at 09:48
  • Another UPS related question that you may know the answer too is, how do I remove the 30 second delay for the shutdown command. The UPS gets to critically low battery and then initiates the shutdown which says shutting down in 30 seconds but the UPS dies before then – TheLovelySausage Dec 09 '16 at 10:11
  • The `SHUTDOWNCMD` or `FINALDELAY` in `/etc/ups/upsmon.conf` might be setting this timeout. You might be able to change the low battery threshold on the ups to trigger earlier, see this similar [question](http://unix.stackexchange.com/q/324933/119298) for some ideas, or post a new question. – meuh Dec 09 '16 at 10:26