SoundHouseのUPS(USB接続)をLinux/Debian/Proxmoxで使う

SOUND HOUSEからなぜか発売されている無停電電源装置(UPS)も、なんやかんや世代を重ね、CLASSIC PRO UPS1500PSとかUPS2000PSなんていうバッテリー動作時の出力が正弦波になっているというモデルまで登場しています。
メーカ公式ページ

そんなわけで、試しに、CLASSIC PRO UPS1500PSを買って、Linuxサーバに接続してみました。
なお、商用電源断後のshutdownに関する設定については、このページでは扱いません。

環境
・OS: Debian 6.0ベースのProxmox 2.1
・UPS管理ソフト NUT ver 2.4.3
・サーバとUPSの接続方法: USB
・UPS: SoundHouse CLASIC PRO UPS1500PS

いろいろ試行錯誤して、ごちゃごちゃがありましたがNUT v2.4.3で使用する場合にups.confに行う最小限の設定は以下であるようです。

[soundhouse]
        driver=megatec_usb
        desc="soundhouse ups"
        port=auto

NUTのChangelogのr2766(2010-12-21)に「megatec_usb drivers, now replaced by blazer_ser and blazer_usb」という記述があるように、新しいNUTにはmegatech_usbがありません。その場合は、以下となります。

[soundhouse]
        driver=blazer_usb
        desc="soundhouse ups"
        port=auto

よく見かける設定例は以下だと思います

[soundhouse]
        driver=blazer_usb
        vendorid=0001
        productid=0000
        subdriver=krauler
        desc="soundhouse ups"
        port=/dev/usb/hiddev0

検証を行ったところNUT v2.4.3では・・・
・「driver=megatec_usb」ではは、バッテリーの充電具合(battery.charge)が取得できた。
・「subdriver=krauler」は、あってもなくても、動作は変わりませんでした。(NUT v2.6では違うかも?)
・「port=/dev/usb/hiddev0」といった感じのポート指定は、USB接続の場合は、無くても大丈夫なようです。
・vendoridとproductidは指定しなくても自動認識しました。

複数のUPSが接続されている、とか、自作のUSB機器が接続されている、とか、そんな環境でない限りは、自動認識にさせてしまってもいいかもしれません。

試行錯誤には設定が正しいのか検証が必要となるわけですが、ちゃんとUPSからデータを拾えているのかを調べている方法がよく分かりませんでしたが、「[Nut-upsuser] blazer_usb for SVEN Power Pro+ 500 USB」にて確認方法を発見。

「driver=blazer_usb」と指定している場合、「/lib/nut/blazer_usb -DDDDD -a <ups.conf上の設定名>」を実行すると、blazer_usbドライバがデバグモードで起動され、取得できているステータスが出力される、というもの。

「driver=blazer_usb」+「subdriver=krauler」+ID指定の場合

[soundhouse]
        driver=blazer_usb
        vendorid=0001
        productid=0000
        subdriver=krauler
        desc="soundhouse ups"
        port=auto
root@pveserver1:/etc/nut# /lib/nut/blazer_usb -DDDDD -a soundhouse
Network UPS Tools - Megatec/Q1 protocol USB driver 0.03 (2.4.3)
   0.000000     send_to_all: SETINFO driver.parameter.vendorid "0001"
   0.000020     send_to_all: SETINFO driver.parameter.productid "0000"
   0.000027     send_to_all: SETINFO driver.parameter.subdriver "krauler"
   0.000034     send_to_all: SETINFO driver.parameter.port "auto"
   0.000050     debug level is '5'
   0.096795     Checking device (0001/0000) (002/006)
   0.099346     - VendorID: 0001
   0.099361     - ProductID: 0000
   0.099369     - Manufacturer: MEC
   0.099377     - Product: MEC0002
   0.099383     - Serial Number: unknown
   0.099389     - Bus: 002
   0.099395     Trying to match device
   0.099450     Device matches
   0.099864     send_to_all: SETINFO ups.vendorid "0001"
   0.099908     send_to_all: SETINFO ups.productid "0000"
   0.099920     send_to_all: SETINFO device.type "ups"
   0.099930     send_to_all: SETINFO driver.version "2.4.3"
   0.099939     send_to_all: SETINFO driver.version.internal "0.03"
   0.099953     send_to_all: SETINFO driver.name "blazer_usb"
   0.099962     Trying megatec protocol...
   0.099969     send: Q1
   0.312042     send_to_all: SETINFO input.voltage "102.0"
   0.312064     send_to_all: SETINFO input.voltage.fault "0.0"
   0.312077     send_to_all: SETINFO output.voltage "102.0"
   0.312102     send_to_all: SETINFO ups.load "23"
   0.312113     send_to_all: SETINFO input.frequency "60.0"
   0.312125     send_to_all: SETINFO battery.voltage "27.00"
   0.312135     send_to_all: SETINFO ups.temperature "29.0"
   0.312144     send_to_all: SETINFO beeper.status "enabled"
   0.312149     send_to_all: SETINFO ups.type "offline / line interactive"
   0.312155     send_to_all: SETINFO ups.status "OL"
   0.312158     Status read in 1 tries
   0.312162     Supported UPS detected with megatec protocol
   0.312166     send: F
   0.414561     send_to_all: SETINFO input.voltage.nominal "100"
   0.414579     send_to_all: SETINFO input.current.nominal "9.0"
   0.414592     send_to_all: SETINFO battery.voltage.nominal "24.0"
   0.414641     send_to_all: SETINFO input.frequency.nominal "60"
   0.414650     Ratings read in 1 tries
   0.414658     send: I
   0.588598     send_to_all: SETINFO ups.mfr ""
   0.588636     send_to_all: SETINFO ups.model "1500VA"
   0.588647     send_to_all: SETINFO ups.firmware "V2.0"
   0.588654     Vendor information read in 1 tries
   0.588662     Battery runtime will not be calculated (runtimecal not set)
   0.588674     send_to_all: SETINFO ups.delay.start "180"
   0.588679     send_to_all: SETINFO ups.delay.shutdown "30"
   0.588683     send_to_all: ADDCMD beeper.toggle
   0.588687     send_to_all: ADDCMD load.off
   0.588691     send_to_all: ADDCMD load.on
   0.588695     send_to_all: ADDCMD shutdown.return
   0.588698     send_to_all: ADDCMD shutdown.stayoff
   0.588702     send_to_all: ADDCMD shutdown.stop
   0.588706     send_to_all: ADDCMD test.battery.start
   0.588710     send_to_all: ADDCMD test.battery.start.deep
   0.588714     send_to_all: ADDCMD test.battery.start.quick
   0.588718     send_to_all: ADDCMD test.battery.stop
   0.588722     send: Q1
   0.800726     send_to_all: DATAOK
   0.800803     dstate_init: sock /var/run/nut/blazer_usb-soundhouse open on fd 5
   0.800811     send_to_all: SETINFO driver.parameter.pollinterval "2"
   0.800821     send_to_all: SETINFO device.mfr ""
   0.800826     send_to_all: SETINFO device.model "1500VA"
   0.800831     send: Q1
   1.012686     send_to_all: SETINFO ups.load "24"
   2.802887     send: Q1
   3.014774     send_to_all: SETINFO ups.load "23"
   4.804803     send: Q1
   5.016824     send_to_all: SETINFO ups.load "24"
   6.806764     send: Q1
   7.018869     send_to_all: SETINFO ups.load "23"
   7.018888     send_to_all: SETINFO input.frequency "59.9"
   8.808739     send: Q1
  10.810712     send: Q1
  12.812707     send: Q1
  13.024835     send_to_all: SETINFO output.voltage "103.0"
  13.024858     send_to_all: SETINFO input.frequency "60.0"
  14.814804     send: Q1
  15.026909     send_to_all: SETINFO input.voltage "103.0"
  15.026931     send_to_all: SETINFO output.voltage "102.0"
  15.026944     send_to_all: SETINFO ups.load "24"
  16.816779     send: Q1
  17.028977     send_to_all: SETINFO input.voltage "102.0"
  17.028998     send_to_all: SETINFO output.voltage "103.0"
  17.029012     send_to_all: SETINFO ups.load "23"
  18.818749     send: Q1
  19.030782     send_to_all: SETINFO output.voltage "102.0"
  19.030799     send_to_all: SETINFO ups.load "24"
^C  19.654754   Signal 2: exiting
root@pveserver1:/etc/nut# /etc/init.d/nut start
Starting Network UPS Tools: driver(s) upsd.
root@pveserver1:/etc/nut# upsc soundhouse
battery.voltage: 27.00
battery.voltage.nominal: 24.0
beeper.status: enabled
device.mfr:
device.model: 1500VA
device.type: ups
driver.name: blazer_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 0000
driver.parameter.subdriver: krauler
driver.parameter.vendorid: 0001
driver.version: 2.4.3
driver.version.internal: 0.03
input.current.nominal: 9.0
input.frequency: 60.0
input.frequency.nominal: 60
input.voltage: 102.0
input.voltage.fault: 0.0
input.voltage.nominal: 100
output.voltage: 102.0
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware: V2.0
ups.load: 25
ups.mfr:
ups.model: 1500VA
ups.productid: 0000
ups.status: OL
ups.temperature: 29.0
ups.type: offline / line interactive
ups.vendorid: 0001
root@pveserver1:/etc/nut# 

「driver=blazer_usb」+ID指定の場合

[soundhouse]
        driver=blazer_usb
        vendorid=0001
        productid=0000
        desc="soundhouse ups"
        port=auto
root@pveserver1:/etc/nut# /lib/nut/blazer_usb -DDDDD -a soundhouse
Network UPS Tools - Megatec/Q1 protocol USB driver 0.03 (2.4.3)
   0.000000     send_to_all: SETINFO driver.parameter.vendorid "0001"
   0.000041     send_to_all: SETINFO driver.parameter.productid "0000"
   0.000049     send_to_all: SETINFO driver.parameter.port "auto"
   0.000066     debug level is '5'
   0.096380     Checking device (0001/0000) (002/006)
   0.099024     - VendorID: 0001
   0.099039     - ProductID: 0000
   0.099047     - Manufacturer: MEC
   0.099054     - Product: MEC0002
   0.099061     - Serial Number: unknown
   0.099067     - Bus: 002
   0.099073     Trying to match device
   0.099135     Device matches
   0.099540     send_to_all: SETINFO ups.vendorid "0001"
   0.099556     send_to_all: SETINFO ups.productid "0000"
   0.099571     send_to_all: SETINFO device.type "ups"
   0.099581     send_to_all: SETINFO driver.version "2.4.3"
   0.099590     send_to_all: SETINFO driver.version.internal "0.03"
   0.099599     send_to_all: SETINFO driver.name "blazer_usb"
   0.099607     Trying megatec protocol...
   0.099614     send: Q1
   0.311677     send_to_all: SETINFO input.voltage "102.0"
   0.311701     send_to_all: SETINFO input.voltage.fault "0.0"
   0.311713     send_to_all: SETINFO output.voltage "102.0"
   0.311733     send_to_all: SETINFO ups.load "26"
   0.311739     send_to_all: SETINFO input.frequency "60.0"
   0.311745     send_to_all: SETINFO battery.voltage "27.00"
   0.311750     send_to_all: SETINFO ups.temperature "29.0"
   0.311754     send_to_all: SETINFO beeper.status "enabled"
   0.311759     send_to_all: SETINFO ups.type "offline / line interactive"
   0.311764     send_to_all: SETINFO ups.status "OL"
   0.311768     Status read in 1 tries
   0.311772     Supported UPS detected with megatec protocol
   0.311776     send: F
   0.414048     send_to_all: SETINFO input.voltage.nominal "100"
   0.414061     send_to_all: SETINFO input.current.nominal "9.0"
   0.414069     send_to_all: SETINFO battery.voltage.nominal "24.0"
   0.414077     send_to_all: SETINFO input.frequency.nominal "60"
   0.414081     Ratings read in 1 tries
   0.414085     send: I
   0.587668     send_to_all: SETINFO ups.mfr ""
   0.587689     send_to_all: SETINFO ups.model "1500VA"
   0.587696     send_to_all: SETINFO ups.firmware "V2.0"
   0.587701     Vendor information read in 1 tries
   0.587705     Battery runtime will not be calculated (runtimecal not set)
   0.587711     send_to_all: SETINFO ups.delay.start "180"
   0.587716     send_to_all: SETINFO ups.delay.shutdown "30"
   0.587720     send_to_all: ADDCMD beeper.toggle
   0.587724     send_to_all: ADDCMD load.off
   0.587728     send_to_all: ADDCMD load.on
   0.587732     send_to_all: ADDCMD shutdown.return
   0.587735     send_to_all: ADDCMD shutdown.stayoff
   0.587739     send_to_all: ADDCMD shutdown.stop
   0.587743     send_to_all: ADDCMD test.battery.start
   0.587747     send_to_all: ADDCMD test.battery.start.deep
   0.587751     send_to_all: ADDCMD test.battery.start.quick
   0.587755     send_to_all: ADDCMD test.battery.stop
   0.587759     send: Q1
   0.799800     send_to_all: DATAOK
   0.799900     dstate_init: sock /var/run/nut/blazer_usb-soundhouse open on fd 5
   0.799909     send_to_all: SETINFO driver.parameter.pollinterval "2"
   0.799915     send_to_all: SETINFO device.mfr ""
   0.799924     send_to_all: SETINFO device.model "1500VA"
   0.799929     send: Q1
   2.801005     send: Q1
   3.012778     send_to_all: SETINFO ups.load "24"
   4.802906     send: Q1
   6.804868     send: Q1
   7.016922     send_to_all: SETINFO ups.load "23"
   8.805867     send: Q1
  10.807771     send: Q1
  11.020026     send_to_all: SETINFO ups.load "25"
  12.809671     send: Q1
  13.021676     send_to_all: SETINFO ups.load "24"
  14.811572     send: Q1
  15.023592     send_to_all: SETINFO output.voltage "103.0"
  16.813635     send: Q1
  17.025795     send_to_all: SETINFO output.voltage "102.0"
  17.025815     send_to_all: SETINFO ups.load "23"
  18.815537     send: Q1
  20.816866     send: Q1
  22.818749     send: Q1
  23.030774     send_to_all: SETINFO ups.load "25"
  24.820650     send: Q1
  25.032782     send_to_all: SETINFO ups.load "23"
  26.822550     send: Q1
  27.034681     send_to_all: SETINFO output.voltage "103.0"
  28.824496     send: Q1
  29.036370     send_to_all: SETINFO output.voltage "102.0"
  30.826399     send: Q1
  31.038459     send_to_all: SETINFO input.frequency "59.9"
  32.828300     send: Q1
  33.040394     send_to_all: SETINFO input.frequency "60.0"
  34.830200     send: Q1
^C  35.974000   Signal 2: exiting
root@pveserver1:/etc/nut# /etc/init.d/nut start
Starting Network UPS Tools: driver(s) upsd.
root@pveserver1:/etc/nut# upsc soundhouse
battery.voltage: 27.00
battery.voltage.nominal: 24.0
beeper.status: enabled
device.mfr:
device.model: 1500VA
device.type: ups
driver.name: blazer_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 0000
driver.parameter.vendorid: 0001
driver.version: 2.4.3
driver.version.internal: 0.03
input.current.nominal: 9.0
input.frequency: 60.0
input.frequency.nominal: 60
input.voltage: 102.0
input.voltage.fault: 0.0
input.voltage.nominal: 100
output.voltage: 102.0
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware: V2.0
ups.load: 25
ups.mfr:
ups.model: 1500VA
ups.productid: 0000
ups.status: OL
ups.temperature: 29.0
ups.type: offline / line interactive
ups.vendorid: 0001
root@pveserver1:/etc/nut#

vendoeridとproductidを指定しない場合

[soundhouse]
        driver=blazer_usb
        desc="soundhouse ups"
        port=auto
root@pveserver1:/etc/nut# /lib/nut/blazer_usb -DDDDD -a soundhouse
Network UPS Tools - Megatec/Q1 protocol USB driver 0.03 (2.4.3)
   0.000000     send_to_all: SETINFO driver.parameter.port "auto"
   0.000029     debug level is '5'
   0.096966     Checking device (0001/0000) (002/006)
   0.099681     - VendorID: 0001
   0.099698     - ProductID: 0000
   0.099705     - Manufacturer: MEC
   0.099711     - Product: MEC0002
   0.099717     - Serial Number: unknown
   0.099724     - Bus: 002
   0.099730     Trying to match device
   0.099738     Device matches
   0.100088     send_to_all: SETINFO ups.vendorid "0001"
   0.100104     send_to_all: SETINFO ups.productid "0000"
   0.100118     send_to_all: SETINFO device.type "ups"
   0.100128     send_to_all: SETINFO driver.version "2.4.3"
   0.100138     send_to_all: SETINFO driver.version.internal "0.03"
   0.100147     send_to_all: SETINFO driver.name "blazer_usb"
   0.100155     Trying megatec protocol...
   0.100162     send: Q1
   0.312065     send_to_all: SETINFO input.voltage "103.0"
   0.312084     send_to_all: SETINFO input.voltage.fault "0.0"
   0.312097     send_to_all: SETINFO output.voltage "102.0"
   0.312124     send_to_all: SETINFO ups.load "23"
   0.312130     send_to_all: SETINFO input.frequency "60.0"
   0.312136     send_to_all: SETINFO battery.voltage "27.00"
   0.312141     send_to_all: SETINFO ups.temperature "29.0"
   0.312146     send_to_all: SETINFO beeper.status "enabled"
   0.312151     send_to_all: SETINFO ups.type "offline / line interactive"
   0.312156     send_to_all: SETINFO ups.status "OL"
   0.312160     Status read in 1 tries
   0.312163     Supported UPS detected with megatec protocol
   0.312167     send: F
   0.414407     send_to_all: SETINFO input.voltage.nominal "100"
   0.414435     send_to_all: SETINFO input.current.nominal "9.0"
   0.414449     send_to_all: SETINFO battery.voltage.nominal "24.0"
   0.414460     send_to_all: SETINFO input.frequency.nominal "60"
   0.414468     Ratings read in 1 tries
   0.414476     send: I
   0.588424     send_to_all: SETINFO ups.mfr ""
   0.588444     send_to_all: SETINFO ups.model "1500VA"
   0.588454     send_to_all: SETINFO ups.firmware "V2.0"
   0.588461     Vendor information read in 1 tries
   0.588469     Battery runtime will not be calculated (runtimecal not set)
   0.588478     send_to_all: SETINFO ups.delay.start "180"
   0.588487     send_to_all: SETINFO ups.delay.shutdown "30"
   0.588496     send_to_all: ADDCMD beeper.toggle
   0.588504     send_to_all: ADDCMD load.off
   0.588508     send_to_all: ADDCMD load.on
   0.588512     send_to_all: ADDCMD shutdown.return
   0.588516     send_to_all: ADDCMD shutdown.stayoff
   0.588520     send_to_all: ADDCMD shutdown.stop
   0.588523     send_to_all: ADDCMD test.battery.start
   0.588527     send_to_all: ADDCMD test.battery.start.deep
   0.588531     send_to_all: ADDCMD test.battery.start.quick
   0.588535     send_to_all: ADDCMD test.battery.stop
   0.588539     send: Q1
   1.125704     send_to_all: SETINFO input.voltage "102.0"
   1.125733     send_to_all: SETINFO ups.load "25"
   1.125753     send_to_all: DATAOK
   1.125817     dstate_init: sock /var/run/nut/blazer_usb-soundhouse open on fd 5
   1.125824     send_to_all: SETINFO driver.parameter.pollinterval "2"
   1.125830     send_to_all: SETINFO device.mfr ""
   1.125835     send_to_all: SETINFO device.model "1500VA"
   1.125840     send: Q1
   3.127753     send: Q1
   3.339759     send_to_all: SETINFO output.voltage "103.0"
   3.339779     send_to_all: SETINFO ups.load "23"
   5.129650     send: Q1
   5.341674     send_to_all: SETINFO output.voltage "102.0"
^C   7.022719   Signal 2: exiting
root@pveserver1:/etc/nut# /etc/init.d/nut start
Starting Network UPS Tools: driver(s) upsd.
root@pveserver1:/etc/nut# upsc soundhouse
battery.voltage: 27.00
battery.voltage.nominal: 24.0
beeper.status: enabled
device.mfr:
device.model: 1500VA
device.type: ups
driver.name: blazer_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.4.3
driver.version.internal: 0.03
input.current.nominal: 9.0
input.frequency: 60.0
input.frequency.nominal: 60
input.voltage: 102.0
input.voltage.fault: 0.0
input.voltage.nominal: 100
output.voltage: 103.0
ups.delay.shutdown: 30
ups.delay.start: 180
ups.firmware: V2.0
ups.load: 23
ups.mfr:
ups.model: 1500VA
ups.productid: 0000
ups.status: OL
ups.temperature: 29.0
ups.type: offline / line interactive
ups.vendorid: 0001
root@pveserver1:/etc/nut#

「driver=megatec_usb」の場合

[soundhouse]
        driver=megatec_usb
        desc="soundhouse ups"
        port=auto
root@pveserver1:/etc/nut# /lib/nut/megatec_usb -DDDDD -a soundhouse
Network UPS Tools - Megatec protocol driver 1.6 (2.4.3)
Serial-over-USB transport layer 0.10
   0.000000     send_to_all: SETINFO driver.parameter.port "auto"
   0.000033     debug level is '5'
   0.097682     Checking device (0001/0000) (002/006)
   0.100333     - VendorID: 0001
   0.100348     - ProductID: 0000
   0.100356     - Manufacturer: MEC
   0.100364     - Product: MEC0002
   0.100372     - Serial Number: unknown
   0.100378     - Bus: 002
   0.100385     Trying to match device
   0.100395     Device matches
   0.100744     DTR=1, RTS=0
   0.100762     send_to_all: SETINFO device.type "ups"
   0.100772     send_to_all: SETINFO driver.version "2.4.3"
   0.100782     send_to_all: SETINFO driver.version.internal "1.6"
   0.100792     send_to_all: SETINFO driver.name "megatec_usb"
   0.100805     Starting UPS detection process...
   0.100813     Asking for UPS information [I]...
   0.100822     set_data_krauler: index [0c]
   0.574860     I => OK [#                1500VA     V2.0      ]
   0.574883     I VALUES => [ 1500VA V2.0]
   0.574892     Asking for UPS status [Q1]...
   0.574902     set_data_krauler: index [03]
   1.087059     Q1 => OK [(102.0 000.0 102.0 024 60.0 27.0 29.0 00001001]
   1.087112     Q1 VALUES => [102.0 0.0 102.0 24.0 60.0 27.0 29.0 00001001]
   1.087132     send_to_all: SETINFO ups.type "standby"
   1.087140     Cancelling any pending shutdown or battery test.
   1.087149     set_data_krauler: index [0b]
   1.101903     set_data_krauler: retry [UPS No Ack]
   1.101922     Asking for UPS information [I]...
   1.101932     set_data_krauler: index [0c]
   1.575899     I => OK [#                1500VA     V2.0      ]
   1.575920     I VALUES => [ 1500VA V2.0]
   1.575937     send_to_all: SETINFO ups.mfr ""
   1.575949     send_to_all: SETINFO ups.model "1500VA V2.0"
   1.575957     Megatec protocol UPS detected [ 1500VA V2.0].
   1.575967     send_to_all: SETINFO ups.serial "unknown"
   1.575976     Parameter [ignoreoff]: [false]
   1.575983     Asking for UPS power ratings [F]...
   1.575991     set_data_krauler: index [0d]
   1.978545     F => OK [#100.0 9.0 24.00 60.0]
   1.978575     F VALUES => [100.0 9.0 24.0 60.0]
   1.978591     send_to_all: SETINFO battery.voltage.nominal "24.0"
   1.978603     send_to_all: SETINFO input.voltage.nominal "100.0"
   1.978614     send_to_all: SETINFO input.frequency.nominal "60.0"
   1.978625     24.0V battery, interval [19.4V, 27.4V].
   1.978637     send_to_all: SETINFO ups.delay.start "2"
   1.978647     send_to_all: SETINFO ups.delay.shutdown "0"
   1.978656     send_to_all: ADDCMD test.battery.start.deep
   1.978682     send_to_all: ADDCMD test.battery.start
   1.978688     send_to_all: ADDCMD test.battery.stop
   1.978692     send_to_all: ADDCMD shutdown.return
   1.978702     send_to_all: ADDCMD shutdown.stayoff
   1.978707     send_to_all: ADDCMD shutdown.stop
   1.978711     send_to_all: ADDCMD load.on
   1.978715     send_to_all: ADDCMD load.off
   1.978720     send_to_all: ADDCMD reset.input.minmax
   1.978724     send_to_all: ADDCMD reset.watchdog
   1.978728     send_to_all: ADDCMD beeper.toggle
   1.978732     Done setting up the UPS.
   1.978736     Asking for UPS status [Q1]...
   1.978741     set_data_krauler: index [03]
   2.490829     Q1 => OK [(102.0 000.0 102.0 024 60.0 27.0 29.0 00001001]
   2.490862     Q1 VALUES => [102.0 0.0 102.0 24.0 60.0 27.0 29.0 00001001]
   2.490878     send_to_all: SETINFO input.voltage "102.0"
   2.490890     send_to_all: SETINFO input.voltage.fault "0.0"
   2.490901     send_to_all: SETINFO output.voltage "102.0"
   2.490912     send_to_all: SETINFO ups.load "24.0"
   2.490922     send_to_all: SETINFO input.frequency "60.0"
   2.490933     send_to_all: SETINFO battery.voltage "27.00"
   2.490943     send_to_all: SETINFO ups.temperature "29.0"
   2.490954     send_to_all: SETINFO battery.charge "95.0"
   2.490958     Calculated battery charge: 95.0%
   2.490963     send_to_all: SETINFO ups.beeper.status "enabled"
   2.490969     send_to_all: SETINFO input.voltage.minimum "102.0"
   2.490974     send_to_all: SETINFO input.voltage.maximum "102.0"
   2.490979     send_to_all: SETINFO ups.status "OL"
   2.490984     send_to_all: DATAOK
   2.491042     dstate_init: sock /var/run/nut/megatec_usb-soundhouse open on fd 5
   2.491050     send_to_all: SETINFO driver.parameter.pollinterval "2"
   2.491056     send_to_all: SETINFO device.mfr ""
   2.491061     send_to_all: SETINFO device.model "1500VA V2.0"
   2.491066     send_to_all: SETINFO device.serial "unknown"
   2.491070     Asking for UPS status [Q1]...
   2.491075     set_data_krauler: index [03]
   3.003223     Q1 => OK [(102.0 000.0 102.0 023 60.0 27.0 29.0 00001001]
   3.003260     Q1 VALUES => [102.0 0.0 102.0 23.0 60.0 27.0 29.0 00001001]
   3.003281     send_to_all: SETINFO ups.load "23.0"
   3.003297     Calculated battery charge: 95.0%
   4.492690     Asking for UPS status [Q1]...
   4.492720     set_data_krauler: index [03]
   4.818058     set_data_krauler: retry [UPS No Ack]
   5.330364     Q1 => OK [(102.0 000.0 102.0 023 60.0 27.0 29.0 00001001]
   5.330396     Q1 VALUES => [102.0 0.0 102.0 23.0 60.0 27.0 29.0 00001001]
   5.330420     Calculated battery charge: 95.0%
   6.493948     Asking for UPS status [Q1]...
   6.493974     set_data_krauler: index [03]
   7.006249     Q1 => OK [(102.0 000.0 102.0 023 60.0 27.0 29.0 00001001]
   7.006283     Q1 VALUES => [102.0 0.0 102.0 23.0 60.0 27.0 29.0 00001001]
   7.006309     Calculated battery charge: 95.0%
   8.495528     Asking for UPS status [Q1]...
   8.495556     set_data_krauler: index [03]
   9.007946     Q1 => OK [(102.0 000.0 102.0 023 60.0 27.0 29.0 00001001]
   9.007983     Q1 VALUES => [102.0 0.0 102.0 23.0 60.0 27.0 29.0 00001001]
   9.008009     Calculated battery charge: 95.0%
  10.497125     Asking for UPS status [Q1]...
  10.497157     set_data_krauler: index [03]
  11.009336     Q1 => OK [(102.0 000.0 102.0 024 60.0 27.0 29.0 00001001]
  11.009370     Q1 VALUES => [102.0 0.0 102.0 24.0 60.0 27.0 29.0 00001001]
  11.009393     send_to_all: SETINFO ups.load "24.0"
  11.009409     Calculated battery charge: 95.0%
  12.498740     Asking for UPS status [Q1]...
  12.498769     set_data_krauler: index [03]
  13.011033     Q1 => OK [(102.0 000.0 102.0 023 60.0 27.0 29.0 00001001]
  13.011067     Q1 VALUES => [102.0 0.0 102.0 23.0 60.0 27.0 29.0 00001001]
  13.011090     send_to_all: SETINFO ups.load "23.0"
  13.011107     Calculated battery charge: 95.0%
^C  13.582820   Signal 2: exiting
root@pveserver1:/etc/nut# /etc/init.d/nut start
Starting Network UPS Tools:ups driver(s) upsd.
root@pveserver1:/etc/nut# upsc soundhouse
battery.charge: 95.0
battery.voltage: 27.00
battery.voltage.nominal: 24.0
device.mfr:
device.model: 1500VA V2.0
device.serial: unknown
device.type: ups
driver.name: megatec_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.4.3
driver.version.internal: 1.6
input.frequency: 60.0
input.frequency.nominal: 60.0
input.voltage: 102.0
input.voltage.fault: 0.0
input.voltage.maximum: 102.0
input.voltage.minimum: 102.0
input.voltage.nominal: 100.0
output.voltage: 102.0
ups.beeper.status: enabled
ups.delay.shutdown: 0
ups.delay.start: 2
ups.load: 23.0
ups.mfr:
ups.model: 1500VA V2.0
ups.serial: unknown
ups.status: OL
ups.temperature: 29.0
ups.type: standby
root@pveserver1:/etc/nut#

あえて「driver=usbhid-ups」を指定した場合
なお、下記の例ではvendorid=0001とproductid=0000を指定していますが、無くても結果は同じでした。

[soundhouse]
        driver=usbhid-ups
        vendorid=0001
        productid=0000
        desc="soundhouse ups"
        port=auto
root@pveserver1:/etc/nut# /lib/nut/usbhid-ups -DDDDD -a soundhouse
Network UPS Tools - Generic HID driver 0.34 (2.4.3)
USB communication driver 0.31
   0.000000     send_to_all: SETINFO driver.parameter.vendorid "0001"
   0.000020     send_to_all: SETINFO driver.parameter.productid "0000"
   0.000028     send_to_all: SETINFO driver.parameter.port "auto"
   0.000044     debug level is '5'
   0.000385     upsdrv_initups...
   0.097071     Checking device (0001/0000) (002/006)
   0.099852     - VendorID: 0001
   0.099867     - ProductID: 0000
   0.099875     - Manufacturer: MEC
   0.099882     - Product: MEC0002
   0.099888     - Serial Number: unknown
   0.099895     - Bus: 002
   0.099901     Trying to match device
   0.099926     Device does not match - skipping
   0.099942     Checking device (0424/2514) (002/004)
   0.099961     - VendorID: 0424
   0.099965     - ProductID: 2514
   0.099969     - Manufacturer: unknown
   0.099972     - Product: unknown
   0.099975     - Serial Number: unknown
   0.099978     - Bus: 002
   0.099981     Trying to match device
   0.099985     Device does not match - skipping
   0.099990     Checking device (8087/0020) (002/002)
   0.099999     - VendorID: 8087
   0.100002     - ProductID: 0020
   0.100005     - Manufacturer: unknown
   0.100009     - Product: unknown
   0.100012     - Serial Number: unknown
   0.100015     - Bus: 002
   0.100018     Trying to match device
   0.100021     Device does not match - skipping
   0.100026     Checking device (1D6B/0002) (002/001)
   0.100045     - VendorID: 1d6b
   0.100049     - ProductID: 0002
   0.100052     - Manufacturer: unknown
   0.100055     - Product: unknown
   0.100058     - Serial Number: unknown
   0.100062     - Bus: 002
   0.100065     Trying to match device
   0.100068     Device does not match - skipping
   0.100073     Checking device (8087/0020) (001/002)
   0.100082     - VendorID: 8087
   0.100086     - ProductID: 0020
   0.100089     - Manufacturer: unknown
   0.100092     - Product: unknown
   0.100095     - Serial Number: unknown
   0.100098     - Bus: 001
   0.100101     Trying to match device
   0.100104     Device does not match - skipping
   0.100109     Checking device (1D6B/0002) (001/001)
   0.100119     - VendorID: 1d6b
   0.100123     - ProductID: 0002
   0.100126     - Manufacturer: unknown
   0.100129     - Product: unknown
   0.100133     - Serial Number: unknown
   0.100136     - Bus: 001
   0.100139     Trying to match device
   0.100142     Device does not match - skipping
   0.100148     No appropriate HID device found
   0.100153     No matching HID UPS found
root@pveserver1:/etc/nut#

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください