Tomáš Thiemel
2022-Aug-15 19:46 UTC
[Nut-upsuser] request - nutdrv_qx_megatec.c: update/fix the code for "new" UPS
Hi. I bought new UPS which is not "supported", yet. ? Brand: Volt Polska Model: Micro 800 have USB with Megatec protocol ("Q1<cr>") Data returned by UPS: "(242.9 242.9 242.9 000 50.0 13.3 --.- 00001001" Problem: data returned by UPS is not handled correctly by nutdrv_qx/megatec driver, although the SW from https://www.power-software-download.com/viewpower.html (JAVA) works fine. ? "ups.temperature" is defined as "%.1f" in the source code but my UPS returns "--.-" Debug info: root at patschkav-OpenWrt:~# /lib/nut/nutdrv_qx -DDDDDDDDDD -a ups -x protocol=megatec Network UPS Tools - Generic Q* USB/Serial driver 0.28 (2.7.4) USB communication driver 0.33 ? ?0.000000? ? ?send_to_all: SETINFO driver.parameter.port "auto" ? ?0.006788? ? ?send_to_all: SETINFO driver.parameter.vendorid "0665" ? ?0.008047? ? ?send_to_all: SETINFO driver.parameter.productid "5161" ? ?0.010655? ? ?send_to_all: SETINFO driver.parameter.protocol "megatec" ? ?0.011858? ? ?debug level is '10' ? ?0.014225? ? ?upsdrv_initups... ? ?0.019924? ? ?Checking device (0665/5161) (001/014) ? ?0.036693? ? ?- VendorID: 0665 ? ?0.036788? ? ?- ProductID: 5161 ? ?0.036819? ? ?- Manufacturer: unknown ? ?0.036850? ? ?- Product: ? ?0.036881? ? ?- Serial Number: unknown ? ?0.036912? ? ?- Bus: 001 ? ?0.036942? ? ?- Device release number: 0002 ? ?0.036971? ? ?Trying to match device ? ?0.037069? ? ?Device matches ? ?0.037178? ? ?nut_usb_set_altinterface: skipped usb_set_altinterface(udev, 0) ? ?0.037262? ? ?send_to_all: SETINFO ups.vendorid "0665" ? ?0.037317? ? ?send_to_all: SETINFO ups.productid "5161" ? ?0.037361? ? ?Skipping protocol Voltronic 0.06 ? ?0.037399? ? ?Skipping protocol Voltronic-QS 0.07 ? ?0.037438? ? ?Skipping protocol Voltronic-QS-Hex 0.10 ? ?0.037477? ? ?Skipping protocol Mustek 0.07 ? ?0.037514? ? ?Skipping protocol Megatec/old 0.07 ? ?0.037551? ? ?Skipping protocol BestUPS 0.06 ? ?0.037589? ? ?Skipping protocol Mecer 0.07 ? ?0.052692? ? ?send: Q1 ? ?0.054678? ? ?read: timeout (0) ? ?0.054842? ? ?qx_process_answer: short reply (input.voltage) ? ?1.465747? ? ?send: Q1 ? ?1.494790? ? ?read [? 0]: (8 bytes) => 28 32 34 30 2e 38 20 32 ? ?1.526803? ? ?read [? 8]: (8 bytes) => 34 30 2e 38 20 32 34 30 ? ?1.558795? ? ?read [ 16]: (8 bytes) => 2e 38 20 30 30 30 20 35 ? ?1.590799? ? ?read [ 24]: (8 bytes) => 30 2e 32 20 31 33 2e 33 ? ?1.622797? ? ?read [ 32]: (8 bytes) => 20 2d 2d 2e 2d 20 30 30 ? ?1.654819? ? ?read [ 40]: (8 bytes) => 30 30 31 30 30 31 0d 00 ? ?1.654919? ? ?read: (240.8 240.8 240.8 000 50.2 13.3 --.- 00001001 ? ?1.655052? ? ?send_to_all: SETINFO input.voltage "240.8" ? ?3.061834? ? ?send: I ? ?3.094895? ? ?read [? 0]: (8 bytes) => 31 0d 00 00 00 00 00 00 ? ?3.094994? ? ?read: 1 ? ?3.095100? ? ?qx_process_answer: short reply (ups.firmware) ? ?3.095161? ? ?send_to_all: DELINFO input.voltage ? ?4.506937? ? ?send: Q1 ? ?5.509389? ? ?read: Operation timed out (-145) ? ?5.509494? ? ?qx_process_answer: short reply (input.voltage) ? ?5.509541? ? ?Skipping protocol Zinto 0.06 ? ?5.509578? ? ?Skipping protocol Q1 0.07 ? ?5.509608? ? ?Device not supported! ? ?5.509638? ? ?Device not supported! Can some skilled programmer fix the code in?nutdrv_qx_megatec.c, please? I'm just stupid sysadmin. :-(Thank you very much.? Best regards / S pozdravem ? Tom?? Thiemel thiemel at centrum.cz ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20220815/c1e16d0e/attachment.htm>
Jim Klimov
2022-Aug-16 10:44 UTC
[Nut-upsuser] request - nutdrv_qx_megatec.c: update/fix the code for "new" UPS
Ahoj, Just in case, did you check other subdrivers there? They all are for variants of Megatec Qx family, UPS vendors were creative with it... Jim On Tue, Aug 16, 2022, 03:46 Tom?? Thiemel via Nut-upsuser < nut-upsuser at alioth-lists.debian.net> wrote:> Hi. > > I bought new UPS which is not "supported", yet. > > > > Brand: Volt Polska > > Model: Micro 800 > > have USB with Megatec protocol ("Q1<cr>") > > Data returned by UPS: *"(242.9 242.9 242.9 000 50.0 13.3 --.- 00001001"* > > Problem: data returned by UPS is not handled correctly by > nutdrv_qx/megatec driver, although the SW from > https://www.power-software-download.com/viewpower.html (JAVA) works fine. > > > > "ups.temperature" is defined as "%.1f" in the source code but my UPS > returns "--.-" > > > Debug info: > > root at patschkav-OpenWrt:~# /lib/nut/nutdrv_qx -DDDDDDDDDD -a ups -x > protocol=megatec > > Network UPS Tools - Generic Q* USB/Serial driver 0.28 (2.7.4) > > USB communication driver 0.33 > > 0.000000 send_to_all: SETINFO driver.parameter.port "auto" > > 0.006788 send_to_all: SETINFO driver.parameter.vendorid "0665" > > 0.008047 send_to_all: SETINFO driver.parameter.productid "5161" > > 0.010655 send_to_all: SETINFO driver.parameter.protocol "megatec" > > 0.011858 debug level is '10' > > 0.014225 upsdrv_initups... > > 0.019924 Checking device (0665/5161) (001/014) > > 0.036693 - VendorID: 0665 > > 0.036788 - ProductID: 5161 > > 0.036819 - Manufacturer: unknown > > 0.036850 - Product: > > 0.036881 - Serial Number: unknown > > 0.036912 - Bus: 001 > > 0.036942 - Device release number: 0002 > > 0.036971 Trying to match device > > 0.037069 Device matches > > 0.037178 nut_usb_set_altinterface: skipped > usb_set_altinterface(udev, 0) > > 0.037262 send_to_all: SETINFO ups.vendorid "0665" > > 0.037317 send_to_all: SETINFO ups.productid "5161" > > 0.037361 Skipping protocol Voltronic 0.06 > > 0.037399 Skipping protocol Voltronic-QS 0.07 > > 0.037438 Skipping protocol Voltronic-QS-Hex 0.10 > > 0.037477 Skipping protocol Mustek 0.07 > > 0.037514 Skipping protocol Megatec/old 0.07 > > 0.037551 Skipping protocol BestUPS 0.06 > > 0.037589 Skipping protocol Mecer 0.07 > > 0.052692 send: Q1 > > 0.054678 read: timeout (0) > > 0.054842 qx_process_answer: short reply (input.voltage) > > 1.465747 send: Q1 > > 1.494790 read [ 0]: (8 bytes) => 28 32 34 30 2e 38 20 32 > > 1.526803 read [ 8]: (8 bytes) => 34 30 2e 38 20 32 34 30 > > 1.558795 read [ 16]: (8 bytes) => 2e 38 20 30 30 30 20 35 > > 1.590799 read [ 24]: (8 bytes) => 30 2e 32 20 31 33 2e 33 > > 1.622797 read [ 32]: (8 bytes) => 20 2d 2d 2e 2d 20 30 30 > > 1.654819 read [ 40]: (8 bytes) => 30 30 31 30 30 31 0d 00 > > 1.654919 read: (240.8 240.8 240.8 000 50.2 13.3 --.- 00001001 > > 1.655052 send_to_all: SETINFO input.voltage "240.8" > > 3.061834 send: I > > 3.094895 read [ 0]: (8 bytes) => 31 0d 00 00 00 00 00 00 > > 3.094994 read: 1 > > 3.095100 qx_process_answer: short reply (ups.firmware) > > 3.095161 send_to_all: DELINFO input.voltage > > 4.506937 send: Q1 > > 5.509389 read: Operation timed out (-145) > > 5.509494 qx_process_answer: short reply (input.voltage) > > 5.509541 Skipping protocol Zinto 0.06 > > 5.509578 Skipping protocol Q1 0.07 > > 5.509608 Device not supported! > > 5.509638 Device not supported! > Can some skilled programmer fix the code in nutdrv_qx_megatec.c, please? > I'm just stupid sysadmin. :-( > Thank you very much. > > > > Best regards / S pozdravem > > > > Tom?? Thiemel > > thiemel at centrum.cz > > > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20220816/ab5f5e37/attachment-0001.htm>