Koozali.org: home of the SME Server

USB APC --- APCUPSD setup

Texasboy

USB APC --- APCUPSD setup
« on: January 29, 2005, 04:54:30 AM »
I have loaded apcupsd on my 6.5 beta server and I can't get it to recognize the right usb port. I can see and configure the APC in the server-manager and then I login as root and execute apcupsd I get the error "Cannot open UPS **** No such file or directory". I can see the APC under proc/bus/usb and I can "dmesg" and see it as hiddev0 and that it is on usb1. Anybody have any suggestions???

Thanks

Texasboy

P.S. I did try setting the device to hiddev [0-15] per apcupsd's web sit manual

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: USB APC --- APCUPSD setup
« Reply #1 on: January 29, 2005, 08:57:05 PM »
Quote from: "Texasboy"
I have loaded apcupsd on my 6.5 beta server ...


You didn't need to do that. nutUPS is already installed, and already supports USB APC UPSs. All you need to do is enable it.

/sbin/e-smith/config setprop nut status enabled
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot

Offline dilligaf

  • *
  • 266
  • +0/-0
    • http://www.willcraft.com
Re: USB APC --- APCUPSD setup
« Reply #2 on: April 14, 2005, 02:11:41 AM »
Quote from: "CharlieBrady"
Quote from: "Texasboy"
I have loaded apcupsd on my 6.5 beta server ...


You didn't need to do that. nutUPS is already installed, and already supports USB APC UPSs. All you need to do is enable it.

/sbin/e-smith/config setprop nut status enabled
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot


I just did exactly that , but where do you configure it? I just did a man nut and it says there are no man pages.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: USB APC --- APCUPSD setup
« Reply #3 on: April 14, 2005, 02:38:04 AM »
Quote from: "dilligaf"

... but where do you configure it?


You don't. It should "just work". And if it doesn't, it won't - you'll need a newer version of nutUPS, or a different program.

Quote

I just did a man nut and it says there are no man pages.


http://www.networkupstools.org/

Offline dilligaf

  • *
  • 266
  • +0/-0
    • http://www.willcraft.com
Re: USB APC --- APCUPSD setup
« Reply #4 on: April 14, 2005, 05:05:26 AM »
Quote from: "CharlieBrady"
Quote from: "dilligaf"

... but where do you configure it?


You don't. It should "just work". And if it doesn't, it won't - you'll need a newer version of nutUPS, or a different program.

Quote

I just did a man nut and it says there are no man pages.


http://www.networkupstools.org/


Thanks Charlie,
I have the nut-1.2.0-1ES3 and a apc ups bk350
When you say you don't configure it, it should just work,
What do you do to test, just unplug the UPS?
Is there a log file that shows if it is detected?
Thanks

Offline Knuddi

  • *
  • 540
  • +0/-0
    • http://www.scanmailx.com
USB APC --- APCUPSD setup
« Reply #5 on: April 18, 2005, 08:15:04 PM »
I have a 1500VA UPS and a UPS master (CentOS4) that is connected to multiple networked clients (among others SME servers). Does the pre-installed NUT support being a networked client?

mbachmann

USB APC --- APCUPSD setup
« Reply #6 on: April 26, 2005, 12:10:50 PM »
In the way that the UPS powered network client sends a reboot signal to the other servers if power fails, without the UPS being connected to every network client?

jamesli

USB APC --- APCUPSD setup
« Reply #7 on: April 26, 2005, 10:48:31 PM »
DMay's apcupsd only support serial port ups, the built-in NUT did work with USB APC UPS. It will detect the UPS and there will be some entries in the log to show it. To test it throughly, you can put your SME to the wall power instead of the UPS, plug the UPS usb in the server, disconnect the UPS from wall power, and run out of the battery of the UPS by using a 100watt lightbulb or something like that. When the power on the UPS nearly run out, it will sent a signal to the SME to shut it down.

Offline psoren

  • *
  • 371
  • +0/-0
Re: USB APC --- APCUPSD setup
« Reply #8 on: April 26, 2005, 11:58:45 PM »
To see the current status of your UPS, you can go to the command line and type "upsc UPS@localhost" It will then give something like this:

UPS: UPS@localhost
MFR: Generic
MODEL: Back-UPS CS 500 FW:808.q5.I USB
SERIAL: BB0435018598
STATUS: OL
BATTVOLT: 13.5
BATTPCT: 100
RUNTIME: 1972
LOADPCT: 210

Per

policymap

Re: USB APC --- APCUPSD setup
« Reply #9 on: July 07, 2005, 12:32:04 AM »
Knuddi, did you find any soloution on having sme's as networked clients?

VJ

Offline Knuddi

  • *
  • 540
  • +0/-0
    • http://www.scanmailx.com
USB APC --- APCUPSD setup
« Reply #10 on: July 08, 2005, 11:04:42 PM »
Actually I downloaded  the apcupsd RPM f or Redhat 7. 3 and used that. This works for me .

/Jesper

policymap

USB APC --- APCUPSD setup
« Reply #11 on: July 09, 2005, 12:45:49 AM »
thanks Knuddi, I will give this a try too :-)

VJ

johnjdoe

USB APC --- APCUPSD setup
« Reply #12 on: November 30, 2005, 02:51:12 PM »
Hi,

I have an APC UPS connected by serial port and then executed:


/sbin/e-smith/config setprop nut status enabled
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot

as described above.

After a reboot, I typed "upsc UPS@localhost" to see the configuration. It appeared "UPS UPS@localhost is unavailable" and since there this appears allways on the console.

Could you please tell me if I did a mistake, if the connection to the UPS works fine (if not, how I could make it work) and how I could disable this message?

Thank you in advance for each help!

Offline raem

  • *
  • 3,972
  • +4/-0
USB APC --- APCUPSD setup
« Reply #13 on: December 01, 2005, 12:20:34 AM »
johnjdoe & others

> I have an APC UPS connected by serial port...

As you have a serial port APC UPS, then you could use the dmay apcupsd contrib. It adds a nice server manager panel to configure it.

As an additional answer to earlier questions:

You can also run the Windows version of apcupsd on networked Windows boxes, to have a master slave arrangement ie the sme server is master which  directly connects to and controls/is controlled by the UPS via serial cable.
Other Windows boxes running off the same UPS supply are configured as slaves. In the event that power fails and the UPS eventually sends a shutdown signal to the sme apcupsd Master, then all Windows boxes will be signalled via the network cable to shutdown automatically as well.

You should read the APC documentation carefully and slowly if you want to configure your network this way, but it is all straightforward to configure.

I don't know if NUT has this master slave capability.
...

johnjdoe

USB APC --- APCUPSD setup
« Reply #14 on: December 02, 2005, 11:19:05 AM »
Quote from: "RayMitchell"

As you have a serial port APC UPS, then you could use the dmay apcupsd contrib. It adds a nice server manager panel to configure it.


Thank you, I'll test this contrib.

But could somebody tell how to disable/stop the other thing that I enabled with

/sbin/e-smith/config setprop nut status enabled
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot

and what's allways creating the broadcast on the console?

Thank you!

Offline raem

  • *
  • 3,972
  • +4/-0
USB APC --- APCUPSD setup
« Reply #15 on: December 03, 2005, 07:08:44 PM »
johnjdoe

> But could somebody tell how to disable....

I would have thought that was obvious.....

/sbin/e-smith/config setprop nut status disabled
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot
...

johnjdoe

USB APC --- APCUPSD setup
« Reply #16 on: December 05, 2005, 09:44:51 AM »
Quote from: "RayMitchell"
johnjdoe

> But could somebody tell how to disable....

I would have thought that was obvious.....

/sbin/e-smith/config setprop nut status disabled
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot


Thanks, RayMitchell!

Offline f2racer

  • 9
  • +0/-0
    • http://www.tedshouse.com
USB APC --- APCUPSD setup
« Reply #17 on: February 06, 2006, 05:16:22 PM »
Anybody have a USB UPS that disappears?  I bought an APC ES500VA a couple of months ago and I've noticed that after 20+ days or so, my SME server looses it's connection to the UPS (which is connected through the USB port) and the box gracefully shuts down.  Whey I restart the SME server, it doesn't "see" the UPS unless I disconnect/reconnect the cable going into the UPS prior to startup.  Does anybody have similar problems?  Is this a problem with the UPS or cable?

Thanks!

Offline Knuddi

  • *
  • 540
  • +0/-0
    • http://www.scanmailx.com
USB APC --- APCUPSD setup
« Reply #18 on: July 18, 2006, 09:03:26 PM »
Now I am back with the same request for SME7 - I need a networked system for my UPS. I have a master which has the physical connection to the UPS (RS-232) and slaves connected via Ethernet. All are naturally powered through the UPS.

I cannot see that NUT can do this job and for SME6 I used the apcupsd with great success. I started downloading the apcupsd package for RHEL4 and found out that SME7 doesn't come wiith the gd package......

Any good suggestions?

Offline mdo

  • *
  • 355
  • +0/-0
USB APC --- APCUPSD setup
« Reply #19 on: July 19, 2006, 06:58:52 AM »
Quote
I cannot see that NUT can do this job


Jesper,
I think Nut can do this. I have tested the following scenario:

Nut on SME7, monitoring a UPS via serial cable. I then installed "WinNUT" on another (Windows XP) machine and WinNUT is talking to NUT on SME nicely via LAN. I believe what WinNUT is doing should also be working with another NUT installation (on Linux, Unix, etc.).

We used APCupsd previously on all SME installations and found it excellent - but unfortunately it limits us to use APC upses only and NUT is much wider to be used with different UPS brands. So far, NUT seems to do it's monitoring job OK and has done already controlled shutdowns which is its main task from my point of view. There is (by default) no such nice status monitoring via web access as APCupsd provided.
Michael
...

Offline raem

  • *
  • 3,972
  • +4/-0
USB APC --- APCUPSD setup
« Reply #20 on: July 19, 2006, 10:11:10 AM »
mdo

Thanks, didn't know there was WinNUT

see
http://csociety.ecn.purdue.edu/~delpha/winnut/

and for general details on NUT
see
http://www.networkupstools.org/features/
...

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
USB APC --- APCUPSD setup
« Reply #21 on: September 06, 2006, 12:29:58 AM »
APC Support is superb. I told them I was running Linux and that the box did not have USB. They sent me out a serial lead free of charge !!!

Top service !
"If you don't know what you want, you end up with a lot you don't."

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
USB APC --- APCUPSD setup
« Reply #22 on: September 06, 2006, 12:33:48 AM »
I have 2 x SME 7.0 + servers. 1 has UPS serial lead. I need it to tell the other when to shutdown. Can NUT do this and if so how ? Many Thanks.
"If you don't know what you want, you end up with a lot you don't."

Offline lightman

  • ***
  • 75
  • +0/-0
USB APC --- APCUPSD setup
« Reply #23 on: October 19, 2006, 06:27:18 PM »
Hi

I just saw this thread, I need to buy a cheap UPS and I found the APC BK500ei which is cheap enough, however it has USB interface, however they said that is SERIAL/USB interface but couldn't find anything about the serial side.

anyone know this?, does it really has, at least simple signalling on it?

After reading this thread I'm afraid about the problems of the nut with the USB based UPS's but i have no choice since the only UPS that I can find serial are the SMART ones that cost a fortune!.

I was so happy with powstatd and simple signalling UPS :(

is there is some solution, very simple, like powstatd for USB UPS's that really works good?.

that thing about disconnecting after 20 days is so typical of the USB, maybe manufacturers are pushing the USB too much, and it's still in it's infancy (IMHO).

thanks
lightman

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
USB APC --- APCUPSD setup
« Reply #24 on: February 05, 2007, 11:58:11 AM »
Just to confirm today (05/02/07 UK) I setup an APC 350 BackUPS CS

(It didnt cost a fortune :)

The serial cable that APC sent out (free) is marked up 940-0128A
The closest driver match was genericups=12

[http://www.networkupstools.org/compat/stable.html]

This is what I did (as per other posts)


config setprop nut Device /dev/ttyS0
config setprop nut Model genericups
config setprop nut status enabled
genericups -x upstype=12 /dev/ttyS0

expand-template /etc/sysconfig/ups
expand-template /etc/ups/ups.conf
expand-template /etc/ups/upssched.conf
expand-template /etc/ups/upsmon.conf
expand-template /etc/ups/upsd.users
expand-template /etc/ups/upsd.conf

config show nut
svc -t /var/service/nut restart

upsc UPS@localhost

outputs :-

driver.name: genericups
driver.parameter.upstype: 12
driver.version: 2.0.4
driver.version.internal: 1.32
ups.mfr: APC
ups.model: Back-UPS Office
ups.status: OL

LOL - Does Status OL mean OFF Line or ON Line ?
"If you don't know what you want, you end up with a lot you don't."

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
USB APC --- APCUPSD setup
« Reply #25 on: February 05, 2007, 01:46:13 PM »
Quote from: "gbentley"

genericups -x upstype=12 /dev/ttyS0

Interesting.

Quote from: "gbentley"

ups.status: OL

LOL - Does Status OL mean OFF Line or ON Line ?


For me, genericups type 4 OL means On Line.

Have you rebooted since you set it up. Interesting to see if type 12 remains after you do.
Some info.
Regards,
William

IF I give advise.. It's only if it was me....

Offline psoren

  • *
  • 371
  • +0/-0
USB APC --- APCUPSD setup
« Reply #26 on: February 05, 2007, 01:47:26 PM »
Quote from: "gbentley"


LOL - Does Status OL mean OFF Line or ON Line ?


Yes that means online.
But i have a Back-UPS CS 500 and that gives me a lot more output. As far as i remeber i only enabled Nut. My cable is also a USB.
Here is my output:

[root@perserver ~]# upsc UPS@localhost
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2004/08/25
battery.mfr.date: 2004/08/25
battery.runtime: 1852
battery.runtime.low: 120
battery.temperature: 28
battery.type: PbAc
battery.voltage: 13.5
battery.voltage.nominal: 12.0
driver.name: newhidups
driver.parameter.port: /var/lib/ups/hiddev0
driver.version: 2.0.4
driver.version.data: APC/CyberPower HID 0.9
driver.version.internal: 0.28
input.voltage: 228.0
input.voltage.nominal: 230
output.voltage: 230.0
output.voltage.target.line: 230.0
ups.beeper.status: enabled
ups.delay.shutdown: -1
ups.firmware: 808.q5.I
ups.firmware.aux: q5
ups.load: 19.0
ups.mfr: American Power Conversion
ups.mfr.date: 2004/08/25
ups.model: Back-UPS CS 500
ups.serial: BB0435018598
ups.status: OL
ups.test.result: No test initiated

Per

Offline gbentley

  • ****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
USB APC --- APCUPSD setup
« Reply #27 on: February 05, 2007, 04:08:28 PM »
Will,

This is what I did ;

mkdir /etc/e-smith/templates-custom/etc/ups
mkdir /etc/e-smith/templates-custom/etc/ups/ups.conf
touch /etc/e-smith/templates-custom/etc/ups/ups.conf/upstype
vi /etc/e-smith/templates-custom/etc/ups/ups.conf/upstype

--- edit ---

{
my $upstype = 12;
$OUT .= "\tupstype = $upstype\n";
}

--- save quit---

expand-template /etc/ups/ups.conf
cat /etc/ups/ups.conf

[UPS]
        driver = genericups
        port = /dev/ttyS0

        upstype = 12


[Not sure where the extra blank line comes from?]

Anyway, then I rebooted and tested with ;

upsc UPS@localhost

and was greeted with ;

driver.name: genericups
driver.parameter.port: /dev/ttyS0
driver.parameter.upstype: 12
driver.version: 2.0.4
driver.version.internal: 1.32
ups.mfr: APC
ups.model: Back-UPS Office
ups.status: OL


Hope I did ok ?
"If you don't know what you want, you end up with a lot you don't."

Offline ntblade

  • *
  • 252
  • +0/-0
USB APC --- APCUPSD setup
« Reply #28 on: March 13, 2007, 08:57:06 PM »
Hi,

What is the recommended / easiest software to install to work with an APC Smart-UPS and where do I find it?

The one I have has both USB and serial connectors, it's recognised when connected via USB :) :
Code: [Select]
# lsusb
Bus 005 Device 002: ID 051d:0002 American Power Conversion Back-UPS Pro 500/1000/1500

Thanks

N

Offline raem

  • *
  • 3,972
  • +4/-0
USB APC --- APCUPSD setup
« Reply #29 on: March 15, 2007, 03:58:48 AM »
ntblade

Search forums on NUT, it's already installed
...