I have a UPS unit attached to the D-Link 320 ShareCenter, a SOHO 2-bay NAS. I set up the UPS in Master Mode. Unfortunately it doesn't supply any information, so I had to literally connect to port using nc to port 3493 and issue some commands to get the proper UPS name.
After that I was able to extract the following information:
root@galois:~# upsc megatec@192.168.3.6
battery.charge: 100
battery.voltage: 13.70
battery.voltage.high: 13.00
battery.voltage.low: 10.40
battery.voltage.nominal: 12.0
device.type: ups
driver.name: blazer_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.4
driver.version.internal: 0.08
input.current.nominal: 2.0
input.frequency: 50.1
input.frequency.nominal: 50
input.voltage: 224.4
input.voltage.fault: 224.4
input.voltage.nominal: 230
output.voltage: 224.4
ups.beeper.status: enabled
ups.delay.shutdown: 30
ups.delay.start: 180
ups.load: 6
ups.productid: 5161
ups.status: OL
ups.type: offline / line interactive
ups.vendorid: 0665
Then I tried to setup upsmon.conf in order to monitor the UPS from my Linux host (hostname galois).
grep -v "#" /etc/nut/upsmon.conf |sort
DEADTIME 15
FINALDELAY 5
HOSTSYNC 15
MINSUPPLIES 1
MONITOR megatec@192.168.3.6 1 admin <admin-pass> slave
NOCOMMWARNTIME 300
POLLFREQ 5
POLLFREQALERT 5
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
SHUTDOWNCMD "/sbin/shutdown -h +0"
That's pretty much the default configuration for slaves. When I start the service I get the following "ACCESS-DENIED" logs:
root@galois:~# service ups-monitor start
[ ok ] Starting NUT - power device monitor and shutdown controller: nut-client.
root@galois:~# tail -n 2 /var/log/syslog
Sep 23 19:12:03 galois upsmon[3997]: Startup successful
Sep 23 19:12:03 galois upsmon[3999]: Login on UPS [megatec@192.168.3.6] failed - got [ERR ACCESS-DENIED]
I am sure that I don't need user/password lines in the upsmon line. But I didn't find any way to probe without issuing user and password. Unfortunately nut-scanner is not in the pre-compiled package and I'm at loss.
Any ideas on how to proceed? The manual of the NAS and their website has no information on how to setup slaves whatsoever.
Thanks