nut
nut copied to clipboard
Add support for AEG UPS Protect D series, like model D3000, using USB connection
Hi, first thanks for your work. Sorry for my english but it is not my native language, i will do my best. May it possible to add support for aeg ups protect d serie like model D3000 use usb connexion.
I used usbhid-ups driver, it got some basic information but not importante information like batterie state, online state etc
It will be a pleasure to help if i can but i'm not a dev!!!
i can use usbmon and wireshark to help you if you need some info to reverse or some screenshot of nut to get result of cli
Hello and welcome!
Could you please check in the service or system logs whether the NUT driver (usbhid-ups
in this case) has any complaints during initialization?
For example, you can stop the NUT services and run the driver from command line with higher debug verbosity in probing mode, and paste the result here, e.g. (assuming your ups.conf
section for the device is named aeg
):
:; /lib/nut/usbhid-ups -a aeg -DDDDDD -d 1
This should report many details about looking at different USB devices and trying the matching options, and finally make one walk to collect data and dump it similarly to upsc
client, and exit the driver.
In particular, the "online state" is a rather fundamental piece of information. There were reports of it staying as "OB" regardless of device physical state, that were linked to USB connectivity/permissions problems (e.g. if the OS did not hand off the device completely to the NUT driver program -- more so if virtualization or some complex USB stacks with filter drivers are involved, like that on Windows).
There is also a possibility to generate a skeleton subdriver based on a special "explore"-mode device walk from usbhid-ups
, see https://github.com/networkupstools/nut/blob/master/docs/hid-subdrivers.txt - it may be never too late to become a bit of a dev :)
For hints about installing pre-requisites to build custom NUT from sources (e.g. so you can test the custom driver right from that build workspace, without replacing packaged NUT until you are satisfied with the code customization), see https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests
Thanks to your answer, with usbhid-ups driver, the
I'm using now nutq-qx driver cause it tell more information than usbhid-ups usbhid-ups online state is OB nutq-qx online state is OL and when I'm on battery with no AC input it is good value
The test I had make on AC input and after on 0V input: the result:
root@DARYL:/etc/nut# upsc nutdev1
Init SSL without certificate database
battery.voltage: 2.30
device.type: ups
driver.name: nutdrv_qx
driver.parameter.bus: 001
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.product: USB UPS
driver.parameter.productid: 0003
driver.parameter.synchronous: auto
driver.parameter.vendor: PPC
driver.parameter.vendorid: 06DA
driver.version: 2.8.0
driver.version.data: Q1 0.07
driver.version.internal: 0.32
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
input.frequency: 49.9
input.voltage: 229.1
ups.beeper.status: disabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 13
ups.productid: 0003
ups.status: OL
ups.temperature: 24.3
ups.type: online
ups.vendorid: 06da
Broadcast message from nut@DARYL (somewhere) (Fri Dec 8 00:39:00 2023):
UPS nutdev1@localhost on battery
Broadcast message from nut@DARYL (somewhere) (Fri Dec 8 00:39:00 2023):
UPS nutdev1@localhost on battery
# upsc nutdev1
Init SSL without certificate database
battery.voltage: 2.00
device.type: ups
driver.name: nutdrv_qx
driver.parameter.bus: 001
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.product: USB UPS
driver.parameter.productid: 0003
driver.parameter.synchronous: auto
driver.parameter.vendor: PPC
driver.parameter.vendorid: 06DA
driver.version: 2.8.0
driver.version.data: Q1 0.07
driver.version.internal: 0.32
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
input.frequency: 0.0
input.voltage: 0.0
ups.beeper.status: disabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 13
ups.productid: 0003
ups.status: OB
ups.temperature: 23.9
ups.type: online
ups.vendorid: 06da
In this test, it is missing battery the left and battery % rester time on battery
> :; /lib/nut/nutdrv-qx -a aeg -DDDDDD -d 1
root@DARYL:/home/magade# systemctl stop nut-client
root@DARYL:/home/magade# systemctl stop nut-server
root@DARYL:/home/magade# systemctl stop nut-monitor
root@DARYL:/home/magade# systemctl stop nut-driver
Failed to stop nut-driver.service: Unit nut-driver.service not loaded.
root@DARYL:/home/magade# :; /lib/nut/nutdrv_qx -a nutdev1 -DDDDDD -d 1
Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0)
USB communication driver (libusb 1.0) 0.43
0.000000 [D1] debug level is '6'
0.001264 [D5] send_to_all: SETINFO device.type "ups"
0.001359 [D1] upsdrv_initups...
0.037643 [D2] Checking device 1 of 6 (174C/55AA)
0.037887 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
0.037960 [D2] Checking device 2 of 6 (1D6B/0003)
0.038054 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
0.038125 [D2] Checking device 3 of 6 (0557/2304)
0.038219 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
0.038283 [D2] Checking device 4 of 6 (06DA/0003)
0.044482 [D2] - VendorID: 06da
0.044558 [D2] - ProductID: 0003
0.044619 [D2] - Manufacturer: PPC
0.044678 [D2] - Product: USB UPS
0.044736 [D2] - Serial Number: unknown
0.044794 [D2] - Bus: 001
0.044852 [D2] - Device: unknown
0.044911 [D2] - Device release number: 0003
0.044972 [D2] Trying to match device
0.045032 [D3] match_function_regex: matching a device...
0.045388 [D2] Device matches
0.045457 [D2] Reading first configuration descriptor
0.045541 [D3] libusb_kernel_driver_active() returned 0
0.045614 [D2] failed to claim USB device: Resource busy
0.046054 [D2] Kernel driver already detached
0.046133 [D2] failed to claim USB device: Resource busy
0.046202 [D2] Kernel driver already detached
0.046267 [D2] failed to claim USB device: Resource busy
0.046328 [D2] Kernel driver already detached
0.046399 [D2] failed to claim USB device: Resource busy
0.046465 [D2] Kernel driver already detached
0.046532 Can't claim USB device [06da:0003]@0/0: Entity not found
root@DARYL:/home/magade#
root@DARYL:/home/magade# lsusb
Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0557:2304 ATEN International Co., Ltd IO Module
Bus 001 Device 080: ID 06da:0003 Phoenixtec Power Co., Ltd 1300VA UPS
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@DARYL:/home/magade#
my ups.conf:
nut.conf ups.conf upsd.conf upsd.users upsmon.conf upssched.conf
root@DARYL:/etc/nut# cat ups.conf
# Network UPS Tools: example ups.conf
#
# --- SECURITY NOTE ---
#
# If you use snmp-ups and set a community string in here, you
# will have to secure this file to keep other users from obtaining
# that string. It needs to be readable by upsdrvctl and any drivers,
# and by upsd.
#
# ---
#
# This is where you configure all the UPSes that this system will be
# monitoring directly. These are usually attached to serial ports, but
# USB devices and SNMP devices are also supported.
#
# This file is used by upsdrvctl to start and stop your driver(s), and
# is also used by upsd to determine which drivers to monitor. The
# drivers themselves also read this file for configuration directives.
#
# The general form is:
#
# [upsname]
# driver = <drivername>
# port = <portname>
# < any other directives here >
#
# The section header ([upsname]) can be just about anything as long as
# it is a single word inside brackets. upsd uses this to uniquely
# identify a UPS on this system.
#
# If you have a UPS called snoopy, your section header would be "[snoopy]".
# On a system called "doghouse", the line in your upsmon.conf to monitor
# and manage it would look something like this:
#
# MONITOR snoopy@doghouse 1 upsmonuser mypassword primary
#
# It might look like this if monitoring in "secondary" mode (without any
# ability to directly manage the UPS) from a different system:
#
# MONITOR snoopy@doghouse 1 upsmonuser mypassword secondary
#
# Configuration directives
# ------------------------
#
# These directives are used by upsdrvctl only and should be specified outside
# of a driver definition:
#
# maxretry: OPTIONAL. Specify the number of attempts to start the driver(s),
# in case of failure, before giving up. A delay of 'retrydelay' is
# inserted between each attempt. Caution should be taken when using
# this option, since it can impact the time taken by your system to
# start.
#
# The built-in default is 1 attempt.
#
# retrydelay: OPTIONAL. Specify the delay between each restart attempt of the
# driver(s), as specified by 'maxretry'. Caution should be taken
# when using this option, since it can impact the time taken by your
# system to start.
#
# The default is 5 seconds.
#
# chroot: OPTIONAL. Used for securing. See man page for details.
#
# driverpath: OPTIONAL. Used for custom setups. See man page for details.
#
# nowait: OPTIONAL. Tell upsdrvctl to not wait at all for the driver(s)
# to execute the requested command. Fire and forget.
#
# pollinterval: OPTIONAL. The status of the UPS will be refreshed after a
# maximum delay which is controlled by this setting (default
# 2 seconds). This may be useful if the driver is creating too
# much of a load on your system or network.
# Note that some drivers also have an option called *pollfreq*
# which controls how frequently some of the less critical
# parameters are polled. See respective driver man pages.
#
# Set maxretry to 3 by default, this should mitigate race with slow devices:
maxretry = 3
# These directives can be set outside and inside a driver definition, with
# slightly different meanings per context:
#
# maxstartdelay: OPTIONAL. This can be set as a global variable
# above your first UPS definition and it can also be
# set in a UPS section. This value controls how long
# upsdrvctl will wait for the driver to finish starting.
# This keeps your system from getting stuck due to a
# broken driver or UPS.
# The default is 45 seconds.
#
# debug_min: OPTIONAL. Specify a minimum debug level for all driver daemons
# (when specified at global level), or for this driver daemon
# (when specified in a driver section), e.g. for troubleshooting
# a deployment. This does not directly impact the foreground or
# background running mode. If both the global and driver level
# `debug_min` are set, the driver-level setting takes precedence.
# Command-line option `-D` can only increase this verbosity level.
#
# user, group: OPTIONAL. Overrides the compiled-in (also global-section,
# when used in driver section) default unprivileged user/group
# name for NUT device driver. Impacts access rights used for
# the socket file access (group) and communication ports (user).
#
# synchronous: OPTIONAL. The driver work by default in asynchronous
# mode (like *no*) with fallback to synchronous if sending
# fails (i.e *synchronous=auto*). This means that all data
# are pushed by the driver on the communication socket to
# upsd (Unix socket on Unix, Named pipe on Windows) without
# waiting for these data to be actually consumed. With
# some HW, such as ePDUs, that can produce a lot of data,
# asynchronous mode may cause some congestion, resulting in
# the socket to be full, and the driver to appear as not
# connected. By enabling the 'synchronous' flag
# (value = 'yes'), the driver will wait for data to be
# consumed by upsd, prior to publishing more. This can be
# enabled either globally or per driver.
#
# The default is 'no' (i.e. asynchronous mode) for backward
# compatibility of the driver behavior.
#
# These directives are common to all drivers that support ups.conf:
#
# driver: REQUIRED. Specify the program to run to talk to this UPS.
# apcsmart, bestups, and sec are some examples.
#
# port: REQUIRED. The serial port where your UPS is connected.
# /dev/ttyS0 is usually the first port on Linux boxes, for example.
#
# sdorder: OPTIONAL. When you have multiple UPSes on your system, you
# usually need to turn them off in a certain order. upsdrvctl
# shuts down all the 0s, then the 1s, 2s, and so on. To exclude
# a UPS from the shutdown sequence, set this to -1.
#
# The default value for this parameter is 0.
#
# desc: optional, to keep a note of the UPS purpose, location, etc.
#
# nolock: optional, and not recommended for use in this file.
#
# If you put nolock in here, the driver will not lock the
# serial port every time it starts. This may allow other
# processes to seize the port if you start more than one by
# mistake.
#
# This is only intended to be used on systems where locking
# absolutely must be disabled for the software to work.
#
# ignorelb: OPTIONAL. Ignore low battery condition reported by device,
# and evaluate remaining battery charge or runtime instead.
# See man page for details.
#
# usb_set_altinterface(=num): OPTIONAL. Require that NUT calls this method
# to set the interface, even if 0 (default). Some devices require
# the call to initialize; others however can get stuck due to it -
# so it is not called by default. Yet others can be composite
# devices which use a non-zero interface to represent the UPS.
#
# default.<variable>: OPTIONAL. Set a default value for <variable> which is
# used in case the UPS doesn't provide a value, but which will be
# overwritten if a value is available from the UPS, e.g.:
# default.input.voltage.nominal = 230
# will report the nominal input voltage to be 230, unless the UPS
# eventually tells us differently.
#
# override.<variable>: OPTIONAL. Set a value for <value> that overrides
# (for NUT) any value that may be read from the UPS.
# Used for overriding values from the UPS that are clearly wrong
# (e.g. some devices report wrong values for battery voltage):
# override.battery.voltage.nominal = 12
# Use with caution! This will only change the appearance of the
# variable to the outside world (and NUT calculations), internally
# in the UPS the original value is used.
#
# Anything else is passed through to the hardware-specific part of
# the driver.
#
# Examples
# --------
#
# A simple example for a UPS called "powerpal" that uses the blazer_ser
# driver on /dev/ttyS0 is:
#
# [powerpal]
# driver = blazer_ser
# port = /dev/ttyS0
# desc = "Web server"
#
# If your UPS driver requires additional settings, you can specify them
# here. For example, if it supports a setting of "1234" for the
# variable "cable", it would look like this:
#
# [myups]
# driver = mydriver
# port = /dev/ttyS1
# cable = 1234
# desc = "Something descriptive"
#
# To find out if your driver supports any extra settings, start it with
# the -h option and/or read the driver's documentation.
[nutdev1]
driver = "nutdrv_qx"
# driver = "usbhid-ups"
port = "auto"
vendorid = "06DA"
productid = "0003"
product = "USB UPS"
vendor = "PPC"
bus = "001"
root@DARYL:/etc/nut#
Nice, so at least this device talks a variant of Megatec Q
There were quite a few fixes to nutdrv_qx
lately, so I encourage you to check that wiki article and try a custom build of current NUT master codebase. Chances are, more info would be seen then (maybe not, we'll see).
For service-stopping, please check if you have a [email protected]
instance which wraps the single driver?
Also, I think systemctl stop nut.target
might cover all the relevant units (including the upsd
data server though, so you "lose" upsc
reports) in one swoop. So stopping a nut-driver.target
may be better for this situation.
For service-stopping, please check if you have a
[email protected]
instance which wraps the single driver? root@DARYL:/etc/nut# [email protected] bash: [email protected]: command not found root@DARYL:/etc/nut# systemctl list-units --type=service | grep nut [email protected] loaded active running Network UPS Tools - device driver for NUT device 'nutdev1' root@DARYL:/etc/nut#
WITH DRIVER USBHID-UPS activate in ups.conf
root@DARYL:/etc/nut# :; /lib/nut/usbhid-ups -a nutdev1 -DDDDDD -d 1
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
0.000000 [D1] debug level is '6'
0.001209 [D5] send_to_all: SETINFO device.type "ups"
0.001291 [D2] Initializing an USB-connected UPS with library libusb-1.0.26 (API: 0x1000109) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
0.001355 [D1] upsdrv_initups (non-SHUT)...
0.037151 [D2] Checking device 1 of 6 (174C/55AA)
0.037363 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
0.037432 [D2] Checking device 2 of 6 (1D6B/0003)
0.037526 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
0.037628 [D2] Checking device 3 of 6 (0557/2304)
0.037730 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
0.037794 [D2] Checking device 4 of 6 (06DA/0003)
0.043704 [D2] - VendorID: 06da
0.043779 [D2] - ProductID: 0003
0.043839 [D2] - Manufacturer: PPC
0.043898 [D2] - Product: USB UPS
0.043956 [D2] - Serial Number: unknown
0.044013 [D2] - Bus: 001
0.044069 [D2] - Device: unknown
0.044127 [D2] - Device release number: 0003
0.044184 [D2] Trying to match device
0.044243 [D2] match_function_subdriver (non-SHUT mode): matching a device...
0.044319 [D3] match_function_regex: matching a device...
0.044661 [D2] Device matches
0.044726 [D2] Reading first configuration descriptor
0.044810 [D3] libusb_kernel_driver_active() returned 0
0.044881 [D2] failed to claim USB device: Resource busy
0.044948 [D2] Kernel driver already detached
0.045014 [D2] failed to claim USB device: Resource busy
0.045080 [D2] Kernel driver already detached
0.045145 [D2] failed to claim USB device: Resource busy
0.045211 [D2] Kernel driver already detached
0.045276 [D2] failed to claim USB device: Resource busy
0.045344 [D2] Kernel driver already detached
0.045410 Can't claim USB device [06da:0003]@0/0: Entity not found
root@DARYL:/etc/nut#
root@DARYL:/etc/nut# upsc nutdev1
Init SSL without certificate database
device.mfr: PPC
device.model: USB UPS
device.type: ups
driver.name: usbhid-ups
driver.parameter.bus: 001
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.product: USB UPS
driver.parameter.productid: 0003
driver.parameter.synchronous: auto
driver.parameter.vendor: PPC
driver.parameter.vendorid: 06DA
driver.version: 2.8.0
driver.version.data: Phoenixtec/Liebert HID 0.41
driver.version.internal: 0.47
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
ups.mfr: PPC
ups.model: USB UPS
ups.productid: 0003
ups.status: OB
ups.vendorid: 06da
root@DARYL:/etc/nut#
see ups/status is wrong "OB" cause there are AC input on 230V
If it could be helpful
root@DARYL:/etc/nut# nut-scanner
Scanning USB bus.
No start IP, skipping SNMP
Scanning XML/HTTP bus.
No start IP, skipping NUT bus (old connect method)
Scanning NUT bus (avahi method).
[nutdev1]
driver = "nutdrv_qx"
port = "auto"
vendorid = "06DA"
productid = "0003"
product = "USB UPS"
vendor = "PPC"
bus = "001"
root@DARYL:/etc/nut#
see ups/status is wrong "OB" cause there are AC input on 230V
Yes, the device does not actually talk USB HID properly, but just seems to do so. Thus the driver remains at some default value for the status, which is probably a bug, come to think of it. Either this, or libusb provides some bogus reply (always same in such cases on different platforms) which the driver interprets honestly and not our bug then.
failed to claim USB device: Resource busy
So, beside finding that [email protected]
exists - did you stop it first (before running the driver programs from command-line)?
Also, for large "text screenshots", please wrap them into lines of 3 or 4 backticks (same count on start and finish), so they would be formatted as code blocks and be better readable :)
see ups/status is wrong "OB" cause there are AC input on 230V
Yes, the device does not actually talk USB HID properly, but just seems to do so. Thus the driver remains at some default value for the status, which is probably a bug, come to think of it. Either this, or libusb provides some bogus reply (always same in such cases on different platforms) which the driver interprets honestly and not our bug then.
failed to claim USB device: Resource busy
So, beside finding that
[email protected]
exists - did you stop it first (before running the driver programs from command-line)?
I succeed to stop only driver with the command line root@DARYL:/etc/nut# systemctl stop [email protected]
This is what I got now:
root@DARYL:/etc/nut# :; /lib/nut/nutdrv_qx -a nutdev1 -DDDDDD -d 1
Network UPS Tools - Generic Q* USB/Serial driver 0.32 (2.8.0)
USB communication driver (libusb 1.0) 0.43
0.000000 [D1] debug level is '6'
0.001691 [D5] send_to_all: SETINFO device.type "ups"
0.002274 [D1] upsdrv_initups...
0.038947 [D2] Checking device 1 of 6 (174C/55AA)
0.039672 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
0.040234 [D2] Checking device 2 of 6 (1D6B/0003)
0.040801 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
0.040872 [D2] Checking device 3 of 6 (0557/2304)
0.041431 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
0.041953 [D2] Checking device 4 of 6 (06DA/0003)
0.047907 [D2] - VendorID: 06da
0.048188 [D2] - ProductID: 0003
0.048253 [D2] - Manufacturer: PPC
0.048313 [D2] - Product: USB UPS
0.048367 [D2] - Serial Number: unknown
0.048425 [D2] - Bus: 001
0.048481 [D2] - Device: unknown
0.048540 [D2] - Device release number: 0003
0.048598 [D2] Trying to match device
0.048658 [D3] match_function_regex: matching a device...
0.049017 [D2] Device matches
0.049082 [D2] Reading first configuration descriptor
0.049164 [D3] libusb_kernel_driver_active() returned 0
0.049281 [D2] Claimed interface 0 successfully
0.049349 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
0.049428 [D5] send_to_all: SETINFO ups.vendorid "06da"
0.049498 [D5] send_to_all: SETINFO ups.productid "0003"
0.050703 [D3] send: QGS
0.148177 [D5] read: (5 bytes) => 28 4e 41 4b 0d
0.148253 [D3] read: (NAK
0.148321 [D2] qx_process_answer: query rejected by the UPS (input.voltage)
1.148942 [D3] send: Connection timed out (-7)
1.149052 [D4] qx_process: failed to preprocess answer [input.voltage]
1.151541 [D3] send: Pipe error (-9)
1.922712 [D1] Device reset handled
1.923335 [D4] qx_process: failed to preprocess answer [input.voltage]
1.955031 [D2] Checking device 1 of 6 (174C/55AA)
1.955155 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
1.955207 [D2] Checking device 2 of 6 (1D6B/0003)
1.955276 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
1.955327 [D2] Checking device 3 of 6 (0557/2304)
1.955396 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
1.955445 [D2] Checking device 4 of 6 (06DA/0003)
1.961286 [D2] - VendorID: 06da
1.961343 [D2] - ProductID: 0003
1.961387 [D2] - Manufacturer: PPC
1.961430 [D2] - Product: USB UPS
1.961474 [D2] - Serial Number: unknown
1.961519 [D2] - Bus: 001
1.961563 [D2] - Device: unknown
1.961606 [D2] - Device release number: 0003
1.961649 [D2] Trying to match device
1.961693 [D3] match_function_exact: matching a device...
1.961739 [D3] match_function_regex: matching a device...
1.961814 [D2] Device matches
1.961859 [D2] Reading first configuration descriptor
1.961920 [D3] libusb_kernel_driver_active() returned 0
1.962006 [D2] Claimed interface 0 successfully
1.962058 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
1.964091 [D3] send: M
2.053235 [D5] read: (5 bytes) => 28 4e 41 4b 0d
2.053292 [D3] read: (NAK
2.053349 [D2] voltronic_qs_protocol: invalid protocol [(NAK]
2.053397 [D4] ups_infoval_set: failed to preprocess value [ups.firmware.aux: (NAK]
3.053976 [D3] send: Connection timed out (-7)
3.054086 [D4] qx_process: failed to preprocess answer [ups.firmware.aux]
3.056925 [D3] send: Pipe error (-9)
3.830639 [D1] Device reset handled
3.831205 [D4] qx_process: failed to preprocess answer [ups.firmware.aux]
3.866248 [D2] Checking device 1 of 6 (174C/55AA)
3.866401 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
3.866473 [D2] Checking device 2 of 6 (1D6B/0003)
3.866570 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
3.866633 [D2] Checking device 3 of 6 (0557/2304)
3.866731 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
3.866797 [D2] Checking device 4 of 6 (06DA/0003)
3.873340 [D2] - VendorID: 06da
3.873412 [D2] - ProductID: 0003
3.873471 [D2] - Manufacturer: PPC
3.873530 [D2] - Product: USB UPS
3.873589 [D2] - Serial Number: unknown
3.873648 [D2] - Bus: 001
3.873705 [D2] - Device: unknown
3.873764 [D2] - Device release number: 0003
3.873821 [D2] Trying to match device
3.873880 [D3] match_function_exact: matching a device...
3.873941 [D3] match_function_regex: matching a device...
3.874036 [D2] Device matches
3.874096 [D2] Reading first configuration descriptor
3.874177 [D3] libusb_kernel_driver_active() returned 0
3.874288 [D2] Claimed interface 0 successfully
3.874356 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
3.876296 [D3] send: M
3.973470 [D5] read: (5 bytes) => 28 4e 41 4b 0d
3.973519 [D3] read: (NAK
3.973572 [D2] voltronic_qs_hex_protocol: invalid protocol [(NAK]
3.973614 [D4] ups_infoval_set: failed to preprocess value [ups.firmware.aux: (NAK]
4.974175 [D3] send: Connection timed out (-7)
4.974281 [D4] qx_process: failed to preprocess answer [ups.firmware.aux]
4.976735 [D3] send: Pipe error (-9)
5.746766 [D1] Device reset handled
5.747327 [D4] qx_process: failed to preprocess answer [ups.firmware.aux]
5.775387 [D2] Checking device 1 of 6 (174C/55AA)
5.775512 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
5.775566 [D2] Checking device 2 of 6 (1D6B/0003)
5.775641 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
5.775692 [D2] Checking device 3 of 6 (0557/2304)
5.775761 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
5.775810 [D2] Checking device 4 of 6 (06DA/0003)
5.781592 [D2] - VendorID: 06da
5.781650 [D2] - ProductID: 0003
5.781695 [D2] - Manufacturer: PPC
5.781739 [D2] - Product: USB UPS
5.781783 [D2] - Serial Number: unknown
5.781826 [D2] - Bus: 001
5.781870 [D2] - Device: unknown
5.781913 [D2] - Device release number: 0003
5.781956 [D2] Trying to match device
5.782002 [D3] match_function_exact: matching a device...
5.782052 [D3] match_function_regex: matching a device...
5.782127 [D2] Device matches
5.782172 [D2] Reading first configuration descriptor
5.782234 [D3] libusb_kernel_driver_active() returned 0
5.782323 [D2] Claimed interface 0 successfully
5.782376 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
5.784350 [D3] send: QS
5.913780 [D5] read: (14 bytes) => 28 30 33 20 30 30 30 30 30 31 31 30 20 0d
5.913844 [D3] read: (03 00000110
5.913899 [D2] qx_process_answer: short reply (input.voltage)
6.914489 [D3] send: Connection timed out (-7)
6.914603 [D4] qx_process: failed to preprocess answer [input.voltage]
6.917005 [D3] send: Pipe error (-9)
7.686559 [D1] Device reset handled
7.687165 [D4] qx_process: failed to preprocess answer [input.voltage]
7.722211 [D2] Checking device 1 of 6 (174C/55AA)
7.722373 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
7.722441 [D2] Checking device 2 of 6 (1D6B/0003)
7.722534 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
7.722599 [D2] Checking device 3 of 6 (0557/2304)
7.722701 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
7.722766 [D2] Checking device 4 of 6 (06DA/0003)
7.729273 [D2] - VendorID: 06da
7.729346 [D2] - ProductID: 0003
7.729405 [D2] - Manufacturer: PPC
7.729463 [D2] - Product: USB UPS
7.729522 [D2] - Serial Number: unknown
7.729580 [D2] - Bus: 001
7.729637 [D2] - Device: unknown
7.729694 [D2] - Device release number: 0003
7.729751 [D2] Trying to match device
7.729814 [D3] match_function_exact: matching a device...
7.729875 [D3] match_function_regex: matching a device...
7.729969 [D2] Device matches
7.730029 [D2] Reading first configuration descriptor
7.730108 [D3] libusb_kernel_driver_active() returned 0
7.730221 [D2] Claimed interface 0 successfully
7.730289 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
7.732050 [D3] send: D
7.829151 [D5] read: (5 bytes) => 28 4e 41 4b 0d
7.829200 [D3] read: (NAK
7.829244 [D2] qx_process_answer: short reply (input.voltage)
8.829789 [D3] send: Connection timed out (-7)
8.829902 [D4] qx_process: failed to preprocess answer [input.voltage]
8.832765 [D3] send: Pipe error (-9)
9.602704 [D1] Device reset handled
9.603239 [D4] qx_process: failed to preprocess answer [input.voltage]
9.633399 [D2] Checking device 1 of 6 (174C/55AA)
9.633529 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
9.633581 [D2] Checking device 2 of 6 (1D6B/0003)
9.633651 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
9.633700 [D2] Checking device 3 of 6 (0557/2304)
9.633769 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
9.633818 [D2] Checking device 4 of 6 (06DA/0003)
9.639648 [D2] - VendorID: 06da
9.639705 [D2] - ProductID: 0003
9.639749 [D2] - Manufacturer: PPC
9.639792 [D2] - Product: USB UPS
9.639836 [D2] - Serial Number: unknown
9.639879 [D2] - Bus: 001
9.639922 [D2] - Device: unknown
9.640285 [D2] - Device release number: 0003
9.640334 [D2] Trying to match device
9.640380 [D3] match_function_exact: matching a device...
9.640427 [D3] match_function_regex: matching a device...
9.640510 [D2] Device matches
9.640555 [D2] Reading first configuration descriptor
9.640623 [D3] libusb_kernel_driver_active() returned 0
9.640715 [D2] Claimed interface 0 successfully
9.640768 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
9.642409 [D3] send: Q1
9.891440 [D5] read: (47 bytes) => 28 32 33 31 2e 31 20 32 33 30 2e 34 20 32 32 39 2e 39
9.891566 [D5] 20 30 31 33 20 35 30 2e 30 20 32 2e 33 31 20 32 34 2e 33 20 30 30 30 30 30
9.891634 [D5] 30 30 31 0d
9.891696 [D3] read: (231.1 230.4 229.9 013 50.0 2.31 24.3 00000001
9.891800 [D5] send_to_all: SETINFO input.voltage "231.1"
10.892427 [D3] send: Connection timed out (-7)
10.892529 [D4] qx_process: failed to preprocess answer [device.model]
10.892603 [D5] send_to_all: DELINFO input.voltage
10.894946 [D3] send: Pipe error (-9)
11.666396 [D1] Device reset handled
11.666981 [D4] qx_process: failed to preprocess answer [input.voltage]
11.698809 [D2] Checking device 1 of 6 (174C/55AA)
11.698940 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
11.698998 [D2] Checking device 2 of 6 (1D6B/0003)
11.699069 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
11.699118 [D2] Checking device 3 of 6 (0557/2304)
11.699196 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
11.699245 [D2] Checking device 4 of 6 (06DA/0003)
11.705451 [D2] - VendorID: 06da
11.705510 [D2] - ProductID: 0003
11.705562 [D2] - Manufacturer: PPC
11.705608 [D2] - Product: USB UPS
11.705652 [D2] - Serial Number: unknown
11.705696 [D2] - Bus: 001
11.705739 [D2] - Device: unknown
11.705782 [D2] - Device release number: 0003
11.705826 [D2] Trying to match device
11.705871 [D3] match_function_exact: matching a device...
11.705918 [D3] match_function_regex: matching a device...
11.705992 [D2] Device matches
11.706037 [D2] Reading first configuration descriptor
11.706100 [D3] libusb_kernel_driver_active() returned 0
11.706193 [D2] Claimed interface 0 successfully
11.706245 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
Also, for large "text screenshots", please wrap them into lines of 3 or 4 backticks (same count on start and finish), so they would be formatted as code blocks and be better readable :)
Sorry I don't understand what you mean. My English language is basic. ;)
Thanks, this part looked promising:
9.642409 [D3] send: Q1
9.891440 [D5] read: (47 bytes) => 28 32 33 31 2e 31 20 32 33 30 2e 34 20 32 32 39 2e 39
9.891566 [D5] 20 30 31 33 20 35 30 2e 30 20 32 2e 33 31 20 32 34 2e 33 20 30 30 30 30 30
9.891634 [D5] 30 30 31 0d
9.891696 [D3] read: (231.1 230.4 229.9 013 50.0 2.31 24.3 00000001
9.891800 [D5] send_to_all: SETINFO input.voltage "231.1"
...however this did not:
10.892427 [D3] send: Connection timed out (-7)
I am not quickly sure which send
this is - from the driver to the device (may be a protocol issue, etc.), or from the driver to upsd
data server. Is your nut-server.service
still stopped? Can you start it (or run upsd
) just in case?
There were some fixes for this driver merged in recent months, so if you manage to build NUT from github sources (per wiki article earlier) and test with that variant of the driver, it may be useful to check if that issue is already known and solved. There was something like it, but I can't find the specific PR that dealt with this (not sure if it was solved for a particular protocol/vendor subdriver or for the whole nutdrv_qx
driver).
Just in case it is useful with usbhid-ups
root@DARYL:/etc/nut# systemctl stop [email protected]
root@DARYL:/etc/nut# :; /lib/nut/usbhid-ups -a nutdev1 -DDDDDD -d 1
Network UPS Tools - Generic HID driver 0.47 (2.8.0)
USB communication driver (libusb 1.0) 0.43
0.000000 [D1] debug level is '6'
0.001789 [D5] send_to_all: SETINFO device.type "ups"
0.002561 [D2] Initializing an USB-connected UPS with library libusb-1.0.26 (API: 0x1000109) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
0.003219 [D1] upsdrv_initups (non-SHUT)...
0.033940 [D2] Checking device 1 of 6 (174C/55AA)
0.034217 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
0.034261 [D2] Checking device 2 of 6 (1D6B/0003)
0.034323 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
0.034362 [D2] Checking device 3 of 6 (0557/2304)
0.034417 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
0.034457 [D2] Checking device 4 of 6 (06DA/0003)
0.040108 [D2] - VendorID: 06da
0.040156 [D2] - ProductID: 0003
0.040191 [D2] - Manufacturer: PPC
0.040226 [D2] - Product: USB UPS
0.040260 [D2] - Serial Number: unknown
0.040294 [D2] - Bus: 001
0.040327 [D2] - Device: unknown
0.040361 [D2] - Device release number: 0003
0.040395 [D2] Trying to match device
0.040431 [D2] match_function_subdriver (non-SHUT mode): matching a device...
0.040478 [D3] match_function_regex: matching a device...
0.040716 [D2] Device matches
0.040756 [D2] Reading first configuration descriptor
0.040807 [D3] libusb_kernel_driver_active() returned 0
0.040883 [D2] Claimed interface 0 successfully
0.040922 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
0.043384 [D3] HID descriptor, method 1: (9 bytes) => 09 21 11 01 00 01 22 1b 00
0.043431 [D3] HID descriptor length (method 1) 27
0.043467 [D4] i=0, extra[i]=09, extra[i+1]=21
0.043508 [D3] HID descriptor, method 2: (9 bytes) => 09 21 11 01 00 01 22 1b 00
0.043544 [D3] HID descriptor length (method 2) 27
0.043579 [D2] HID descriptor length 27
0.047363 [D2] Report Descriptor size = 27
0.047414 [D3] Report Descriptor: (27 bytes) => 06 a0 ff 09 04 a1 01 09 06 15 00 26 ff 00
0.047455 [D3] 75 08 95 08 81 82 09 07 95 40 91 82 c0
0.047651 Using subdriver: Phoenixtec/Liebert HID 0.41
0.047691 [D1] 2 HID objects found
0.047728 [D4] Entering libusb_get_report
0.050126 [D3] Report[get]: (2 bytes) => 00 00
0.050170 [D5] PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
0.050207 [D5] Unit = 00000000, UnitExp = 0
0.050241 [D5] Exponent = 0
0.050279 [D5] hid_lookup_path: ffa00004 -> not found in lookup table
0.050316 [D5] hid_lookup_path: ffa00006 -> not found in lookup table
0.050356 [D1] Path: ffa00004.ffa00006, Type: Input, ReportID: 0x00, Offset: 0, Size: 8, Value: 0
0.050393 [D3] Report[buf]: (2 bytes) => 00 00
0.050429 [D5] PhyMax = 0, PhyMin = 0, LogMax = 255, LogMin = 0
0.050464 [D5] Unit = 00000000, UnitExp = 0
0.050499 [D5] Exponent = 0
0.050534 [D5] hid_lookup_path: ffa00004 -> not found in lookup table
0.050570 [D5] hid_lookup_path: ffa00007 -> not found in lookup table
0.050607 [D1] Path: ffa00004.ffa00007, Type: Output, ReportID: 0x00, Offset: 0, Size: 8, Value: 0
0.050652 [D5] send_to_all: SETINFO ups.mfr "PPC"
0.050693 [D5] send_to_all: SETINFO ups.model "USB UPS"
0.050734 [D5] send_to_all: SETINFO ups.vendorid "06da"
0.050773 [D5] send_to_all: SETINFO ups.productid "0003"
0.050810 [D2] Report descriptor retrieved (Reportlen = 27)
0.050844 [D2] Found HID device
0.050883 [D1] Detected a UPS: PPC/USB UPS
0.050927 [D5] hid_lookup_usage: UPS -> 00840004
0.050965 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.051001 [D5] hid_lookup_usage: Voltage -> 00840030
0.051036 [D4] string_to_path: depth = 3
0.051073 [D5] hid_lookup_usage: UPS -> 00840004
0.051109 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.051145 [D5] hid_lookup_usage: ConfigVoltage -> 00840040
0.051180 [D4] string_to_path: depth = 3
0.051216 [D5] hid_lookup_usage: UPS -> 00840004
0.051252 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.051291 [D5] hid_lookup_usage: RemainingCapacity -> 00850066
0.051325 [D4] string_to_path: depth = 3
0.051361 [D5] hid_lookup_usage: UPS -> 00840004
0.051397 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.051435 [D5] hid_lookup_usage: RunTimeToEmpty -> 00850068
0.051469 [D4] string_to_path: depth = 3
0.051505 [D5] hid_lookup_usage: UPS -> 00840004
0.051541 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.051579 [D5] hid_lookup_usage: iDeviceChemistry -> 00850089
0.051614 [D4] string_to_path: depth = 3
0.051650 [D5] hid_lookup_usage: UPS -> 00840004
0.051686 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.051722 [D5] hid_lookup_usage: PercentLoad -> 00840035
0.051756 [D4] string_to_path: depth = 3
0.051792 [D5] hid_lookup_usage: UPS -> 00840004
0.051828 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.051863 [D5] hid_lookup_usage: Output -> 0084001c
0.051898 [D5] hid_lookup_usage: Voltage -> 00840030
0.051932 [D4] string_to_path: depth = 4
0.051968 [D5] hid_lookup_usage: UPS -> 00840004
0.052003 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.052039 [D5] hid_lookup_usage: Output -> 0084001c
0.052074 [D5] hid_lookup_usage: Frequency -> 00840032
0.052108 [D4] string_to_path: depth = 4
0.052144 [D5] hid_lookup_usage: UPS -> 00840004
0.052180 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.052215 [D5] hid_lookup_usage: Output -> 0084001c
0.052251 [D5] hid_lookup_usage: HighVoltageTransfer -> 00840054
0.052285 [D4] string_to_path: depth = 4
0.052320 [D5] hid_lookup_usage: UPS -> 00840004
0.052356 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.052391 [D5] hid_lookup_usage: Output -> 0084001c
0.052427 [D5] hid_lookup_usage: LowVoltageTransfer -> 00840053
0.052461 [D4] string_to_path: depth = 4
0.052496 [D5] hid_lookup_usage: UPS -> 00840004
0.052532 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.052569 [D5] hid_lookup_usage: Input -> 0084001a
0.052608 [D5] hid_lookup_usage: [1] -> not found in lookup table
0.052643 [D5] string_to_path: hid_lookup_usage failed, checking if token [1] is a raw value
0.052681 [D5] hid_lookup_usage: Voltage -> 00840030
0.052716 [D4] string_to_path: depth = 5
0.052752 [D5] hid_lookup_usage: UPS -> 00840004
0.052787 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.052823 [D5] hid_lookup_usage: Input -> 0084001a
0.052860 [D5] hid_lookup_usage: [1] -> not found in lookup table
0.052895 [D5] string_to_path: hid_lookup_usage failed, checking if token [1] is a raw value
0.052932 [D5] hid_lookup_usage: Frequency -> 00840032
0.052966 [D4] string_to_path: depth = 5
0.053002 [D5] hid_lookup_usage: UPS -> 00840004
0.053037 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.053072 [D5] hid_lookup_usage: Output -> 0084001c
0.053110 [D5] hid_lookup_usage: ffff0057 -> not found in lookup table
0.053145 [D5] string_to_path: hid_lookup_usage failed, checking if token ffff0057 is a raw value
0.053181 [D4] string_to_path: depth = 4
0.053217 [D5] hid_lookup_usage: UPS -> 00840004
0.053253 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.053288 [D5] hid_lookup_usage: Output -> 0084001c
0.053326 [D5] hid_lookup_usage: ffff0058 -> not found in lookup table
0.053361 [D5] string_to_path: hid_lookup_usage failed, checking if token ffff0058 is a raw value
0.053396 [D4] string_to_path: depth = 4
0.053432 [D5] hid_lookup_usage: UPS -> 00840004
0.053468 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.053503 [D5] hid_lookup_usage: Output -> 0084001c
0.053541 [D5] hid_lookup_usage: ffff00f9 -> not found in lookup table
0.053576 [D5] string_to_path: hid_lookup_usage failed, checking if token ffff00f9 is a raw value
0.053611 [D4] string_to_path: depth = 4
0.053647 [D5] hid_lookup_usage: UPS -> 00840004
0.053683 [D5] hid_lookup_usage: PowerConverter -> 00840016
0.053719 [D5] hid_lookup_usage: Output -> 0084001c
0.053757 [D5] hid_lookup_usage: ffff00f8 -> not found in lookup table
0.053791 [D5] string_to_path: hid_lookup_usage failed, checking if token ffff00f8 is a raw value
0.053826 [D4] string_to_path: depth = 4
0.053862 [D5] hid_lookup_usage: UPS -> 00840004
0.053898 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.053933 [D5] hid_lookup_usage: PresentStatus -> 00840002
0.053971 [D5] hid_lookup_usage: ACPresent -> 008500d0
0.054006 [D4] string_to_path: depth = 4
0.054042 [D5] hid_lookup_usage: UPS -> 00840004
0.054107 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.054139 [D5] hid_lookup_usage: PresentStatus -> 00840002
0.054173 [D5] hid_lookup_usage: BelowRemainingCapacityLimit -> 00850042
0.054207 [D4] string_to_path: depth = 4
0.054243 [D5] hid_lookup_usage: UPS -> 00840004
0.054279 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.054315 [D5] hid_lookup_usage: PresentStatus -> 00840002
0.054353 [D5] hid_lookup_usage: Charging -> 00850044
0.054388 [D4] string_to_path: depth = 4
0.054424 [D5] hid_lookup_usage: UPS -> 00840004
0.054460 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.054495 [D5] hid_lookup_usage: PresentStatus -> 00840002
0.054533 [D5] hid_lookup_usage: Discharging -> 00850045
0.054568 [D4] string_to_path: depth = 4
0.054605 [D5] hid_lookup_usage: UPS -> 00840004
0.054642 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.054678 [D5] hid_lookup_usage: PresentStatus -> 00840002
0.054715 [D5] hid_lookup_usage: Overload -> 00840065
0.054750 [D4] string_to_path: depth = 4
0.054786 [D5] hid_lookup_usage: UPS -> 00840004
0.054821 [D5] hid_lookup_usage: PowerSummary -> 00840024
0.054857 [D5] hid_lookup_usage: PresentStatus -> 00840002
0.054893 [D5] hid_lookup_usage: ShutdownImminent -> 00840069
0.054927 [D4] string_to_path: depth = 4
0.054966 [D2] find_nut_info: unknown info type: load.off.delay
0.055002 [D2] find_nut_info: unknown info type: load.on.delay
0.055037 [D2] find_nut_info: unknown info type: load.off.delay
0.055080 [D5] send_to_all: SETINFO driver.version "2.8.0"
0.055120 [D5] send_to_all: SETINFO driver.version.internal "0.47"
0.055160 [D5] send_to_all: SETINFO driver.name "usbhid-ups"
0.055195 [D1] upsdrv_initinfo...
0.055235 [D5] send_to_all: SETINFO driver.version.data "Phoenixtec/Liebert HID 0.41"
0.055276 [D5] send_to_all: SETINFO driver.parameter.pollfreq "30"
0.055312 [D1] upsdrv_updateinfo...
0.805857 [D2] nut_libusb_get_interrupt: Connection timed out
0.805962 [D1] Got 0 HID objects...
0.806029 [D1] Quick update...
0.806157 [D5] send_to_all: SETINFO ups.status "OB"
0.806219 [D5] send_to_all: DATAOK
0.806287 [D5] send_to_all: SETINFO driver.parameter.pollinterval "2"
0.806355 [D5] send_to_all: SETINFO driver.parameter.synchronous "auto"
0.806421 [D5] send_to_all: SETINFO device.mfr "PPC"
0.806489 [D5] send_to_all: SETINFO device.model "USB UPS"
0.806550 [D1] upsdrv_updateinfo...
1.557127 [D2] nut_libusb_get_interrupt: Connection timed out
1.557229 [D1] Got 0 HID objects...
1.557296 [D1] Quick update...
1.557368 [D1] upsdrv_updateinfo...
2.308052 [D2] nut_libusb_get_interrupt: Connection timed out
2.308157 [D1] Got 0 HID objects...
2.308227 [D1] Quick update...
2.308301 [D3] Entering dstate_dump
device.mfr: PPC
device.model: USB UPS
device.type: ups
driver.name: usbhid-ups
driver.parameter.bus: 001
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.product: USB UPS
driver.parameter.productid: 0003
driver.parameter.synchronous: auto
driver.parameter.vendor: PPC
driver.parameter.vendorid: 06DA
driver.version: 2.8.0
driver.version.data: Phoenixtec/Liebert HID 0.41
driver.version.internal: 0.47
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
ups.mfr: PPC
ups.model: USB UPS
ups.productid: 0003
ups.status: OB
ups.vendorid: 06da
2.308921 [D1] upsdrv_cleanup...
Broadcast message from nut@DARYL (somewhere) (Fri Dec 8 06:02:36 2023):
Executing automatic power-fail shutdown
Thanks, this part looked promising:
9.642409 [D3] send: Q1 9.891440 [D5] read: (47 bytes) => 28 32 33 31 2e 31 20 32 33 30 2e 34 20 32 32 39 2e 39 9.891566 [D5] 20 30 31 33 20 35 30 2e 30 20 32 2e 33 31 20 32 34 2e 33 20 30 30 30 30 30 9.891634 [D5] 30 30 31 0d 9.891696 [D3] read: (231.1 230.4 229.9 013 50.0 2.31 24.3 00000001 9.891800 [D5] send_to_all: SETINFO input.voltage "231.1"
...however this did not:
10.892427 [D3] send: Connection timed out (-7)
I am not quickly sure which
send
this is - from the driver to the device (may be a protocol issue, etc.), or from the driver toupsd
data server. Is yournut-server.service
still stopped? Can you start it (or runupsd
) just in case?There were some fixes for this driver merged in recent months, so if you manage to build NUT from github sources (per wiki article earlier) and test with that variant of the driver, it may be useful to check if that issue is already known and solved. There was something like it, but I can't find the specific PR that dealt with this (not sure if it was solved for a particular protocol/vendor subdriver or for the whole
nutdrv_qx
driver).
Okay, i will try to get this more update version of nut and test same this this version to send you the results
blazer_usb seem to get a little bit more info
root@DARYL:/home/magade# upsc nutdev1
Init SSL without certificate database
battery.voltage: 2.20
battery.voltage.high: -1.08
battery.voltage.low: -0.87
device.type: ups
driver.name: blazer_usb
driver.parameter.bus: 001
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.version: 2.8.0
driver.version.internal: 0.14
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
input.frequency: 50.0
input.voltage: 226.3
input.voltage.fault: 230.4
output.voltage: 230.1
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 14
ups.productid: 0003
ups.status: OL
ups.temperature: 23.1
ups.type: online
ups.vendorid: 06da
root@DARYL:/home/magade#
root@DARYL:/home/magade# :; /lib/nut/blazer_usb -a nutdev1 -DDDDDD -d 1
Network UPS Tools - Megatec/Q1 protocol USB driver 0.14 (2.8.0)
0.000000 [D1] debug level is '6'
0.000953 [D5] send_to_all: SETINFO device.type "ups"
0.023375 [D2] Checking device 1 of 6 (174C/55AA)
0.023505 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
0.023537 [D2] Checking device 2 of 6 (1D6B/0003)
0.023586 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
0.023614 [D2] Checking device 3 of 6 (0557/2304)
0.023657 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
0.023685 [D2] Checking device 4 of 6 (06DA/0003)
0.029764 [D2] - VendorID: 06da
0.029801 [D2] - ProductID: 0003
0.029827 [D2] - Manufacturer: PPC
0.029854 [D2] - Product: USB UPS
0.029874 [D2] - Serial Number: unknown
0.029894 [D2] - Bus: 001
0.029914 [D2] - Device: unknown
0.029934 [D2] - Device release number: 0003
0.029953 [D2] Trying to match device
0.029975 [D3] match_function_regex: matching a device...
0.030178 [D2] Device matches
0.030204 [D2] Reading first configuration descriptor
0.030246 [D3] libusb_kernel_driver_active() returned 1 (driver active)
0.030271 [D2] successfully set kernel driver auto-detach flag
0.033271 [D2] Claimed interface 0 successfully
0.033680 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
0.034083 [D5] send_to_all: SETINFO ups.vendorid "06da"
0.034422 [D5] send_to_all: SETINFO ups.productid "0003"
0.034765 [D5] send_to_all: SETINFO driver.version "2.8.0"
0.035095 [D5] send_to_all: SETINFO driver.version.internal "0.14"
0.035419 [D5] send_to_all: SETINFO driver.name "blazer_usb"
0.035716 Please note that this driver is deprecated and will not receive
new development. If it works for managing your devices - fine,
but if you are running it to try setting up a new device, please
consider the newer nutdrv_qx instead, which should handle all 'Qx'
protocol variants for NUT. (Please also report if your device works
with this driver, but nutdrv_qx would not actually support it with
any subdriver!)
0.037627 [D2] Trying megatec protocol...
0.040657 [D3] send: Q1
0.290456 [D3] read: (227.4 230.4 230.1 014 50.0 2.24 23.2 00000001
0.290518 [D5] send_to_all: SETINFO input.voltage "227.4"
0.290532 [D5] send_to_all: SETINFO input.voltage.fault "230.4"
0.290545 [D5] send_to_all: SETINFO output.voltage "230.1"
0.290578 [D5] send_to_all: SETINFO ups.load "14"
0.290590 [D5] send_to_all: SETINFO input.frequency "50.0"
0.290605 [D5] send_to_all: SETINFO battery.voltage "2.24"
0.290616 [D5] send_to_all: SETINFO ups.temperature "23.2"
0.290627 [D5] send_to_all: SETINFO ups.beeper.status "enabled"
0.290636 [D5] send_to_all: SETINFO ups.type "online"
0.290650 [D5] send_to_all: SETINFO ups.status "OL"
0.290658 [D2] Status read in 1 tries
0.290665 Supported UPS detected with megatec protocol
1.290999 [D3] send: Connection timed out
1.291039 [D2] blazer_rating: short reply
1.291048 [D1] Rating read 1 failed
1.293614 [D3] send: Pipe error
2.062590 [D1] Device reset handled
2.063249 [D2] blazer_rating: short reply
2.063538 [D1] Rating read 2 failed
2.071954 [D2] Checking device 1 of 6 (174C/55AA)
2.072422 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
2.072703 [D2] Checking device 2 of 6 (1D6B/0003)
2.072938 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
2.073161 [D2] Checking device 3 of 6 (0557/2304)
2.073389 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
2.073611 [D2] Checking device 4 of 6 (06DA/0003)
2.079525 [D2] - VendorID: 06da
2.079759 [D2] - ProductID: 0003
2.079977 [D2] - Manufacturer: PPC
2.080194 [D2] - Product: USB UPS
2.080410 [D2] - Serial Number: unknown
2.080667 [D2] - Bus: 001
2.080885 [D2] - Device: unknown
2.081101 [D2] - Device release number: 0003
2.081318 [D2] Trying to match device
2.081534 [D3] match_function_exact: matching a device...
2.081750 [D3] match_function_regex: matching a device...
2.081979 [D2] Device matches
2.082196 [D2] Reading first configuration descriptor
2.082421 [D3] libusb_kernel_driver_active() returned 0
2.082669 [D2] Claimed interface 0 successfully
2.082889 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
2.084282 [D3] send: F
2.245842 [D3] read: (#230.0 013 072.0 50.0
2.246207 [D2] blazer_rating: invalid start character [28]
2.246457 [D1] Rating read 3 failed
2.246701 Rating information unavailable
3.247283 [D3] send: Connection timed out
3.247726 [D2] blazer_vendor: short reply
3.247976 [D1] Vendor information read 1 failed
3.249894 [D3] send: Pipe error
4.018748 [D1] Device reset handled
4.019382 [D2] blazer_vendor: short reply
4.019664 [D1] Vendor information read 2 failed
4.028220 [D2] Checking device 1 of 6 (174C/55AA)
4.028731 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
4.028993 [D2] Checking device 2 of 6 (1D6B/0003)
4.029253 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
4.029504 [D2] Checking device 3 of 6 (0557/2304)
4.029813 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
4.030066 [D2] Checking device 4 of 6 (06DA/0003)
4.035687 [D2] - VendorID: 06da
4.035964 [D2] - ProductID: 0003
4.036210 [D2] - Manufacturer: PPC
4.036454 [D2] - Product: USB UPS
4.036742 [D2] - Serial Number: unknown
4.036990 [D2] - Bus: 001
4.037232 [D2] - Device: unknown
4.037475 [D2] - Device release number: 0003
4.037720 [D2] Trying to match device
4.037967 [D3] match_function_exact: matching a device...
4.038217 [D3] match_function_regex: matching a device...
4.038473 [D2] Device matches
4.038716 [D2] Reading first configuration descriptor
4.038974 [D3] libusb_kernel_driver_active() returned 0
4.039225 [D2] Claimed interface 0 successfully
4.039445 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
4.040443 [D3] send: I
4.145989 [D3] read:
4.146498 [D2] blazer_vendor: short reply
4.146750 [D1] Vendor information read 3 failed
4.146996 Vendor information unavailable
4.147239 No values provided for battery high/low voltages in ups.conf
4.147606 [D5] send_to_all: SETINFO battery.voltage.low "-0.87"
4.147858 [D5] send_to_all: SETINFO battery.voltage.high "-1.08"
4.148104 Using 'guestimation' (low: -0.866667, high: -1.083333)!
4.148351 Battery runtime will not be calculated (runtimecal not set)
4.148601 [D5] send_to_all: SETINFO ups.delay.start "180"
4.148873 [D5] send_to_all: SETINFO ups.delay.shutdown "30"
4.149123 [D5] send_to_all: ADDCMD beeper.toggle
4.149369 [D5] send_to_all: ADDCMD load.off
4.149617 [D5] send_to_all: ADDCMD load.on
4.149863 [D5] send_to_all: ADDCMD shutdown.return
4.150099 [D5] send_to_all: ADDCMD shutdown.stayoff
4.150317 [D5] send_to_all: ADDCMD shutdown.stop
4.150534 [D5] send_to_all: ADDCMD test.battery.start
4.150751 [D5] send_to_all: ADDCMD test.battery.start.deep
4.150969 [D5] send_to_all: ADDCMD test.battery.start.quick
4.151188 [D5] send_to_all: ADDCMD test.battery.stop
5.151868 [D3] send: Connection timed out
5.152959 [D2] blazer_status: short reply
5.153693 [D1] Communications with UPS lost: status read failed!
5.154549 [D5] send_to_all: SETINFO driver.parameter.pollinterval "2"
5.155342 [D5] send_to_all: SETINFO driver.parameter.synchronous "auto"
5.158754 [D3] send: Pipe error
5.931002 [D1] Device reset handled
5.932404 [D2] blazer_status: short reply
5.933379 [D1] Communications with UPS lost: status read failed!
5.957878 [D2] Checking device 1 of 6 (174C/55AA)
5.958979 [D1] Failed to open device (174C/55AA), skipping: Access denied (insufficient permissions)
5.959823 [D2] Checking device 2 of 6 (1D6B/0003)
5.960756 [D1] Failed to open device (1D6B/0003), skipping: Access denied (insufficient permissions)
5.961549 [D2] Checking device 3 of 6 (0557/2304)
5.962370 [D1] Failed to open device (0557/2304), skipping: Access denied (insufficient permissions)
5.963139 [D2] Checking device 4 of 6 (06DA/0003)
5.969635 [D2] - VendorID: 06da
5.970468 [D2] - ProductID: 0003
5.971245 [D2] - Manufacturer: PPC
5.972001 [D2] - Product: USB UPS
5.973137 [D2] - Serial Number: unknown
5.973998 [D2] - Bus: 001
5.974789 [D2] - Device: unknown
5.975548 [D2] - Device release number: 0003
5.976252 [D2] Trying to match device
5.976993 [D3] match_function_exact: matching a device...
5.977716 [D3] match_function_regex: matching a device...
5.978399 [D2] Device matches
5.978435 [D2] Reading first configuration descriptor
5.978489 [D3] libusb_kernel_driver_active() returned 0
5.978569 [D2] Claimed interface 0 successfully
5.978601 [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
5.980418 [D3] send: Q1
6.229463 [D3] read: (227.8 230.4 230.1 014 50.0 2.24 23.2 00000001
6.229593 [D5] send_to_all: SETINFO input.voltage "227.8"
6.229696 [D5] send_to_all: DATAOK
6.229725 [D3] Entering dstate_dump
battery.voltage: 2.24
battery.voltage.high: -1.08
battery.voltage.low: -0.87
device.type: ups
driver.name: blazer_usb
driver.parameter.bus: 001
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.version: 2.8.0
driver.version.internal: 0.14
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
input.frequency: 50.0
input.voltage: 227.8
input.voltage.fault: 230.4
output.voltage: 230.1
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 14
ups.productid: 0003
ups.status: OL
ups.temperature: 23.2
ups.type: online
ups.vendorid: 06da
root@DARYL:/home/magade#
Good to hear! The drivers are a bit different, with nutdrv_qx
aiming to replace several earlier drivers for Megatec Qx protocol family and so including their code (hence the deprecation warning), but perhaps something got implemented differently in the years after the initial split. The negative battery high/low limit voltages look weird though. IIRC there was some bit-shift maths problem solved after 2.8.0, maybe that was it.
With some add in ups.conf, I got this, not perfect but at least lot of overwrites info
root@DARYL:/home/magade# cd /etc/nut
root@DARYL:/etc/nut# upsc nutdev1
Init SSL without certificate database
battery.charge: 100
battery.packs: 6
battery.runtime: 1810
battery.voltage: 2.31
battery.voltage.high: 2.31
battery.voltage.low: 2.21
battery.voltage.nominal: 72.0
device.type: ups
driver.name: blazer_usb
driver.parameter.chargetime: 3600
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.product: USB UPS
driver.parameter.productid: 0003
driver.parameter.runtimecal: 181,100,540,50,1320,25,4200,7
driver.parameter.synchronous: auto
driver.parameter.vendor: PPC
driver.parameter.vendorid: 06DA
driver.version: 2.8.0
driver.version.internal: 0.14
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
input.frequency: 50.0
input.voltage: 223.3
input.voltage.fault: 230.4
output.voltage: 230.1
ups.beeper.status: disabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 13
ups.productid: 0003
ups.status: OL
ups.temperature: 23.5
ups.type: online
ups.vendorid: 06da
root@DARYL:/etc/nut#
- ups.conf
[nutdev1]
#driver = "nutdrv_qx"
# driver = "usbhid-ups"
driver = "blazer_usb"
port = "auto"
vendorid = "06DA"
productid = "0003"
product = "USB UPS"
vendor = "PPC"
bus = "001
#THIS IS FOR CORRECT VOLTAGE BATTERY INFO
default.battery.voltage.nominal = 72.0
override.battery.voltage.nominal = 72.0
#this for correct Voltage value wrong 24V
override.battery.packs = 6
#THIS IS FOR GET % BATTERY CHARGE STATE
default.battery.voltage.high = 2.31
default.battery.voltage.low = 2.21
#THIS IS FOR CORRECT DATA VOLTAGE
#default.battery.voltage.nominal =
#override.battery.voltage.nominal =
#this for correct Voltage value wrong 24V
# override.battery.packs = 12
#THIS IS FOR KNOW TIME REMINING FONCTION ON LOAD
runtimecal = 181,100,540,50,1320,25,4200,7
#THIS IS TO KNOW HOW LONG BEFORE CHARGE BATTERY TO 100%
chargetime = 3600
root@DARYL:/etc/nut#
I dont succed to update nut to 2.8.1-3, how can I do that?
I don't succeed to update nut to 2.8.1-3, how can I do that?
Depends on the OS (seems to be Debian/Ubuntu like, by the numbering scheme?) In some you can add "experimental" repositories or download package files from newer distribution versions and install with low-level tools like dpkg
.
https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests and installing the result (if it behaves better in tests from the build workspace) may be a more simple option.