Re: NUT UPS monitor & APC Back UPS CS-350 (nut-2.2.2p1)

2009-10-08 Thread Fred Crowson
On 10/7/09, Brynet  wrote:

> Also, if this program supports serial UPS devices.. and if it happened
> to attach as a ucom(4) device.. the proper device node would be
> /dev/cuaU0 not /dev/ttyU0.
>
> See tty(4) and ucom(4) for more info.

Thanks for the correction - it should have been the calling unit cua*

Fred



Re: NUT UPS monitor & APC Back UPS CS-350 (nut-2.2.2p1)

2009-10-08 Thread Vijay Sankar

Zbigniew wrote:

Hallo,

Following the tips found at https://calomel.org/nut_ups.html I was trying to
make NUT operate "APC Back UPS CS-350". The device introduces itself as:

#v+
  ugen0 at uhub0 port 1 "American Power Conversion Back-UPS CS 350 FW:807.q7.I
  USB FW:q7" rev 1.10/0.06 addr 2
#v-


My config:

#v+
[apc]
driver = usbhid-ups 
port = /dev/ugen0.00

pollfreq = 60
desc = "Back UPS CS-350"
#v-


Unfortunately, when I'm trying to start UPS driver, it's complaining:

#v+
  # usbhid-ups -a apc 
  Network UPS Tools: 0.29 USB communication driver - core 0.33 (2.2.2)


  No matching HID UPS found
#v-

It seems, it doesn't recognize(?) that particular UPS.

So my only option for today is to try to compile and use apcupsd, right? - or
perhaps someone can make a tip, how can I fix that lack of "matching HID UPS"?


Hopefully the following is helpful. I am running 4.4 -stable/i386 on 
this system.


dmesg snippet below:

ugen0 at uhub3 port 2 "American Power Conversion Back-UPS LS 700
FW:19.b6 .D USB FW:b6" rev 1.10/1.06 addr 2

pkg_info below:

apc-upsd-19991128p0 UPS software for APC UPS models
nut-2.2.1p0 UPS monitoring program supporting many brands

Here is my /etc/rc.local entry for the UPS

if [ -x /usr/local/bin/upsdrvctl ]; then
echo -n ' nut'
/usr/local/bin/upsdrvctl start > /dev/null 2>&1
/usr/local/sbin/upsd > /dev/null 2>&1
/usr/local/sbin/upsmon > /dev/null 2>&1
fi

Here is my config file for the UPS daemon

#
#   apc-upsd.conf
#

# ups is connected to ...
# OpenBSD ... device /dev/tty00

device /dev/tty00

#
# startuptest sends a 'test' sequence to the smart series
#

startuptest ON

# debug ON|OFF
#
# OFF ... normal operation
# ON  don't start as daemon, do tests in smart mode

debugmode OFF

# smartmode
# ON .. APC Smart-UPS with black cable
# OFF . APC BackUPS with gray cable

smartmode ON

#
# extendedsmart
#
# gives temperature info etc ..
#

extendedsmart ON

# time till shutdown in seconds

time 15

# execute this at shutdown time

execute /sbin/halt

# pidfile

pidfile /var/run/upsd.pid

# every (n) seconds output information from the ups
# to syslog

infotime 3600


I get the following output with upsc a...@localhost:

battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2008/02/22
battery.mfr.date: 2008/02/22
battery.runtime: 3232
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 13.8
battery.voltage.nominal: 12.0
driver.name: usbhid-ups
driver.parameter.pollfreq: 60
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/usb3
driver.version:
driver.version.data: APC HID 0.92
driver.version.internal: 0.32
input.transfer.high: 133
input.transfer.low: 106
input.voltage: 118.0
input.voltage.nominal: 120
ups.beeper.status: enabled
ups.delay.shutdown: -1
ups.firmware: 19.b6 .D
ups.firmware.aux: b6
ups.load: 15
ups.mfr: American Power Conversion
ups.mfr.date: 2008/02/22
ups.model: Back-UPS LS 700
ups.productid: 0002
ups.serial: 3B0720X63023
ups.status: OL
ups.test.result: No test initiated
ups.vendorid: 051d


Vijay

--
Vijay Sankar, M.Eng., P.Eng.
ForeTell Technologies Limited
59 Flamingo Avenue, Winnipeg, MB, Canada R3J 0X6
Phone: (204) 885-9535, E-Mail: vsan...@foretell.ca



Re: NUT UPS monitor & APC Back UPS CS-350 (nut-2.2.2p1)

2009-10-07 Thread Brynet
Fred Crowson wrote:
> Your port looks incorrect for OpenBSD.
>
> It should look like:  /dev/ttyU0
>
> see: tty(4) for more info
>
> Fred

Hi Fred,

His device does not attach as a ucom(4), it instead is attaching as a
ugen(4) device.. software can use the libusb port to access devices
that do not have a kernel driver.

Also, if this program supports serial UPS devices.. and if it happened
to attach as a ucom(4) device.. the proper device node would be
/dev/cuaU0 not /dev/ttyU0.

See tty(4) and ucom(4) for more info.

Note; he's moved on to something else..
http://marc.info/?l=openbsd-misc&m=125484508731563&w=2

-Brynet



Re: NUT UPS monitor & APC Back UPS CS-350 (nut-2.2.2p1)

2009-10-07 Thread Fred Crowson
On 10/6/09, Zbigniew  wrote:
> Hallo,
>
> Following the tips found at https://calomel.org/nut_ups.html I was trying to
> make NUT operate "APC Back UPS CS-350". The device introduces itself as:
>
> #v+
>   ugen0 at uhub0 port 1 "American Power Conversion Back-UPS CS 350
> FW:807.q7.I
>   USB FW:q7" rev 1.10/0.06 addr 2
> #v-
>
>
> My config:
>
> #v+
> [apc]
> driver = usbhid-ups
> port = /dev/ugen0.00
> pollfreq = 60
> desc = "Back UPS CS-350"
> #v-

Your port looks incorrect for OpenBSD.

It should look like:  /dev/ttyU0

see: tty(4) for more info

Fred



NUT UPS monitor & APC Back UPS CS-350 (nut-2.2.2p1)

2009-10-06 Thread Zbigniew
Hallo,

Following the tips found at https://calomel.org/nut_ups.html I was trying to
make NUT operate "APC Back UPS CS-350". The device introduces itself as:

#v+
  ugen0 at uhub0 port 1 "American Power Conversion Back-UPS CS 350 FW:807.q7.I
  USB FW:q7" rev 1.10/0.06 addr 2
#v-


My config:

#v+
[apc]
driver = usbhid-ups 
port = /dev/ugen0.00
pollfreq = 60
desc = "Back UPS CS-350"
#v-


Unfortunately, when I'm trying to start UPS driver, it's complaining:

#v+
  # usbhid-ups -a apc 
  Network UPS Tools: 0.29 USB communication driver - core 0.33 (2.2.2)

  No matching HID UPS found
#v-

It seems, it doesn't recognize(?) that particular UPS.

So my only option for today is to try to compile and use apcupsd, right? - or
perhaps someone can make a tip, how can I fix that lack of "matching HID UPS"?
-- 
regards,
Zbigniew