networkupstools/nut — pull request #72 by zykh (2013-11-23 23:16:51+00:00)
Title: nutdrv_qx: new 'fallback' Q1 subdriver

Add new 'Q1' subdriver.
This subdriver implements the same protocol as the one used by the 'megatec' subdriver minus the vendor (I) and ratings (F) queries.
In the claim function:
- it doesn't even try to get 'vendor' informations (I)
- it checks only status (Q1), through 'input.voltage' variable

Therefore it should be able to work even if the UPS doesn't support vendor/ratings *and* the user doesn't use the 'novendor'/'norating' flags, as long as:
- the UPS replies a Q1-compliant answer (i.e. not necessary filled with all of the Q1-required data, but at least of the right length and with not available data filled with some replacement character)
- the UPS reports a valid input.voltage (used in the claim function)
- the UPS reports valid status bits (1st, 2nd, 3rd, 6th, 7th are the mandatory ones)

This commit reintroduces a functionality of the blazer subdrivers that was lost because now, in order to tell whether a device is supported by a subdriver or not, if the user doesn't call the driver with the 'novendor' flag, both the status (Q1) and the vendor (I/FW?) queries are needed (that's to better discern the subdrivers).

Reference: http://lists.alioth.debian.org/pipermail/nut-upsuser/2013-November/008692.html