mcc, configure a UPS? - Mandriva

This is a discussion on mcc, configure a UPS? - Mandriva ; On a 2007.1 system I want to try configuring nut to control a tripplite SU1500RTXL2Ua UPS. The UPS has been running under TrippLite's PowerAlert software on a serial connection, but I am curious to see if nut could control it ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: mcc, configure a UPS?

  1. mcc, configure a UPS?

    On a 2007.1 system I want to try configuring nut to control a tripplite
    SU1500RTXL2Ua UPS. The UPS has been running under TrippLite's
    PowerAlert software on a serial connection, but I am curious to see if
    nut could control it over a USB connection. The UPS was connected to
    the system by a UPS cable (in addition the existing serial one), and
    messages showed:

    May 6 11:34:14 safserver kernel: ohci_hcd 0000:00:02.0: wakeup
    May 6 11:34:14 safserver kernel: usb 1-1: new low speed USB device
    using ohci_hcd and address 2
    May 6 11:34:14 safserver kernel: usb 1-1: configuration #1 chosen from
    1 choice
    May 6 11:34:15 safserver kernel: usbcore: registered new driver hiddev
    May 6 11:34:15 safserver kernel: hiddev0: USB HID v1.11 Device [Tripp
    Lite TRIPP LITE UPS ] on usb-0000:00:02.0-1
    May 6 11:34:15 safserver kernel: usbcore: registered new driver usbhid
    May 6 11:34:15 safserver kernel: drivers/usb/input/hid-core.c: v2.6:USB
    HID core driver

    Unfortunately, in MCC -> Hardware the "set up UPS for power monitoring"
    is not selectable. I tried doing:

    urpmi nut
    urpmi nut--server

    and starting MCC again, but it still isn't selectable. Everything else
    in "hardware" is selectable.

    Any ideas how to get MCC working with a UPS? Or should I forget about
    the GUI and just start working directly on the configuration file?

    Thanks,

    David Mathog

  2. Re: mcc, configure a UPS?

    On Tue, 06 May 2008 14:38:39 -0400, David Mathog wrote:

    > Unfortunately, in MCC -> Hardware the "set up UPS for power monitoring"
    > is not selectable. I tried doing:


    That runs drakups ...
    $ rpm -q -f /usr/bin/drakups
    drakxtools-curses-10.29.2-1.1mdv2008.1

    Do you have drakxtools-curses installed?

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  3. Re: mcc, configure a UPS?

    David Mathog wrote:
    > Any ideas how to get MCC working with a UPS? Or should I forget about
    > the GUI and just start working directly on the configuration file?


    Well, tried the manual route. When the mandriva nut packages were
    installed they put this in /etc/group

    ups:x:424:ups

    and this in /etc/passwd

    ups:x:80:424:system user for nut:/var/state/ups:/bin/false

    I configured ups.conf with:

    [safserverups]
    driver = hidups
    port = /dev/hiddev0
    desc = "TrippLite SU 1500RTXL2Ua"

    and tried to start upsd:

    # service upsd start

    NUT Starting UPS model drivers: Network UPS Tools - UPS driver
    controller 2.0.5
    Network UPS Tools: HID UPS driver 0.13 (2.0.5)

    Warning: This is an experimental driver.
    Some features may not function correctly.

    hiddev path open /dev/hiddev0: Permission denied
    Driver failed to start (exit status=1)
    [FAILED]
    NUT Starting UPS daemon: Network UPS Tools upsd 2.0.5
    Can't connect to UPS [safserverups] (safserverups): No such file or
    directory
    [ OK ]


    There is a /dev/hiddev0 file, but its ownership is:

    # ls -al /dev/hiddev0
    crw-rw---- 1 root root 180, 0 May 6 11:34 /dev/hiddev0

    So change the ownership...

    # chown ups.ups /dev/hiddev0

    and then

    # service upsd start
    NUT Starting UPS model drivers: Network UPS Tools - UPS driver
    controller 2.0.5
    Network UPS Tools: HID UPS driver 0.13 (2.0.5)

    Warning: This is an experimental driver.
    Some features may not function correctly.

    Detected Tripp Lite TRIPP LITE UPS
    on port /dev/hiddev0
    [ OK ]
    NUT Starting UPS daemon: Network UPS Tools upsd 2.0.5
    Connected to UPS [safserverups]: safserverups
    [ OK ]

    works. The thing is, if that USB cable ever gets unplugged or
    replugged, or possibly at reboot, or for all I know, even with a package
    upgrade, the /dev/hiddev0 is going to be removed, and then recreated
    with root.root ownership. Is there some way to tell udev that this
    device should belong to ups.ups???

    Tried to start the monitor, but the upsmon.conf.sample supplied
    was apparently not functional, since copying it to upsman.conf and
    doing

    # service upsmon start
    NUT Starting UPS monitor: Network UPS Tools upsmon 2.0.5
    Using power down flag file /etc/killpower


    Fatal error: insufficient power configured!

    Sum of power values........: 0
    Minimum value (MINSUPPLIES): 1

    Edit your upsmon.conf and change the values.
    [FAILED]
    chown: cannot access `/var/run/upsmon.pid': No such file or directory


    Umm. Ok, that file needs at least one MONITOR line, in this case

    MONITOR safserverups@localhost 1 upsmaster master


    Then it starts. Cool, now it sees the UPS...

    # upsc safserverups@localhost
    upsc safserverups@localhost
    battery.charge: 100
    battery.chemistry: PbAc
    battery.runtime: 2080
    battery.voltage: 12.4
    driver.name: hidups
    driver.parameter.port: /dev/hiddev0
    driver.version: 2.0.5
    ups.delay.shutdown: -1
    ups.delay.start: 0
    ups.load: 23
    ups.mfr: Tripp Lite
    ups.model: TRIPP LITE UPS
    ups.serial: 9516ALCPS519400548
    ups.status:

    now where are all of these coming from?
    May 6 12:42:31 safserver hidups[7748]: Unhandled event: 0x850047 (0)

    Google, ok, it says to use newhidups instead of hidups. Sure, that's
    obvious ;-). Change ups.conf to:
    [safserverups]
    driver = newhidups
    port = auto

    and

    # service upsd start
    NUT Starting UPS model drivers: Network UPS Tools - UPS driver
    controller 2.0.5
    Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5)

    No matching HID UPS found
    Driver failed to start (exit status=1)
    [FAILED]
    NUT Starting UPS daemon: Network UPS Tools upsd 2.0.5
    Can't connect to UPS [safserverups] (safserverups): No such file or
    directory
    [ OK ]

    sigh. using /dev/hiddev0 gave the same error. Checking ownership on

    # ls -al /proc/bus/usb/001/002
    -rw-rw---- 1 root usb 52 May 6 11:34 /proc/bus/usb/001/002

    That should have been ok, with group access through usb.
    newhidups -DD auto
    Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5)

    debug level is '2'
    Checking device (0000/0000) (002/001)
    - VendorID: 0000
    - ProductID: 0000
    - Manufacturer: Linux 2.6.17-17mdv ehci_hcd
    - Product: EHCI Host Controller
    - Serial Number: 0000:00:02.1
    - Bus: 002
    Trying to match device
    Device does not match - skipping
    Checking device (09AE/4003) (001/002)
    - VendorID: 09ae
    - ProductID: 4003
    - Manufacturer: Tripp Lite
    - Product: TRIPP LITE UPS
    - Serial Number: 9516ALCPS519400548
    - Bus: 001
    Trying to match device
    This particular Tripp Lite device (09ae/4003) is not (or perhaps not
    yet) supported by newhidups. First try the tripplite_usb driver. If
    this fails, please write to the NUT developer's mailing list.

    Device does not match - skipping
    Checking device (0000/0000) (001/001)
    - VendorID: 0000
    - ProductID: 0000
    - Manufacturer: Linux 2.6.17-17mdv ohci_hcd
    - Product: OHCI Host Controller
    - Serial Number: 0000:00:02.0
    - Bus: 001
    Trying to match device
    Device does not match - skipping
    No appropriate HID device found
    No matching HID UPS found

    Great, hidups works but spews messages, newhidups doesn't see the device.

    Back to the poweralert software for now.

    David Mathog

  4. Re: mcc, configure a UPS?

    David W. Hodgins wrote:
    > On Tue, 06 May 2008 14:38:39 -0400, David Mathog wrote:
    >
    >> Unfortunately, in MCC -> Hardware the "set up UPS for power monitoring"
    >> is not selectable. I tried doing:

    >
    > That runs drakups ...
    > $ rpm -q -f /usr/bin/drakups
    > drakxtools-curses-10.29.2-1.1mdv2008.1
    >
    > Do you have drakxtools-curses installed?


    yes. drakups starts if run directly. "add" finds the UPS device
    and configures it with driver "newhidups". Sadly, as when I did
    it manually, newhidups does not see this UPS when it actually runs.

    Thanks,

    David Mathog

  5. Re: mcc, configure a UPS?

    On Tue, 06 May 2008 16:01:26 -0400, David Mathog wrote:

    > Google, ok, it says to use newhidups instead of hidups. Sure, that's
    > obvious ;-). Change ups.conf to:


    According to
    http://lists.alioth.debian.org/piper...ry/001612.html
    newidups was renamed to usbhid-ups. See if that driver is available.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  6. Re: mcc, configure a UPS?

    David W. Hodgins wrote:
    > On Tue, 06 May 2008 16:01:26 -0400, David Mathog wrote:
    >
    >> Google, ok, it says to use newhidups instead of hidups. Sure, that's
    >> obvious ;-). Change ups.conf to:

    >
    > According to
    > http://lists.alioth.debian.org/piper...ry/001612.html
    > newidups was renamed to usbhid-ups. See if that driver is available.


    Nope, already looked for that. The nut site lists the current stable as
    2.2 but Mandriva 2007.1 has only 2.05. The changelog for 2.05 ends on
    1/15/2007. This is most likely the problem - the support for this
    device was added after the version Mandriva ships was finalized.
    Searching for RPMs... There is nut 2.2.1 for mdv2008.1. Perhaps I can
    build that from the source RPM on this 2007.1 system.

    Thanks,

    David Mathog


+ Reply to Thread