NUTDRV_QX(8)
๐ NUTDRV_QX(8) โ the NUT Manual's own chaotic queen ๐
okay bestie so you want the driver for Q* protocol serial AND USB based UPS equipment? say less. this is nutdrv_qx, page 8 of the NUT Manual, and she is long. buckle up. ๐ฆ
โจ SYNOPSIS โจ
nutdrv_qx -h
nutdrv_qx -a UPS_NAME [OPTIONS]
Note ๐ This man page only documents the hardware-specific features of thenutdrv_qxdriver. For information about the core driver, seenutupsdrv(8).
๐ SUPPORTED HARDWARE ๐
so the lore is: this protocol originates from Mega System Technologies, Inc. in Taiwan ๐น๐ผ, and it got used by sooo many vendors, and it evolved over time, growing both in features and in nuanced incompatibilities. (character development, but make it firmware ๐). NUT documentation usually refers to this large family of similar dialects as the Megatec Q* or Megatec Qx protocol family.
The nutdrv_qx driver is known to work with various UPSes from Armac, Blazer, Energy Sistem, Fenton Technologies, General Electric, Gtec, Hunnox, Masterguard, Mustek, Powercool, Voltronic Power, SKE (rebranded by many, many โ have I said many? โ others...
Long story short: if your UPS came with a software called Viewpower, chances are high that it works with this driver with one of the voltronic* protocols or with the mecer one), and many others.
Note ๐ Due to historical reasons, two important tunables of this driver are somewhat inconveniently namedprotocol(for the Qx dialect) andsubdriver(for USB to serial link conversion). Other multi-dialect drivers refer to their dialect modules as subdrivers, and actually the modular source code ofnutdrv_qxalso does.
Note โณ Due to the amount of supported Qx dialects, and the time it takes to query for relevant combinations of commands and wait for a reply or absence thereof, in order to detect hardware/firmware support of some particular way for the driver to communicate with the device, automaticnutdrv_qxdriver initialization may take about a minute. It is recommended to store the detected and reportedprotocoland/orsubdrivervalues into yourups.conf(5)file to speed up later driver start-ups and avoid possible service timeouts.
The NUT compatibility table lists all the known supported models. Keep in mind, however, that other models not listed there may also be supported, but haven't been tested or reported back.
All devices with a serial interface and many with a USB interface are supported. ๐
๐ EXTRA ARGUMENTS ๐
You may need to override or provide defaults for some values, depending on the make and model of your UPS.
The following are the ones that most likely will need changing (see ups.conf(5)):
ondelay = valueโ Time to wait before switching on the UPS (seconds). This value is truncated to units of 60 seconds.
Note that a value below 3 minutes, may cause earlier firmware versions to not switch on automatically, so it defaults to 3 minutes (i.e. 180 seconds).
This option provides a default value for ups.delay.start that will then be used by the driver in the automatic shutdown sequence (i.e. calling the driver with the -k option, calling upsdrvctl(8) with the shutdown option or when the FSD flag is set and upsmon(8) enters its shutdown sequence): however you can change this value 'on the fly' for the actual session, only for the use with instant commands, setting ups.delay.start with upsrw(8).
offdelay = valueโ Time to wait before shutting down the UPS (seconds). This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds). Defaults to 30 seconds.
This option provides a default value for ups.delay.shutdown that will then be used by the driver in the automatic shutdown sequence (i.e. calling the driver with the -k option, calling upsdrvctl(8) with the shutdown option or when the FSD flag is set and upsmon(8) enters its shutdown sequence): however you can change this value "on the fly" for the actual session, only for the use with instant commands, setting ups.delay.shutdown with upsrw(8).
stayoffโ If you setstayoffinups.conf(5)when FSD arises the UPS will call ashutdown.stayoffshutting down afterups.delay.shutdownseconds and won't return (see KNOWN PROBLEMS), otherwise (standard behaviour) the UPS will callshutdown.returnshutting down afterups.delay.shutdownseconds and then turn on afterups.delay.startseconds (if mains meanwhile returned).protocol = stringโ Skip autodetection of the protocol to use and only use the one specified. Supported values:bestups,gtec,hunnox,innovart31,innovart33,innovatae,masterguard,mecer,megatec,megatec/old,mustek,q1,q2,q6,voltronic,voltronic-axpert,voltronic-qs,voltronic-qs-hexandzinto.
Run the driver program with the --help option to see the exact list of protocol values it would currently recognize.
Note that if you end up using the q1 protocol, you may want to give a try to the mecer, megatec and zinto ones setting the novendor/norating flags (only one, or both).
pollfreq = numโ Set polling interval for full updates, in seconds, to reduce the message traffic. Between two polling requests, the driver will do quick polls dealing just withups.statusat an interval specified by thepollintervaldriver option (details inups.conf(5)). The default value is 30 (in seconds).
If your UPS doesn't report either battery.charge or battery.runtime you may want to add the following ones in order to have guesstimated values:
default.battery.voltage.high = valueโ Maximum battery voltage that is reached after about 12 to 24 hours charging. If you want the driver to report a guesstimatedbattery.charge, you need to specify this (see BATTERY CHARGE GUESSTIMATION).default.battery.voltage.low = valueโ Minimum battery voltage just before the UPS automatically shuts down. If you want the driver to report a guesstimatedbattery.charge, you need to specify this (see BATTERY CHARGE GUESSTIMATION).default.battery.voltage.nominal = value,override.battery.voltage.nominal = valueโ Some devices show a wrong nominal battery voltage (or none at all), so you may need to override or set a default value.override.battery.packs = valueโ Some devices "natively" report just a part of the total battery voltage (see alsobattery_voltage_reports_one_packbelow).
For instance, if battery.voltage.nominal is 24 V, but it reports a battery.voltage of around 2 V, the number of battery.packs to correct this reading would be 12.
The driver will attempt to detect this number automatically, but if this fails somehow, you may want to override this value.
Note that this is primarily useful for "guesstimation" of battery.charge and/or battery.runtime (with runtimecal setting), if those readings are not provided by the device directly.
battery_voltage_reports_one_packโ Some devices "natively" report just report a part of the total battery voltage (see alsooverride.battery.packsabove, if that value is not reported by the device or properly guessed by the driver otherwise).
If this flag is set, most of the subdrivers (except those which know about more complicated device-specific nuances, currently: ablerex, masterguard and voltronic-qs-hex) adjust their ultimately reported battery.voltage value as a multiple of battery.packs and "native" battery.voltage).
Note this is primarily useful for consistent diagnostics and graphing of the numbers, and should not impact the "guesstimation" of battery.charge and/or battery.runtime โ so rather a cosmetic adjustment, than critical.
runtimecal = value,value,value,valueโ Parameter used in the (optional) runtime estimation. This takes two runtimes at different loads. Typically, this uses the runtime at full load and the runtime at half load. For instance, if your UPS has a rated runtime of 240 seconds at full load and 720 seconds at half load, you would enter
runtimecal = 240,100,720,50
The first load should always be higher than the second. If you have values available for loads other than 100 and 50 % respectively, you can use those too, but keep them spaced apart as far as reasonably possible. Just don't get too close to no load (prediction of runtime depends more on idle load for the battery then).
chargetime = valueโ The time needed to fully recharge the battery after being fully discharged. If not specified, the driver defaults to 43200 seconds (12 hours). Only used ifruntimecalis also specified.idleload = valueโ Minimum battery load used by the driver to estimate the runtime. If not specified, the driver defaults to 10%. Only used ifruntimecalis also specified.
๐ซ BESTUPS, INNOVART31, INNOVART33, INNOVATAE, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, Q2, Q6, VOLTRONIC-QS, VOLTRONIC-QS-HEX, ZINTO PROTOCOLS ๐ซ
ignoresabโ Some UPSes incorrectly report the 'Shutdown Active' bit as always on, consequently making the driver believe the UPS is nearing a shutdown (and, as a result,ups.statusalways contains FSD... and you know what this means). Setting this flag will make the driver ignore the 'Shutdown Active' bit.
๐ธ MECER, MEGATEC, MEGATEC/OLD, MUSTEK, ZINTO PROTOCOLS ๐ธ
ondelayโ The acceptable range is 0..599940 seconds.offdelayโ The acceptable range is 12..600 seconds.noratingโ Some UPSes will lock up if you attempt to read rating information from them. Setting this flag will make the driver skip this step.novendorโ Some UPSes will lock up if you attempt to read vendor information from them. Setting this flag will make the driver skip this step.
๐ง BESTUPS PROTOCOL ๐ง
ondelayโ The acceptable range is 60..599940 seconds.offdelayโ The acceptable range is 12..5940 seconds.pins_shutdown_mode = valueโ Set shutdown mode functionality of Pin 1 and Pin 7 on the UPS DB9 communication port (Per Best Power's EPS-0059) tovalue[0..6].
๐ MASTERGUARD PROTOCOL ๐
slave_addr = valueโ Make the claim function verify it's talking to the specified slave address (ups.id). Safeguard against talking to the wrong one of several identical UPSes on the same USB bus. Note that when changingups.id(throughupsrw(8)) the driver will continue to talk to the UPS with the new slave address, but won't claim it again on restart until theslave_addrparameter is adjusted.
๐ INNOVART31, INNOVART33, INNOVATAE, Q1, Q2, Q6 PROTOCOLS ๐
ondelayโ The acceptable range is 0..599940 seconds.offdelayโ the acceptable range is12..600seconds. that's the whole vibe, bestie โจ
Q2, Q6 PROTOCOLS ๐
nooutstatsโ okay so some UPSes just don't support theWAcommand, which is the one that returns output load stats. flip this flag on and the driver will straight up ignore those requests. no drama, no error spam. ๐
VOLTRONIC-QS, VOLTRONIC-QS-HEX PROTOCOLS ๐ฆ
ondelayโ acceptable range is60..599940seconds. yes, that's a lot of seconds, she's got range ๐ธoffdelayโ acceptable range is12..540seconds.
VOLTRONIC-AXPERT PROTOCOL ๐
Note โ this protocol is currently largely experimental, and many features may be only exposed in specially configured builds of the NUT driver program. iykyk, don't come for me if it's weird ๐
reset_to_defaultโ resets capability options and their limits to safe default values.bypass_alarmโ alarm (BEEP! ๐) at Bypass Mode [enabled/disabled].battery_alarmโ alarm (BEEP! ๐) at Battery Mode [enabled/disabled].
VOLTRONIC PROTOCOL ๐
the following options are supported only by the voltronic protocol. and ngl? not all of them are available on all the UPSes supported by this protocol. it's giving "check your device first" ๐ซถ
ondelayโ acceptable range is0..599940seconds.offdelayโ acceptable range is12..5940seconds.battery_number = valueโ sets the number of batteries that make a pack to value[1..9]. heads up bestie, this setting will change the charge and runtime estimation reported by the UPS. so like, she's not lying to you, she's just recalibrating ๐output_phase_angle = valueโ changes the output phase angle to the provided value[000, 120, 180, 240]ยฐ. iconic little degree symbol, keeping it exactly as it is โจ
UPS CAPABILITY SETTINGS ๐
reset_to_defaultโ resets capability options and their voltage and frequency limits to safe default values. (doable only when the UPS is in Standby Mode โญ)
note that setting this option will also resetups.start.auto,battery.protection,battery.energysave,ups.start.battery,outlet.0.switchable,input.transfer.high,input.transfer.low,input.frequency.highandinput.frequency.low. like, all of them. every single one. ๐
these UPSes can be fine-tuned to suit your needs by enabling or disabling the following options โ and the driver should tell you which one the UPS is capable of on startup: the settable ones will be reported either as enabled or disabled in the logs. so check your logs, bestie, the tea is in there ๐
alarm_control = stringโ enable or disable alarm (BEEP! ๐) [enabled/disabled]. settable also 'on the fly' with thebeeper.enableandbeeper.disableinstant commands. slay โจbypass_alarm = stringโ enable or disable alarm (BEEP! ๐) at Bypass Mode [enabled/disabled].battery_alarm = stringโ enable or disable alarm (BEEP! ๐) at Battery Mode [enabled/disabled].bypass_when_off = stringโ enable or disable bypass when the UPS is Off [enabled/disabled]. if enabled, AC will directly provide power to connected devices when the UPS is off. main character energy fr ๐ฅbypass_forbidding = stringโ enable or disable Bypass Forbidding [enabled/disabled]. if enabled, the UPS will not transfer to bypass mode under any condition. periodt, she said no ๐converter_mode = stringโ enable or disable Converter Mode [enabled/disabled]. when the input frequency is within40 Hzto70 Hz, the UPS can be set at a constant output frequency,50 Hzor60 Hz. the UPS will still charge battery under this mode. multitasking queen ๐eco_mode = stringโ enable or disable ECO Mode [enabled/disabled]. when input voltage/frequency are within acceptable range, the UPS will bypass voltage to output for energy saving. PFC and INVERTER are still active at this mode. settable also "on the fly" with thebypass.startandbypass.stopinstant commands ๐ฑadvanced_eco_mode = stringโ enable or disable Advanced ECO Mode [enabled/disabled]. when input voltage/frequency are within acceptable range, the UPS will bypass voltage to output for energy saving. PFC and INVERTER are off at this mode. that's the difference, bestie, don't mix them up ๐battery_open_status_check = stringโ enable or disable Battery Open Status Check [enabled/disabled]. if enabled, when the UPS is turned on, it will check if the battery is connected or not. she's doing a vibe check on your battery ๐site_fault_detection = stringโ enable or disable site fault detection [enabled/disabled]. if enabled, the UPS will beep when the input neutral and hot wires are reversed. beep beep, that's your wiring being backwards ๐จconstant_phase_angle = stringโ enable or disable Constant Phase Angle Function (output and input phase angles are not equal) [enabled/disabled].limited_runtime_on_battery = stringโ enable or disable limited runtime on battery mode [enabled/disabled].
BYPASS MODE VOLTAGE/FREQUENCY LIMITS ๐ฆ
variables to fine-tune voltage and frequency limits for Bypass mode. these limits are reset to safe default values by reset_to_default. โญ
if AC voltage and frequency are within acceptable range, Bypass mode will be used (if the UPS is capable of and it's enabled).
since these values are device-specific, if your UPS supports them, you will get their settable limits printed in the logs on startup. logs = free lore drops ๐
max_bypass_volt = valueโ maximum voltage for Bypass Mode (V).min_bypass_volt = valueโ minimum voltage for Bypass Mode (V).max_bypass_freq = valueโ maximum frequency for Bypass Mode (Hz).min_bypass_freq = valueโ minimum frequency for Bypass Mode (Hz).
OPTIONS SPECIFIC FOR P31 UPSES ๐
the following options are available only on P31 UPSes.
work_range_type = stringโ device grid working range for P31 UPSes [Appliance/UPS].
TESTING ๐ง
okay so this protocol comes with a couple of functions that are not enabled by default, because your friendly neighborhood developer doesn't fully know some part of the communication protocol used by these UPSes ๐. since these functions are supposed to be queries to the UPS for some kind of information, they should not make your UPS go boom. so if you are brave enough to risk your UPS and attached devices' life to help the developers, this will be very appreciated. do it at your own risk. ๐
testingโ if invoked, the driver will exec also commands that still need testing.
SERIAL INTERFACE ONLY ๐
cablepower = stringโ by default the driver will set DTR and clear RTS (normal). if you find that your UPS isn't detected, or the communication with the UPS is unreliable, you may try if clear DTR and set RTS (reverse), set DTR and RTS (both) or clear DTR and RTS (none) improves this situation. it's giving โจtry all the combosโจ ๐
USB INTERFACE ONLY ๐
port = stringโ required option for all NUT drivers. some value must be set, typicallyautofor drivers that handle USB connections.
Note โ this could be a device filesystem path like/dev/usb/hiddev0, but current use of the libusb API precludes knowing and matching by such identifiers. they may also be inherently unreliable (dependent on re-plugging and enumeration order). at this time the actual value is ignored, but syntactically someportconfiguration must still be there. yes bestie, it's decorative but mandatory ๐
it is possible to control multiple UPS units simultaneously by running several instances of this driver, provided they can be uniquely distinguished by setting some combination of the vendor, product, vendorid, productid, serial, bus and/or device options detailed below. for devices or operating systems that do not provide sufficient information, the allow_duplicates option can be of use (limited and risky!). ๐ซถ
vendorid = regex,productid = regex,vendor = regex,product = regex,serial = regexโ select a specific UPS, in case there is more than one connected via USB. each option specifies an extended regular expression (seeregex(7)for more information on regular expressions), which must match the UPS's entire respective vendor/product/serial string values (minus any surrounding whitespace), or the whole 4-digit hexadecimal code forvendoridandproductid.
try lsusb(8) or running this NUT driver with the -DD command-line argument for finding out the strings to match. detective work, but make it cute ๐โจ
examples:
-x vendor="Foo.Corporation.*"-x vendorid="051d*"(APC)-x product=".*(Smart|Back)-?UPS.*"
bus = regexโ OPTIONAL, NOT RECOMMENDED.
select a UPS on a specific USB bus or group of buses. the argument is a regular expression that must match the bus name where the UPS is connected (e.g. bus="002" or bus="00[2-3]") as seen on Linux in /sys/bus/usb/devices or lsusb(8); including leading zeroes. ๐
Note โ bus numbers are not guaranteed by the OS to be stable across re-boots, kernel driver reloads or device re-plugging (e.g. changing visible population of USB hubs). so like, don't build your whole personality on them ๐
device = regexโ OPTIONAL, NOT RECOMMENDED.
select a UPS on a specific USB device or group of devices. the argument is a regular expression that must match the device name where the UPS is connected (e.g. device="001" or device="00[1-2]") as seen on Linux in /sys/bus/usb/devices or lsusb(8); including leading zeroes.
Note โ device numbers are not guaranteed by the OS to be stable across re-boots or device re-plugging. same energy as above, bestie ๐ญ
busport = regexโ OPTIONAL, NOT RECOMMENDED.
if supported by the hardware, OS and libusb on the particular deployment, this option should allow you to specify physical port numbers on an USB hub, rather than logical device enumeration values โ and in turn, this should be less volatile across reboots or re-plugging. the value may be seen in the USB topology output of lsusb -tv on systems with that tool, for example. ๐
Note โ this option is not practically supported by some NUT builds (it should be ignored with a warning then), and not by all systems that NUT can run on. so, you know. sometimes she's just not there ๐ซ
allow_duplicatesโ OPTIONAL, NOT RECOMMENDED.
if you have several UPS devices which may not be uniquely identified by the options above (e.g. only VID:PID can be discovered there), this flag allows each driver instance where it is set to take the first match if available, or proceed to try another.
normally the driver initialization would abort at this point claiming "Resource busy" or similar error, assuming that the otherwise properly matched device is unique โ and some other process already handles it.
Warning โ this feature is inherently non-deterministic! the association of driver instance name to actual device may vary between runs! like, chaos mode activated, you have been warned ๐๐ฅ
If you only care to know that at least one of your no-name UPSes is online, this option can help. ๐
If you must really know which one โ it will not! ๐ญ
usb_set_altinterface = bAlternateSettingโ force a redundant call tousb_set_altinterface(). Highkey useful when your device is out here serving multiple USB roles and the UPS isn't sitting on interface number 0 (which is the default).usb_config_index,usb_hid_rep_index,usb_hid_desc_index,usb_hid_ep_in,usb_hid_ep_outโ force the use of specific interface / endpoint / descriptor index etc. numbers instead of just defaulting to 0 (some drivers for certain devices known to use non-zero numbers rarely land on other values). You write these as a hexadecimal number. ๐ข
As a rule of thumb for usb_hid_desc_index discovery: you'll see larger wDescriptorLength values (roughly 600+ bytes) in the reports from lsusb or similar tools. ๐
LIBUSB_DEBUG = INTEGERโ run-time troubleshooting of USB-capable NUT drivers isn't just about cranking up the common NUT debug verbosity (like using theDEBUG_MINsetting inups.conf(5), or protocol commands to change thedriver.debugvalue) โ it can also benefit from LibUSB-specific debugging. ๐
For that latter bit, you can set the LIBUSB_DEBUG driver option. Alternatively you can do it the classic way and export the environment variable LIBUSB_DEBUG before starting a NUT driver program (it may be set and "exported" in the driver init script or service method, perhaps via nut.conf(5)), to a numeric value such as 4 ("All messages are emitted").
For more details, including the currently supported values for your version of the library, see e.g.:
https://libusb.sourceforge.io/api-1.0/https://libusb.sourceforge.io/api-1.0/group__libusb__lib.html
subdriver = stringโ pick a serial-over-USB subdriver to use. Your choices areablerex,armac,cypress,fabula,fuji,gtec,hunnox,ippon,krauler,phoenix,phoenixtec,sgsandsnr. โจ
Run the driver program with the --help option to see the exact list of subdriver values it would currently recognize.
Note ๐ When you use this option, it is mandatory to also specify thevendoridandproductidmatching parameters. No skipping, bestie.
langid_fix = valueโ apply the language ID workaround to thekraulersubdriver. This is mandatory for some devices to even work (LDLC,Dynamixand others). You must provide value (0x409or0x4095), according to your device entry in the NUT hardware compatibility list (HCL). ๐noscanlangidโ if this flag is set, don't autoscan the valid range forlangid.
๐ง IMPLEMENTATION NOTES ๐ง
armac subdriver
The Armac communication subdriver reproduces a communication protocol used by an old release of "PowerManagerII" software, which doesn't seem to be Armac specific: its banner is "2004 Richcomm Technologies, Inc. Dec 27 2005 ver 1.1." Maybe other Richcomm UPSes would work with this โ maybe even better than with the older standalone richcomm_usb driver. ๐ค
fabula subdriver
This subdriver, meant to be used with the megatec protocol, does not support the various test.battery commands. Plus, the shutdown.return command ignores the values set in ups.delay.start/ondelay and makes the UPS turn on the load as soon as power is back. ๐ฌ
gtec subdriver
Currently, the Gtec specific support is only known to work with USB devices (tested with a Gtec ZP120N), and was not seen with Serial port.
This mode is not automatically detected, and should be enabled manually in your ups.conf, e.g.:
[gtec-ups]
driver = "nutdrv_qx"
port = "auto"
subdriver = "gtec"
protocol = "gtec"
Other subdrivers and protocol implementations (including blazer_usb(8)) sort of work, but both have two problems:
- They use the simple "Q1" query, which doesn't report the result of the latest battery test.
- For some reason the UPS reports normal battery voltage even when the battery is completely disconnected. So you won't know the battery is dead until a power failure. ๐
- This driver sends the more advanced "Q4" request instead. Here the answer includes status letters with more information than the Q1 binary flags, including battery status.
- USB reply is read in 8-byte chunks, which causes the UPS to disconnect from USB. The UPS reconnects in a second, but it still breaks the initialization of
nutdrv_qx, where the query is sent twice in a short time (unlikeblazer_usb).- The solution is simple: read the whole reply at once. ๐ซถ
hunnox subdriver
This protocol subdriver is closely related to the fabula one, with a few tweaks for devices not directly supported by that driver.
fuji subdriver
This subdriver, meant to be used with the megatec protocol, does not support the shutdown.stayoff and load.off commands. Plus, the shutdown.return command ignores the values set in ups.delay.start/ondelay and makes the UPS turn on the load as soon as power is back. ๐ญ
krauler subdriver
This subdriver, meant to be used with the megatec protocol, does not support the shutdown commands, i.e.: shutdown.return, shutdown.stayoff and load.off.
snr subdriver
This subdriver, meant to be used with the megatec protocol, does not support the shutdown commands, i.e.: shutdown.return, shutdown.stayoff and load.off.
โก UPS COMMANDS โก
This driver supports some instant commands (see upscmd(8)):
beeper.toggleโ toggle the UPS beeper. (Not available on some hardware) ๐load.onโ turn on the load immediately. (Not available on some hardware)load.offโ turn off the load immediately (see KNOWN PROBLEMS). โ ๏ธshutdown.returnโ turn off the load and return when power is back. Uses the timers defined byups.delay.startandups.delay.shutdown.shutdown.stayoffโ turn off the load and remain off (see KNOWN PROBLEMS). Uses the timer defined byups.delay.shutdown. โ ๏ธshutdown.stopโ stop a shutdown in progress.test.battery.start.deepโ perform a long battery test. (Not available on some hardware)test.battery.start.quickโ perform a quick (10 second) battery test.test.battery.stopโ stop a running battery test. (Not available on some hardware)
BESTUPS, INNOVART31, INNOVART33, INNOVATAE, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, Q2, Q6, ZINTO PROTOCOLS
test.battery.startvalue โ perform a battery test for the duration of value seconds (truncated to 60 seconds)[60..5940].
MASTERGUARD PROTOCOL
clear.fault.recordโ clear fault/error record ๐งนbeeper.enableโ enable the UPS beeper.beeper.disableโ disable the UPS beeper.test.battery.start.lowโ perform a battery test until the battery charge is low.
The difference between the "battery test until battery low" and "deep battery test" is that the latter is actually a battery calibration test and needs some preconditions to be met, i.e. the load must be between 30% and 100% and the starting battery capacity is greater than 99%. ๐
The "Battery test until battery low" can be started anytime. โจ
Feature was tested on Masterguard A1000 and A2000 units.
test.battery.startvalue โ perform a battery test for the duration of value seconds (truncated to 60 seconds)[0..5940]. This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds).bypass.startโ put the UPS in bypass modebypass.stopโ take the UPS in normal mode
VOLTRONIC POWER P98 UNITS (WITH MECER PROTOCOL)
test.battery.start value
Perform a battery test for the duration of value seconds (truncated to 60 seconds) [12..5940]. This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds).
VOLTRONIC PROTOCOL
The following instant commands are available for the voltronic protocol. Not all of them are available on all the UPSes supported by this protocol. ๐
beeper.enableโ enable the UPS beeper.beeper.disableโ disable the UPS beeper.test.battery.startvalue โ perform a battery test for the duration of value seconds[12..5940]. This value is truncated to units of 6 seconds (less than 60 seconds) or 60 seconds (more than 60 seconds).outlet.1.load.offโ turn off outlet 1 load immediately.outlet.1.load.onโ turn on outlet 1 load immediately.outlet.2.load.offโ turn off outlet 2 load immediately.outlet.2.load.onโ turn on outlet 2 load immediately.outlet.3.load.offโ turn off outlet 3 load immediately.outlet.3.load.onโ turn on outlet 3 load immediately.outlet.4.load.offโ turn off outlet 4 load immediately.outlet.4.load.onโ turn on outlet 4 load immediately.bypass.startโ put the UPS in ECO Mode.bypass.stopโ take the UPS out of ECO Mode.
๐ฎ BATTERY CHARGE GUESSTIMATION ๐ฎ
okay so bestie, by popular demand (yes, the people begged), this driver will report a guesstimated battery.charge and, if you want it, battery.runtime too โ but ONLY if you specified a couple of those EXTRA ARGUMENTS we just talked about. it's giving โจmathโจ and honestly we love her for it.
So if you drop both battery.voltage.high and battery.voltage.low into ups.conf(5), but you don't enter runtimecal, she's gonna guesstimate the state of charge by just looking at the battery voltage alone. and ngl, that is NOT reliable under load ๐ญ because it only gives you reasonably accurate readings if you disconnect the load, let the battery rest for a couple minutes, and then measure the open cell voltage. which isโฆ literally not practical when the power already went out and the UPS is busy powering your systems?? like be so fr. ๐
battery.voltage - battery.voltage.low
battery.charge = ------------------------------------------ x 100 %
battery.voltage.high - battery.voltage.low
There is a way to get better readings without disconnecting the load, but it requires you to keep track of how much (and how fast) current is going in and out of the battery. If you specified the runtimecal, the driver will attempt to do exactly that. but heads up โ this heavily relies on the values you enter, and the UPS must be able to report the load as well. and there are quite a couple of devices out there that report 0 % (or literally any other fixed value) at all times, in which case this obviously doesn't work. ๐
The driver also has no way of determining the degradation of the battery capacity over time, so you'll have to deal with this yourself (by adjusting the values in runtimecal). Also note that the driver guesses the initial state of charge based on the battery voltage, so this may be less than 100 %, even when you are certain that they are full. there is just no way to reliably measure this between 0 and 100 % full charge. that's the tea. ๐ซ
This is better than nothing (but not by much). If any of the above calculations is giving you incorrect readings, you are the one that put in the values in ups.conf(5), so don't complain with the author. ๐ค If you need something better, buy a UPS that reports battery.charge and battery.runtime all by itself without the help of a NUT driver. periodt. ๐
๐ซ NOTES FOR THE PREVIOUS USER OF MEGATEC DRIVERS ๐ซ
The nutdrv_qx driver having replaced the megatec ones, some configuration changes may be required by users switching to nutdrv_qx.
Part of this, the following megatec options, in ups.conf(5), have to be changed:
battvoltsโ You need to usedefault.battery.voltage.highanddefault.battery.voltage.lowdtrandrtsโ You need to usecablepowerignoreoffโ This parameter can simply be discarded, since it was a wrong understanding of the specification.
๐ฆ NOTES FOR THE PREVIOUS USER OF BLAZER DRIVERS ๐ฆ
The nutdrv_qx driver having replaced the blazer ones, some configuration changes may be required by users switching to nutdrv_qx.
Part of this, the following blazer options, in ups.conf(5), have to be changed:
ondelayโ While the previous blazer drivers expected minutes, the newnutdrv_qxdriver wants seconds.
The following instant command has also been changed:
test.battery.startvalue โ While the old blazer drivers expected a value in minutes, thenutdrv_qxdriver wants a value in seconds.
๐ธ NOTES FOR THE PREVIOUS USER OF BESTUPS DRIVER ๐ธ
The nutdrv_qx driver having replaced the bestups one, some configuration changes may be required by users switching to nutdrv_qx.
Part of this, the following bestups options, in ups.conf(5), are no longer supported by this driver:
nombattvolt,battvoltmultโ See BATTERY CHARGE GUESSTIMATION.IDโ Discarded.
๐ง NOTES FOR THE PREVIOUS USER OF VOLTRONIC DRIVERS ๐ง
The nutdrv_qx driver having replaced the voltronic ones, some configuration changes may be required by users switching to nutdrv_qx.
Part of this, the following voltronic options, in ups.conf(5), have to be changed:
ondelayโ While the previous voltronic drivers expected minutes, the newnutdrv_qxdriver wants seconds. It no longer defaults to0minutes but to3minutes (i.e.180seconds) for compatibility with the users switching from the old blazer drivers.battnumbโ This option has been renamed tobattery_number.
The following options are no longer supported by this driver, you can now change them more conveniently "on the fly" calling upsrw(8) with the appropriate NUT variable โ provided that your UPS supports them. ๐
battpacksโbattery.packsโ Set number of battery packs in parallel[1..99]. This setting will change the charge and runtime estimation reported by the UPS.battlowโbattery.voltage.lowโ Set minimum battery voltage just before the UPS automatically shuts down. This setting will change the charge and runtime estimation reported by the UPS.auto_rebootโups.start.autoโ Enable or disable auto reboot[enabled/disabled]. If enabled, the UPS will auto recover when AC power returns.battery_protectionโbattery.protectionโ Enable or disable battery deep discharge protection[enabled/disabled].energy_savingโbattery.energysaveโ Enable or disable Green power function[enabled/disabled]. If enabled, for energy saving, the UPS will auto off when there is no load.cold_startโups.start.batteryโ Enable or disable Cold Start[enabled/disabled]. If enabled, the UPS can be turned on also if AC is not connected to the UPS.outlet_controlโoutlet.0.switchableโ Enable or disable programmable outlets control at battery mode[enabled/disabled]. If enabled, the UPS will cut off programmable outlets after backup time (set throughoutlet.{1,2,3,4}.delay.shutdown) arrives. If disabled, the UPS will provide continuous power to programmable outlets until the battery is running out.max_eco_voltโinput.transfer.highโ Maximum voltage for ECO Mode (V). If AC voltage is within acceptable range, ECO mode will be used (If the UPS is capable of and it's enabled).min_eco_voltโinput.transfer.lowโ Minimum voltage for ECO Mode (V). If AC voltage is within acceptable range, ECO mode will be used (If the UPS is capable of and it's enabled).max_eco_freqโinput.frequency.highโ Maximum frequency for ECO Mode (Hz). If AC frequency is within acceptable range, ECO mode will be used (If the UPS is capable of and it's enabled).min_eco_freqโinput.frequency.lowโ Minimum frequency for ECO Mode (Hz). If AC frequency is within acceptable range, ECO mode will be used (If the UPS is capable of and it's enabled).outlet1_delayโoutlet.1.delay.shutdownโ Delay time before programmable outlet 1 shuts down the load when on battery mode[0..59940](seconds).outlet2_delayโoutlet.2.delay.shutdownโ Delay time before programmable outlet 2 shuts down the load when on battery mode[0..59940](seconds).outlet3_delayโoutlet.3.delay.shutdownโ Delay time before programmable outlet 3 shuts down the load when on battery mode[0..59940](seconds).outlet4_delayโoutlet.4.delay.shutdownโ Delay time before programmable outlet 4 shuts down the load when on battery mode[0..59940](seconds).batt_typeโbattery.typeโ Battery type (for P31 UPSes only)[Li/Flooded/AGM].
๐ KNOWN PROBLEMS ๐
ok so bestie, here's the tea on stuff that lowkey doesn't work everywhere ๐ซ
Some UPS commands just aren't supported by all models. Like, it's not a universal thing. In most cases, the driver will send a message to the system log when the user tries to execute an unsupported command โ so at least you get some kind of heads up, yk? But unfortunately, some models don't even provide a way for the driver to check for this, so the unsupported commands will silently fail. And by silently I mean SILENTLY. no log, no nothing, just vibes and disappointment ๐ญ
Both the load.off and shutdown.stayoff instant commands are meant to turn the load off indefinitely. That's the whole point of them, that's their main character arc. However, some UPS models don't allow this. so like. don't count on it everywhere fr fr.
Some models report a bogus value for the beeper status (will always be enabled or disabled). So the beeper.toggle command may appear to have no effect in the status reported by the driver when, in fact, it is working fine. it's giving gaslighting honestly ๐
the UPS is fine, the reporting is the problem.
The temperature and load value is known to be bogus in some models. yeah. those numbers? not real. ๐
MASTERGUARD UNITS
The driver is supposed to support both "new" A series (A700/1000/2000/3000 and their -19 cousins) and E series (E60/100/200), but was tested only on A due to lack of E hardware. so like, E series is theoretically supported, we just never got our hands on one to vibe check it ๐ง no cap.
VOLTRONIC-AXPERT UNITS
This protocol supports Voltronic Power Axpert inverters, based on P30 protocol (used e.g. in photovoltaic equipment, often paired with an UPS charged by the solar panels). โ๏ธ๐ iconic combo honestly.
The code is currently largely experimental, with data point and command names not aligned with concepts that are part of NUT standard vocabulary (this many of them are prefixed with experimental. namespace). In fact, many features may be only exposed in specially configured builds of the NUT driver program. so like โ don't be shocked when the names look weird, that's on purpose โจ
VOLTRONIC-QS UNITS
Both load.off and shutdown.stayoff instant commands are known to work as expected (i.e. turn the load off indefinitely) only if mains is present. Otherwise, as soon as mains returns, the load will be powered. so the "indefinitely" part is doing a lot of heavy lifting there ๐ญ
After issuing a shutdown.return instant command, the UPS won't wait ondelay before powering on the load, provided the following conditions are met:
- if the load has been previously (no matter how long before) powered off through
load.off/shutdown.stayoffand powered on throughload.on/shutdown.stop, and - if AC wasn't cut after issuing the
load.off/shutdown.stayoff(i.e. the UPS didn't turn itself off), and - if there's a power outage after issuing the
shutdown.returncommand
In this case, as soon as mains returns the load will be powered. like, immediately. no waiting, no ondelay, nothing. just bam โก
VOLTRONIC-QS-HEX UNITS
shutdown.return, load.off, and shutdown.stayoff instant commands are known to work as expected only if mains is present. Otherwise, as soon as mains returns, the load will be powered. same energy as the QS ones above tbh ๐
๐จ UPS WARNINGS (VOLTRONIC PROTOCOL) ๐จ
ok this part is actually so cool once you get it, stay with me ๐ซถ
The UPSes supported by voltronic protocol report warnings through a 64bit flag (bit1bit2...bit63bit64) where 1 means that a warning arose, while 0 means no warning. It's giving bitmask core. ๐
Since more than one warning at a time can be signaled, and because of the limited space in the ups.alarm variable, if the length of the warnings exceeds that of ups.alarms variable, they will be reported as bits. so sometimes you don't get the nice human sentence โ you get the raw bits, bestie.
If you want to know the explanation of that bit you can either watch the log or see the next table (unlisted bits equal to unknown warnings). the table's coming right up, don't you worry ๐
๐ Table 1. UPS Warnings for voltronic UPSes ๐
okay so this is the big one, the warning bingo card ๐ every single entry in the table, in order, nothing skipped, nothing summarised. The number on the left is the index, and the text next to it is the corresponding warning you're gonna see. Save this list, screenshot it, tattoo it on your forearm, idk, but it's here ๐
Battery disconnectedNeutral not connectedSite faultPhase sequence incorrectPhase sequence incorrect in bypassInput frequency unstable in bypassBattery overchargedLow batteryOverload alarmFan alarmEPO enabledUnable to turn on UPSOver temperature alarmCharger alarmRemote auto shutdownL1 input fuse not workingL2 input fuse not workingL3 input fuse not workingPositive PFC abnormal in L1Negative PFC abnormal in L1Positive PFC abnormal in L2Negative PFC abnormal in L2Positive PFC abnormal in L3Negative PFC abnormal in L3Abnormal in CAN-bus communicationAbnormal in synchronous signal circuitAbnormal in synchronous pulse signal circuitAbnormal in host signal circuitMale connector of parallel cable not connected wellFemale connector of parallel cable not connected wellParallel cable not connected wellBattery connection not consistent in parallel systemsAC connection not consistent in parallel systemsBypass connection not consistent in parallel systemsUPS model types not consistent in parallel systemsCapacity of UPSs not consistent in parallel systemsAuto restart setting not consistent in parallel systemsBattery cell over chargeBattery protection setting not consistent in parallel systemsBattery detection setting not consistent in parallel systemsBypass not allowed setting not consistent in parallel systemsConverter setting not consistent in parallel systemsHigh loss point for frequency in bypass mode not consistent in parallel systemsLow loss point for frequency in bypass mode not consistent in parallel systemsHigh loss point for voltage in bypass mode not consistent in parallel systems
bestie if you're seeing like half of these at once, that's not a vibe check, that's an โจemergencyโจ. Forty-five ways to be sad, and the parallel-system ones all start sounding the same after a while โ which is lowkey the point, they're all "one of your units disagrees with the others" energy ๐ญ
and we're not done, keep going ๐
46โ Low loss point for voltage in bypass mode not consistent in parallel systems47โ High loss point for frequency in AC mode not consistent in parallel systems48โ Low loss point for frequency in AC mode not consistent in parallel systems49โ High loss point for voltage in AC mode not consistent in parallel systems50โ Low loss point for voltage in AC mode not consistent in parallel systems51โ Warning for locking in bypass mode after 3 consecutive overloads within 30 min52โ Warning for three-phase AC input current unbalance53โ Warning for a three-phase input current unbalance detected in battery mode54โ Warning for Inverter inter-current unbalance55โ Programmable outlets cut off pre-alarm56โ Warning for Battery replace57โ Abnormal warning on input phase angle58โ Warning!! Cover of maintain switch is open62โ EEPROM operation error
๐ซถ AUTHORS
the literal icons who built this. show some respect bestie ๐
- Daniele Pezzini <hyouko@gmail.com>
- Arnaud Quette <arnaud.quette@gmail.com>
- John Stamp <kinsayder@hotmail.com>
- Peter Selinger <selinger@users.sourceforge.net>
- Arjen de Korte <adkorte-guest@alioth.debian.org>
- Alexander Gordeev <lasaine@lvk.cs.msu.su>
- Edgar Fuร <ef@math.uni-bonn.de>
๐ฆ SEE ALSO
okay so if you wanna go deeper (and you should, it's giving lore), go read these:
blazer_ser(8),blazer_usb(8),nutupsdrv(8),ups.conf(5),upsc(8),upscmd(8),upsdrvctl(8),upsmon(8),upsrw(8)
๐ธ Internet Resources:
- The NUT (Network UPS Tools) home page: https://www.networkupstools.org/historic/v2.8.5/
- The NUT HCL: https://www.networkupstools.org/stable-hcl.html
and that's the whole page, bestie ๐ you made it to the end, which honestly is main character energy ๐
this lil masterpiece is from Network UPS Tools 2.8.5, dated 10/07/2026 โ so if something's acting weird, that's the version and the date you're working with, no cap. go plug something in and slay โจ๐
๐ฆ where this page comes from
- fedora 43: nut 2.8.5-9.fc43 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 43: nut 2.8.5-9.fc43 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut 2.8.5-9.fc44 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- fedora 44: nut 2.8.5-9.fc44 ยท GPL-2.0-or-later AND GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms