Bug 24839 - Unable to configure a UPS
Summary: Unable to configure a UPS
Status: REOPENED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard: MGA9TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-19 12:13 CEST by Pierre Jarillon
Modified: 2023-12-07 09:22 CET (History)
5 users (show)

See Also:
Source RPM: drakxtools
CVE:
Status comment:


Attachments

Description Pierre Jarillon 2019-05-19 12:13:06 CEST
I use Eaton (was MGE) UPS.
This is an old bug, I have never been able to use any MGE/Eaton UPS with previous Mageia releases.

Now I use Eaton Ellipse Pro 
ID: 0463:ffff
Module: UPS:newhidsups
It is connected with the USB wire provided by Eaton.

With drakups I try to configure the nut.
1- Autodetection don't find any UPS
2- Manual detection: 
   Ellipse Pro is not listed but Eaton wrote me that Ellipse ECO 650/800/1200/1600 VA (USB) has the same interface.
   I select this one.
   Next a form gives: 
      Name: myups 
      Driver: usbhid-ups
      Port: [     ]
The problem is that the list of ports is ttyS0/COM1 to ttyS7/COM8 without any USB port.
Comment 1 Marja Van Waes 2019-05-21 11:27:40 CEST
Hi Pierre :-)

Please give the output of:

   lsusb | grep UPS


and attach your

  /etc/ups/upsd.conf
  /etc/ups/ups.conf

Do you have a nut.conf file? If so, please attach it, too. I don't have it, even if the matching man page exists.

I fake-configured your UPS with drakups and did not select a port. I ended up with (in ups.conf):

  [myups]
      driver = usbhid-ups
      port = /dev/ 

Please test whether it helps if (after attaching ups.conf here, first) you change that line to: 

     port = auto

There is no registered maintainer for nut, so assigning to all packagers collectively
However, CC'ing the mageiatools maintainers in case later on it is proven that the problem is with drakups.
Also CC'ing Dave Hodgins and Shlomi, because they're familiar with using a UPS.

CC: (none) => davidwhodgins, mageiatools, marja11, shlomif
Source RPM: nut => nut (or drakxtools?)
Assignee: bugsquad => pkg-bugs

Marja Van Waes 2019-05-21 11:27:55 CEST

Component: Installer => RPM Packages

Comment 2 Dave Hodgins 2019-05-21 12:28:37 CEST
For a usb connected ups, the port should be specified as auto ...
# tail -n 3 /etc/ups/ups.conf
[nutdev1]
        driver = "usbhid-ups"
        port = "auto"
Comment 3 Pierre Jarillon 2019-05-21 16:36:11 CEST
With Port = auto, I get the same message "Congratulation ... success" but at th next step: "Write support is incomplete. It lacks some support for some extra fiedls that wuld be lost else"


$ lsusb | grep UPS
Bus 001 Device 004: ID 0463:ffff MGE UPS Systems UPS

/etc/ups/upsd.conf contains only comments

/etc/ups/ups.conf contains comments followed with:
[myups]
    driver = usbhid-ups
    port = /dev/
[]
    driver = usbhid-ups
    port = /dev/auto
 
IMO the update by drakups is not correct...
I have edited the file with:
[myups]
    driver = usbhid-ups
    port = /dev/auto

Now $ upsc myups give me 51 lines of data.
Example:
upsc myups | grep  battery
battery.charge: 100
battery.charge.low: 20
battery.runtime: 5273
battery.type: PbAc

My conclusion: drakups must be updated
1- connected with a serial port or USB 
  Should use nut-scanner which find 
  [nutdev1]
        driver = "usbhid-ups"
        port = "auto"
        vendorid = "0463"
        productid = "FFFF"
        product = "Ellipse PRO"
        serial = "P360G19981"
        vendor = "EATON"
        bus = "001"
2- Manual configuration
  should add "auto" in the list of ports and have "auto" as default.
3- There is a bug in the update of /etc/ups/ups.conf

I can help to update drakups and write a documentation which has never been wrote due to a lack of resources.
Pierre Jarillon 2019-05-21 16:36:51 CEST

Source RPM: nut (or drakxtools?) => drakxtools

Comment 4 Dave Hodgins 2019-05-21 17:30:11 CEST
It should not be port = /dev/auto, just
 port = "auto"
Comment 5 Pierre Jarillon 2019-05-21 21:17:33 CEST
Yes, I wrote "auto" in the form but I have found "/dev/auto" in /etc/ups/ups.conf
This was made by /usr/libexec/drakups which is a perl script.

I have not often used Perl: I can read and understand the code but I need some help to modify it.
Comment 6 Dave Hodgins 2019-05-22 11:37:38 CEST
Just tested with port = /dev/auto, and it's working ok here, so that's not a
problem.

The other lines shown by nut-scanner are not needed in ups.conf, just
the device name (nutdev1 on my system, myups on your system), the driver and
port.

In comment 3, it two ups devices specified ...
[myups]
    driver = usbhid-ups
    port = /dev/
[]
    driver = usbhid-ups
    port = /dev/auto

The second device with a null name should not be there. It causes the driver
service to fail to start properly ..
# systemctl restart nut-driver.service 
Job for nut-driver.service failed because the control process exited with error code.

Remove the null device from ups.conf. It should only have ...
[myups]
    driver = usbhid-ups
    port = /dev/auto

I agree drakups should be changed to correctly use port = auto for usb connected
devices.
Comment 7 Pierre Jarillon 2020-01-07 09:42:42 CET
Mageia 7 : The problem is still there.
I need always to correct the config file with an editor.
Comment 8 Aurelien Oudelet 2021-07-06 13:16:42 CEST
Mageia 7 is EOL since July 1st 2021.
There will not have any further bugfix for this release.

You are encouraged to upgrade to Mageia 8 as soon as possible.

@reporter, if this bug still apply with Mageia 8, please let us know it.

@packager, if you work on the Mageia 7 version of your package, please check the Mageia 8 package if issue is also present. In this case, please fix the Mageia 8 version instead.

This bug report will be closed OLD if there is no further notice within 1st September 2021.
Comment 9 Marja Van Waes 2021-09-07 14:10:19 CEST
Hi bug reporter and hi assignee and others involved,

Please reopen this bug report if it is still valid for Mageia 8 or 9(cauldron), and change "Version:" in the upper left of this report accordingly.

This report is being closed as OLD because it was filed against Mageia 7, for which  support ended on June 30th 2021.

Thanks,
Marja

Resolution: (none) => OLD
Status: NEW => RESOLVED

Comment 10 Pierre Jarillon 2021-09-07 17:39:33 CEST
The bug still  there...
drakups must put in /ups.conf
  port = /dev/auto instead of  port = /dev/

Status: RESOLVED => REOPENED
Version: 7 => 8
Resolution: OLD => (none)

Comment 11 Marja Van Waes 2021-09-07 20:54:52 CEST
(In reply to Pierre Jarillon from comment #10)
> The bug still  there...
> drakups must put in /ups.conf
>   port = /dev/auto instead of  port = /dev/

Thanks.

Reassigning to the correct assignee

Assignee: pkg-bugs => mageiatools

papoteur 2023-12-07 09:22:08 CET

Version: 8 => Cauldron
See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=28608
Whiteboard: (none) => MGA9TOO
CC: (none) => yvesbrungard


Note You need to log in before you can comment on or make changes to this bug.