• USB connection to UPS

    From Grimble@2:250/1 to All on Thu May 13 16:19:46 2021
    I have installed two UPSs, "Powercool", which come with a USB cable and
    an application to set parameters and power-fail actions and to monitor performance. However, the application reports "Communication Failure".
    lsusb shows the connection as 0001:0000 Fry's Electronics MEC0003.
    Changing permissions to the corresponding Bus/Device has no effect.
    Googling for Fry's Electronics MEC0003 shows many posts but all seem to
    rely on installing NUT and nut-monitor, which I don't want, because I
    want to use the supplied application. I suspect udev may be involved in correcting the problem, but I don't know enough to go further.
    Can anyone help please?

    --
    Grimble
    Machine 'Haydn' running Plasma 5.20.4 on 5.10.33-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Thu May 13 18:32:56 2021
    On Thu, 13 May 2021 16:19:46 +0100, Grimble wrote:
    I have installed two UPSs, "Powercool", which come with a USB cable and
    an application to set parameters and power-fail actions and to monitor performance. However, the application reports "Communication Failure".
    lsusb shows the connection as 0001:0000 Fry's Electronics MEC0003.
    Changing permissions to the corresponding Bus/Device has no effect.
    Googling for Fry's Electronics MEC0003 shows many posts but all seem to
    rely on installing NUT and nut-monitor, which I don't want, because I
    want to use the supplied application. I suspect udev may be involved in correcting the problem, but I don't know enough to go further.
    Can anyone help please?

    Not me but you mention changing permissions which reminded me
    that I added my login to the usb group. If you do so on your
    system you will need to log out/in to pick up the new group.

    You might also want to "cat /etc/group" to see if there is
    a new group added by your ups software. If so you might
    also add your login id to that group and log out/in.

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Thu May 13 22:10:55 2021
    On Thu, 13 May 2021 11:19:46 -0400, Grimble <grimble@nomail.afraid.org> wrote:

    I have installed two UPSs, "Powercool", which come with a USB cable and
    an application to set parameters and power-fail actions and to monitor performance. However, the application reports "Communication Failure".
    lsusb shows the connection as 0001:0000 Fry's Electronics MEC0003.
    Changing permissions to the corresponding Bus/Device has no effect.
    Googling for Fry's Electronics MEC0003 shows many posts but all seem to
    rely on installing NUT and nut-monitor, which I don't want, because I
    want to use the supplied application. I suspect udev may be involved in correcting the problem, but I don't know enough to go further.
    Can anyone help please?

    I have a usb connected ups. I do use nut to monitor it. A couple of things
    from it's settings may help though ...

    driver = "usbhid-ups"
    port = /dev/auto

    It's installation script creates the user/group ups.

    The program that actually accesses the ups (usbhid-ups) runs as the user ups which is a member of the groups dialout, tty, and usb.

    Don't forget to logout/in for any group changes to take effect.

    The nut-server package includes the file /usr/lib/udev/rules.d/70-nut-usbups.rules
    which sets MODE="664", GROUP="ups" for the actual usb device.

    Connecting the usb cable adds a line to the journal with ...
    kernel: hid-generic 0003:051D:0002.0007: hiddev1,hidraw0: USB HID v1.00 Device [American Power Conversion Back-UPS XS 1300G FW:864.L6 .D USB FW:L6 ] on usb-0000:00:12.0-5/input0

    lsusb shows ...
    Bus 008 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply

    I do recommend using nut. The values returned from the ups are standardized,
    so using the software that comes with it rather then a Mageia package likely doesn't add anything.

    Hope some of this helps.

    Regards, Dave Hodgins

    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Grimble@2:250/1 to All on Sun May 16 15:41:12 2021
    On 13/05/2021 18:32, Bit Twister wrote:
    On Thu, 13 May 2021 16:19:46 +0100, Grimble wrote:
    I have installed two UPSs, "Powercool", which come with a USB cable and
    an application to set parameters and power-fail actions and to monitor
    performance. However, the application reports "Communication Failure".
    lsusb shows the connection as 0001:0000 Fry's Electronics MEC0003.
    Changing permissions to the corresponding Bus/Device has no effect.
    Googling for Fry's Electronics MEC0003 shows many posts but all seem to
    rely on installing NUT and nut-monitor, which I don't want, because I
    want to use the supplied application. I suspect udev may be involved in
    correcting the problem, but I don't know enough to go further.
    Can anyone help please?

    Not me but you mention changing permissions which reminded me
    that I added my login to the usb group. If you do so on your
    system you will need to log out/in to pick up the new group.

    Bit: thanks for the tip. Did that
    You might also want to "cat /etc/group" to see if there is
    a new group added by your ups software. If so you might
    also add your login id to that group and log out/in.

    Nothing found


    --
    Grimble
    Registered Linux User #450547
    Machine 'Bach' running Plasma 5.20.4 on 5.10.33-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From William Unruh@2:250/1 to All on Sun May 16 15:53:52 2021
    On 2021-05-16, Grimble <grimble@nomail.afraid.org> wrote:
    On 13/05/2021 18:32, Bit Twister wrote:
    On Thu, 13 May 2021 16:19:46 +0100, Grimble wrote:
    I have installed two UPSs, "Powercool", which come with a USB cable and
    an application to set parameters and power-fail actions and to monitor
    performance. However, the application reports "Communication Failure".
    lsusb shows the connection as 0001:0000 Fry's Electronics MEC0003.
    Changing permissions to the corresponding Bus/Device has no effect.
    Googling for Fry's Electronics MEC0003 shows many posts but all seem to
    rely on installing NUT and nut-monitor, which I don't want, because I
    want to use the supplied application. I suspect udev may be involved in
    correcting the problem, but I don't know enough to go further.
    Can anyone help please?

    Not me but you mention changing permissions which reminded me
    that I added my login to the usb group. If you do so on your
    system you will need to log out/in to pick up the new group.

    Bit: thanks for the tip. Did that

    Note that you do not have to logout/in to test. just do
    su - <yourusername> That new login will have the new group associated
    with your username. However, you do need to logout/in so as to make it
    the default on your current login. But if you are running in X, the
    background x ( and all programs spawned by it) will still have the old
    group identity of your username, rather than the new one, unless you get
    out of that X session and go into a new one (logout/in fromthe X
    session)

    You might also want to "cat /etc/group" to see if there is
    a new group added by your ups software. If so you might
    also add your login id to that group and log out/in.

    Nothing found



    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Grimble@2:250/1 to All on Sun May 16 15:55:12 2021
    On 13/05/2021 22:10, David W. Hodgins wrote:
    On Thu, 13 May 2021 11:19:46 -0400, Grimble <grimble@nomail.afraid.org> wrote:

    I have installed two UPSs, "Powercool", which come with a USB cable and
    an application to set parameters and power-fail actions and to monitor
    performance. However, the application reports "Communication Failure".
    lsusb shows the connection as 0001:0000 Fry's Electronics MEC0003.
    Changing permissions to the corresponding Bus/Device has no effect.
    Googling for Fry's Electronics MEC0003 shows many posts but all seem to
    rely on installing NUT and nut-monitor, which I don't want, because I
    want to use the supplied application. I suspect udev may be involved in
    correcting the problem, but I don't know enough to go further.
    Can anyone help please?

    I have a usb connected ups. I do use nut to monitor it. A couple of things from it's settings may help though ...

    driver = "usbhid-ups"
    port = /dev/auto

    It's installation script creates the user/group ups.

    The program that actually accesses the ups (usbhid-ups) runs as the user
    ups
    which is a member of the groups dialout, tty, and usb.

    Don't forget to logout/in for any group changes to take effect.

    Checked that
    The nut-server package includes the file /usr/lib/udev/rules.d/70-nut-usbups.rules
    which sets MODE="664", GROUP="ups" for the actual usb device.

    The line for my vendor/product was already there

    Connecting the usb cable adds a line to the journal with ...
    kernel: hid-generic 0003:051D:0002.0007: hiddev1,hidraw0: USB HID v1.00 Device [American Power Conversion Back-UPS XS 1300G FW:864.L6 .D USB
    FW:L6 ] on usb-0000:00:12.0-5/input0

    I found something similar

    lsusb shows ...
    Bus 008 Device 003: ID 051d:0002 American Power Conversion
    Uninterruptible Power Supply

    I do recommend using nut. The values returned from the ups are
    standardized,
    so using the software that comes with it rather then a Mageia package
    likely
    doesn't add anything.

    I got the application to load but it bombed with some display problems,
    so I'll take your advice and set up nut.
    Thanks
    Hope some of this helps.

    Regards, Dave Hodgins



    --
    Grimble
    Registered Linux User #450547
    Machine 'Bach' running Plasma 5.20.4 on 5.10.33-desktop-1.mga8 kernel.
    Mageia release 8 (Official) for x86_64

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Sun May 16 18:04:02 2021
    On Sun, 16 May 2021 10:55:12 -0400, Grimble <grimble@nomail.afraid.org> wrote:
    I got the application to load but it bombed with some display problems,
    so I'll take your advice and set up nut.

    I have nut and nut-server installed on the system the ups is connected to.
    I've chosen to use the device name nutdev1 for my ups, and in the following replaced the actual password with the word munged.

    In /etc/ups/ups.conf I've added the lines ...
    [nutdev1]
    driver = "usbhid-ups"
    port = /dev/auto

    In /etc/ups/upsd.conf I've added the line
    LISTEN 127.0.0.1 3493

    In /etc/ups/upsd.users I've added the lines ...
    [admin]
    password = munged
    actions = SET
    instcmds = ALL
    [upsmon]
    password = munged
    upsmon master

    In /etc/ups/upsmon.conf I have the line ...
    MONITOR nutdev1@localhost 1 upsmon munged master
    with the rest of the uncommented lines being the from the rpm package.

    The command "upsc nutdev1" returns 43 lines such as ...
    battery.charge: 100
    battery.charge.low: 10
    battery.charge.warning: 50
    battery.date: 2001/09/25
    battery.mfr.date: 2013/01/12
    battery.runtime: 579

    Regards, Dave Hodgins


    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Grimble@2:250/1 to All on Sat May 22 16:49:44 2021
    On 16/05/2021 18:04, David W. Hodgins wrote:
    On Sun, 16 May 2021 10:55:12 -0400, Grimble <grimble@nomail.afraid.org> wrote:
    I got the application to load but it bombed with some display problems,
    so I'll take your advice and set up nut.

    I have nut and nut-server installed on the system the ups is connected to. I've chosen to use the device name nutdev1 for my ups, and in the following replaced the actual password with the word munged.

    In /etc/ups/ups.conf I've added the lines ...
    [nutdev1]
            driver = "usbhid-ups"
            port = /dev/auto

    In /etc/ups/upsd.conf I've added the line
    LISTEN 127.0.0.1 3493

    In /etc/ups/upsd.users I've added the lines ...
            [admin]
                    password = munged
                    actions = SET
                    instcmds = ALL
            [upsmon]
                    password  = munged
                    upsmon master

    In /etc/ups/upsmon.conf I have the line ...
    MONITOR nutdev1@localhost 1 upsmon munged master
    with the rest of the uncommented lines being the from the rpm package.
    < snip>
    Thanks Dave, that was very useful. In fact I used nut-scanner and
    modified ups.conf with its output.
    upsdrvctl indicated it could communicate with the UPS:
    "Supported UPS detected with megatec protocol
    Vendor information read in 1 tries"
    but upsc gave
    "Error: Connection failure: Connection refused"
    I guess I'll have to trace the various permissions to see what's wrong.
    Best,

    --
    Grimble
    Registered Linux User #450547
    Machine 'Bach' running Plasma 5.20.4 on 5.10.37-desktop-2.mga8 kernel.
    Mageia release 8 (Official) for x86_64

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Grimble@2:250/1 to All on Sat May 22 17:01:49 2021
    On 22/05/2021 16:49, Grimble wrote:
    On 16/05/2021 18:04, David W. Hodgins wrote:
    On Sun, 16 May 2021 10:55:12 -0400, Grimble
    <grimble@nomail.afraid.org> wrote:
    I got the application to load but it bombed with some display problems,
    so I'll take your advice and set up nut.

    I have nut and nut-server installed on the system the ups is connected
    to.
    I've chosen to use the device name nutdev1 for my ups, and in the
    following
    replaced the actual password with the word munged.

    In /etc/ups/ups.conf I've added the lines ...
    [nutdev1]
             driver = "usbhid-ups"
             port = /dev/auto

    In /etc/ups/upsd.conf I've added the line
    LISTEN 127.0.0.1 3493

    In /etc/ups/upsd.users I've added the lines ...
             [admin]
                     password = munged
                     actions = SET
                     instcmds = ALL
             [upsmon]
                     password  = munged
                     upsmon master

    In /etc/ups/upsmon.conf I have the line ...
    MONITOR nutdev1@localhost 1 upsmon munged master
    with the rest of the uncommented lines being the from the rpm package.
    < snip>
    Thanks Dave, that was very useful. In fact I used nut-scanner and
    modified ups.conf with its output.
    upsdrvctl indicated it could communicate with the UPS:
    "Supported UPS detected with megatec protocol
    Vendor information read in 1 tries"
    but upsc gave
    "Error: Connection failure: Connection refused"
    I guess I'll have to trace the various permissions to see what's wrong.
    Forget that - hadn't started nut-server. Lots of output now, but lots of
    zero values!
    Best,



    --
    Grimble
    Registered Linux User #450547
    Machine 'Bach' running Plasma 5.20.4 on 5.10.37-desktop-2.mga8 kernel.
    Mageia release 8 (Official) for x86_64

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)