[SOLVED] apcupsd settings for APC SC-1000 UPS


Recommended Posts

Hello!

 

I finally got around to hooking up my new APC SC-1000 UPS, and I can't seem to get apcupsd to work with it.

 

It came with 2 cables. One is a serial connection on the UPS side, and a USB connection on the unRaid side, while the other is Serial on both.

 

The old UPS was RJ6 (or something like it) on the UPS side, and USB on the unRaid side. In the unMenu interface, I had "Use serial port" set to "NO", and "Cable Type" set to "Smart". These settings don't seem to work for the new UPS, and I tried pretty much every combination possible.

 

I've been trying with the Serial/USB cable.

 

This is the error I'm getting:

 

Error contacting host localhost port 3551: Connection refused

 

Also, the only thing I haven't tried is rebooting between setting changes. Is that required?

 

Thanks for any advice!

Link to comment

So still struggling with this. Tried rebooting, didn't seem to help.

 

I did some web-research and found some potentially useful info... Just not sure how to apply to unRaid in particular:

 

http://www.readynas.com/forum/viewtopic.php?f=11&t=25149

 

or

 

http://ubuntuforums.org/showthread.php?t=908274

 

Anyone see anything useful in these links to allow my SC1000 to connect to unRaid?

 

Thanks!

Link to comment

So still struggling with this. Tried rebooting, didn't seem to help.

 

I did some web-research and found some potentially useful info... Just not sure how to apply to unRaid in particular:

 

http://www.readynas.com/forum/viewtopic.php?f=11&t=25149

 

or

 

http://ubuntuforums.org/showthread.php?t=908274

 

Anyone see anything useful in these links to allow my SC1000 to connect to unRaid?

 

Thanks!

I guess the first thing to do is to see what message occurs in the syslog when you plug the USB cable into the unRAID server. (if any)

 

Also.. which version of unRAID are you using?  The USB port option is not possible with older versions of unRAID.

Link to comment

Ok!

 

So, I rebooted the server, then unplugged and re-plugged the usb cable, and this is what showed in the sys log for the 2 events:

 

Apr  5 18:10:44 Tower apcupsd[1982]: apcupsd FATAL ERROR in linux-usb.c at line 609 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see . 
Apr  5 18:10:44 Tower apcupsd[1982]: apcupsd error shutdown completed

Apr  5 18:12:39 Tower kernel: usb 3-1: USB disconnect, address 2
Apr  5 18:12:41 Tower kernel: usb 3-1: new full speed USB device using ohci_hcd and address 3
Apr  5 18:12:41 Tower kernel: usb 3-1: configuration #1 chosen from 1 choice

 

Not sure if that really helps much though :(. I guess it shows it is sensing the usb port...

 

Link to comment

So any ideas, folks? I'm at a loss :(.

 

Unfortunately, my plan on using the other serial/serial cable is currently a no go. Turns out I have a serial port header on my board, but no actual serial port  >:(. I think I must have thrown out a dozen serial port cables/cards over the last few years, figuring I'd never use one of them again! Looks like I may be buying one if I can't get this usb/serial port cable working....

 

Sigh!

Link to comment

So any ideas, folks? I'm at a loss :(.

 

Unfortunately, my plan on using the other serial/serial cable is currently a no go. Turns out I have a serial port header on my board, but no actual serial port  >:(. I think I must have thrown out a dozen serial port cables/cards over the last few years, figuring I'd never use one of them again! Looks like I may be buying one if I can't get this usb/serial port cable working....

 

Sigh!

Yes, I do have an idea, or at least something you can try based on the second link in your previous post.

 

First, you may need to create the "device" entry for the USBserial device.  You only need one, so type:

mknod /dev/ttyUSB0 c 188 0

 

(that line will be needed to be added to your "go" script if this works, but you can do it on the command line for this test.)

 

next, unplug and then re-plug the USB cord from the UPS.  You might see something like this in the syslog:

[178959.511262] pl2303 5-2:1.0: pl2303 converter detected

[178959.511351] usb 5-2: pl2303 converter now attached to ttyUSB0

(this assumes the USB-serial driver is in the unRAID kernel.  We'll just have to see if it is)

 

If that works, change the prompt for "Use Serial Port" on the apcupsd package to:

/dev/ttyUSB0

save the settings for the package and re-install it with the new settings.

 

Joe L.

Link to comment

Yes, I do have an idea, or at least something you can try based on the second link in your previous post.

 

First, you may need to create the "device" entry for the USBserial device.   You only need one, so type:

mknod /dev/ttyUSB0 c 188 0

 

(that line will be needed to be added to your "go" script if this works, but you can do it on the command line for this test.)

 

next, unplug and then re-plug the USB cord from the UPS.   You might see something like this in the syslog:

[178959.511262] pl2303 5-2:1.0: pl2303 converter detected

[178959.511351] usb 5-2: pl2303 converter now attached to ttyUSB0

(this assumes the USB-serial driver is in the unRAID kernel.  We'll just have to see if it is)

 

If that works, change the prompt for "Use Serial Port" on the apcupsd package to:

/dev/ttyUSB0

save the settings for the package and re-install it with the new settings.

 

Joe L.

 

You Sir, are a scholar and a gentleman! I will try this as soon as I get home tonight! :)

Link to comment

Hi Joe,

 

So I followed the steps, as outlined, but receive no new message in my syslog. I typed in "mknod /dev/ttyUSB0 c 188 0", unplugged, and replugged usb cable, and this is the message outputted in the log (I also tried plugging into same usb port and then different usb port):

 

Apr  7 23:39:30 Tower kernel: usb 3-2: USB disconnect, address 2 (Drive related)
Apr  7 23:39:33 Tower kernel: usb 3-1: new full speed USB device using ohci_hcd and address 3 (Drive related)
Apr  7 23:39:33 Tower kernel: usb 3-1: configuration #1 chosen from 1 choice (Drive related)

 

No change in status. I'm still getting "Error contacting host localhost port 3551: Connection refused" when trying to see UPS sysinfo.

 

I tried a fresh reboot, and the connection error has changed slightly in the syslog

Apr  7 23:30:15 Tower apcupsd[1920]: apcupsd FATAL ERROR in smartsetup.c at line 58 Cannot open UPS port /dev/ttyUSB0: No such file or directory  (Errors)
Apr  7 23:30:15 Tower apcupsd[1920]: apcupsd error shutdown completed (Errors)

 

What else would you like me to try? :)

Link to comment

Hi Joe,

 

So I followed the steps, as outlined, but receive no new message in my syslog. I typed in "mknod /dev/ttyUSB0 c 188 0", unplugged, and replugged usb cable, and this is the message outputted in the log (I also tried plugging into same usb port and then different usb port):

 

Apr  7 23:39:30 Tower kernel: usb 3-2: USB disconnect, address 2 (Drive related)
Apr  7 23:39:33 Tower kernel: usb 3-1: new full speed USB device using ohci_hcd and address 3 (Drive related)
Apr  7 23:39:33 Tower kernel: usb 3-1: configuration #1 chosen from 1 choice (Drive related)

 

No change in status. I'm still getting "Error contacting host localhost port 3551: Connection refused" when trying to see UPS sysinfo.

 

I tried a fresh reboot, and the connection error has changed slightly in the syslog

Apr  7 23:30:15 Tower apcupsd[1920]: apcupsd FATAL ERROR in smartsetup.c at line 58 Cannot open UPS port /dev/ttyUSB0: No such file or directory  (Errors)
Apr  7 23:30:15 Tower apcupsd[1920]: apcupsd error shutdown completed (Errors)

 

What else would you like me to try? :)

did you add the line to create the device node to your "go" script before rebooting?  It should be above the line that looks for all the .auto_install files, otherwise it will not be present when the apcupsd program looks for it.
Link to comment

did you add the line to create the device node to your "go" script before rebooting?  It should be above the line that looks for all the .auto_install files, otherwise it will not be present when the apcupsd program looks for it.

 

I did not :(. I typed it in from putty before I rebooted, and again once it rebooted. I'll pop it in the go script above the .auto_install files and try another reboot.

 

As an aside, I'm surprised that I haven't seen anyone else trying to get this unit working with unRaid. I would have assumed that a lot more people are using the sc-1000, seeing as how it's the least expensive of the rack mountable APC UPSes. I wonder if everyone is just using the serial to serial cable to connect instead of the serial to usb cable...

Link to comment

Hi Joe,

 

So I went home at lunch and put it in the Go Script above the auto line, and rebooted, but no change... I still got the same error in the syslog about "Tower apcupsd[1920]: apcupsd FATAL ERROR in smartsetup.c at line 58 Cannot open UPS port /dev/ttyUSB0: No such file or directory  (Errors)"...

 

I wish I could be of more help with this, but my Linux knowledge is minimal :(.

 

The "ttyUSB0" bit. Is that referencing a particular USB port? From the log, it looks like my ports are "2" and "3". If it is referencing a particular port, should I switch it to "ttyUSB2"? (Just a shot in the dark!)

Link to comment

Hi Joe,

 

So I went home at lunch and put it in the Go Script above the auto line, and rebooted, but no change... I still got the same error in the syslog about "Tower apcupsd[1920]: apcupsd FATAL ERROR in smartsetup.c at line 58 Cannot open UPS port /dev/ttyUSB0: No such file or directory  (Errors)"...

 

I wish I could be of more help with this, but my Linux knowledge is minimal :(.

 

The "ttyUSB0" bit. Is that referencing a particular USB port? From the log, it looks like my ports are "2" and "3". If it is referencing a particular port, should I switch it to "ttyUSB2"? (Just a shot in the dark!)

Not a bad idea.  You can make the whole set of device nodes, just as in the example in that second link in your first post.

mknod /dev/ttyUSB0 c 188 0

mknod /dev/ttyUSB1 c 188 1

mknod /dev/ttyUSB2 c 188 2

mknod /dev/ttyUSB3 c 188 3

mknod /dev/ttyUSB4 c 188 4

mknod /dev/ttyUSB5 c 188 5

 

It would make a difference.

 

You might also see what a listing of /dev/usb* shows you after you plug in the UPS.  For all we know, a device node might be created by the udev system for you when the device is detected.

 

Joe L.

Link to comment

So I mknod'ed all the device nodes, and doesn't look like it helped. They showed up in the syslog but  gave the same error:

 

Apr  8 17:34:24 Tower apcupsd[1934]: apcupsd FATAL ERROR in smartsetup.c at line 58 Cannot open UPS port /dev/ttyUSB0: No such device or address  (Errors)
Apr  8 17:34:24 Tower apcupsd[1934]: apcupsd error shutdown completed (Errors)

 

This is the other usb related syslog stuff:

 

Apr  8 17:34:22 Tower kernel: libata version 3.00 loaded. (System)
Apr  8 17:34:22 Tower kernel: usbcore: registered new interface driver usbfs (System)
Apr  8 17:34:22 Tower kernel: usbcore: registered new interface driver hub (System)
Apr  8 17:34:22 Tower kernel: usbcore: registered new device driver usb (System)
Apr  8 17:34:22 Tower kernel: fuse init (API version 7.13) (System)
Apr  8 17:34:22 Tower kernel: lp: driver loaded but no devices found (System)
Apr  8 17:34:22 Tower kernel: Real Time Clock Driver v1.12b (System)
Apr  8 17:34:22 Tower kernel: Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled (System)
Apr  8 17:34:22 Tower kernel: Uniform Multi-Platform E-IDE driver (System)
Apr  8 17:34:22 Tower kernel: e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI (System)
Apr  8 17:34:22 Tower kernel: Broadcom NetXtreme II CNIC Driver cnic v2.0.1 (Oct 01, 2009) (System)
Apr  8 17:34:22 Tower kernel: ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver (System)
Apr  8 17:34:22 Tower kernel: ehci_hcd 0000:00:12.2: EHCI Host Controller (System)
Apr  8 17:34:22 Tower kernel: usb usb1: configuration #1 chosen from 1 choice (Drive related)
Apr  8 17:34:22 Tower kernel: ehci_hcd 0000:00:13.2: EHCI Host Controller (System)
Apr  8 17:34:22 Tower kernel: usb usb2: configuration #1 chosen from 1 choice (Drive related)
Apr  8 17:34:22 Tower kernel: ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver (System)
Apr  8 17:34:22 Tower kernel: ohci_hcd 0000:00:12.0: OHCI Host Controller (System)
Apr  8 17:34:22 Tower kernel: usb usb3: configuration #1 chosen from 1 choice (Drive related)
Apr  8 17:34:22 Tower kernel: ohci_hcd 0000:00:12.1: OHCI Host Controller (System)
Apr  8 17:34:22 Tower kernel: usb usb4: configuration #1 chosen from 1 choice (Drive related)
Apr  8 17:34:22 Tower kernel: ohci_hcd 0000:00:13.0: OHCI Host Controller (System)
Apr  8 17:34:22 Tower kernel: usb usb5: configuration #1 chosen from 1 choice (Drive related)
Apr  8 17:34:22 Tower kernel: ohci_hcd 0000:00:13.1: OHCI Host Controller (System)
Apr  8 17:34:22 Tower kernel: usb usb6: configuration #1 chosen from 1 choice (Drive related)
Apr  8 17:34:22 Tower kernel: ohci_hcd 0000:00:14.5: OHCI Host Controller (System)
Apr  8 17:34:22 Tower kernel: usb usb7: configuration #1 chosen from 1 choice (Drive related)
Apr  8 17:34:22 Tower kernel: uhci_hcd: USB Universal Host Controller Interface driver (System)
Apr  8 17:34:22 Tower kernel: usbcore: registered new interface driver usblp (System)
Apr  8 17:34:22 Tower kernel: Initializing USB Mass Storage driver... (System)
Apr  8 17:34:22 Tower kernel: usbcore: registered new interface driver usb-storage (System)
Apr  8 17:34:22 Tower kernel: PNP: No PS/2 controller found. Probing ports directly. (System)
Apr  8 17:34:22 Tower kernel: Failed to disable AUX port, but continuing anyway... Is this a SiS? (System)
Apr  8 17:34:22 Tower kernel: If AUX port is really absent please use the 'i8042.noaux' option. (System)
Apr  8 17:34:22 Tower kernel: usb 1-5: new high speed USB device using ehci_hcd and address 3 (Drive related)
Apr  8 17:34:22 Tower kernel: serio: i8042 KBD port at 0x60,0x64 irq 1 (System)
Apr  8 17:34:22 Tower kernel: mice: PS/2 mouse device common for all mice (System)
Apr  8 17:34:22 Tower kernel: input: PC Speaker as /devices/platform/pcspkr/input/input2 (System)
Apr  8 17:34:22 Tower kernel: it87: Found IT8718F chip at 0x228, revision 5 (System)
Apr  8 17:34:22 Tower kernel: usbcore: registered new interface driver hiddev (System)
Apr  8 17:34:22 Tower kernel: usbcore: registered new interface driver usbhid (System)
Apr  8 17:34:22 Tower kernel: usbhid: v2.6:USB HID core driver (System)
Apr  8 17:34:22 Tower kernel: usb 1-5: configuration #1 chosen from 1 choice (Drive related)
Apr  8 17:34:22 Tower kernel: scsi0 : SCSI emulation for USB Mass Storage devices (Drive related)
Apr  8 17:34:22 Tower kernel: usb-storage: device found at 3 (Drive related)
Apr  8 17:34:22 Tower kernel: usb-storage: waiting for device to settle before scanning (Drive related)
Apr  8 17:34:22 Tower kernel: usb 3-1: new full speed USB device using ohci_hcd and address 2 (Drive related)

 

When I run "/dev/usb*", I get:

-bash: /dev/usbdev1.1: Permission denied

 

I noticed that the UPS came with a driver disk for RedHat. Could it have something of use on it?

 

Link to comment

When I run "/dev/usb*", I get:

-bash: /dev/usbdev1.1: Permission denied

Don't run it, but get a listing of the directory entries:

ls -l /dev/usb*

I noticed that the UPS came with a driver disk for RedHat. Could it have something of use on it?

Not likely to be usable.
Link to comment

Alrighty!  :) Here's the result:

 

Tower login: root
Password:
Linux 2.6.32.9-unRAID.
root@Tower:~# ls -l /dev/usb*
crw-rw---- 1 root root 189,   0 Apr  8 17:34 /dev/usbdev1.1
crw-rw---- 1 root root 189,   2 Apr  8 17:34 /dev/usbdev1.3
crw-rw---- 1 root root 189, 128 Apr  8 17:34 /dev/usbdev2.1
crw-rw---- 1 root root 189, 256 Apr  8 17:34 /dev/usbdev3.1
crw-rw---- 1 root root 189, 258 Apr  8 23:21 /dev/usbdev3.3
crw-rw---- 1 root root 189, 384 Apr  8 17:34 /dev/usbdev4.1
crw-rw---- 1 root root 189, 512 Apr  8 17:34 /dev/usbdev5.1
crw-rw---- 1 root root 189, 640 Apr  8 17:34 /dev/usbdev6.1
crw-rw---- 1 root root 189, 768 Apr  8 17:34 /dev/usbdev7.1
root@Tower:~#

 

 

Link to comment

Mixed news...  I took a look at the driver mentioned in the ubuntu link.  It is the pl2303 module.

 

I looked to see if it is included in 4.7 unRAID, because without it, it would not be recognized even if you figured out the right name and created the right device node.

 

Unfortunately, when I tried to load it manually using the modprobe command, it does not exist.  (not part of stock 4.7 unRAID)

root@Tower:/boot# modprobe pl2303

FATAL: Module pl2303 not found.

 

The good news is that it IS part of 5.0beta6a.

root@Tower2:/usr/src/linux# modprobe pl2303

root@Tower2:/usr/src/linux# lsmod

Module                  Size  Used by

pl2303                  8322  0

usbserial              19672  1 pl2303

md_mod                44249  6

xor                    12849  1 md_mod

pata_jmicron            1428  0

ahci                  16605  6

i2c_i801                5620  0

i2c_core              12189  1 i2c_i801

sata_sil                5408  1

jmicron                1093  0

libahci                13307  1 ahci

r8169                  26900  0

 

So, I've got a really good reason for you to upgrade.  ;)

 

If you have had HPA's on your disks, or have done unusual partitioning the 5.0beta6a will find some of your disks with an "unknown MBR"

(probably not, since you are not the guru type)

 

If you do not see any MBR-unknown listings on the first page, you can start the array and you'll be fine.  Read through the announcement thread and see the latest advice prior to upgrading. (a test you can make currently on your existing version)

 

Joe L.

Link to comment

The good news is that it IS part of 5.0beta6a.

 

So, I've got a really good reason for you to upgrade.  ;)

 

Well! Now you've gone and done it :)! I've been avoiding the 5.0 upgrade for months, but you dangled a carrot I just couldn't resist!

 

And, as always, you were right!!! :). I upgraded to the newest release (Very smooth upgrade. No disk weirdness or hiccups), and now the UPS chats with unRaid without issue!

 

APC      : 001,049,1183
DATE     : Sun Apr 10 12:05:34 EDT 2011
HOSTNAME : Tower
RELEASE  : 3.14.3
VERSION  : 3.14.3 (20 January 2008) slackware
UPSNAME  : UPS_IDEN
CABLE    : Custom Cable Smart
MODEL    : Smart-UPS SC1000
UPSMODE  : Stand Alone
STARTTIME: Sun Apr 10 12:03:21 EDT 2011
STATUS   : ONLINE 
LINEV    : 122.0 Volts
LOADPCT  :  31.2 Percent Load Capacity
BCHARGE  : 100.0 Percent
TIMELEFT :  36.0 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 5 Minutes
MAXTIME  : 300 Seconds
MAXLINEV : 122.0 Volts
MINLINEV : 121.0 Volts
OUTPUTV  : 122.0 Volts
SENSE    : High
DWAKE    : 000 Seconds
DSHUTD   : 060 Seconds
DLOWBATT : 02 Minutes
LOTRANS  : 106.0 Volts
HITRANS  : 127.0 Volts
RETPCT   : 000.0 Percent
ALARMDEL : 5 seconds
BATTV    : 27.1 Volts
LINEFREQ : 60.0 Hz
LASTXFER : Automatic or explicit self test
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
SELFTEST : NO
STESTI   : 336
STATFLAG : 0x07000008 Status Flag
REG1     : 0x00 Register 1
REG2     : 0x00 Register 2
REG3     : 0x00 Register 3
MANDATE  : 03/10/10
SERIALNO : 5S1011T10025
BATTDATE : 03/10/10
NOMOUTV  : 115 Volts
NOMBATTV :  24.0 Volts
FIRMWARE : 737.3.D
APCMODEL : FWD
END APC  : Sun Apr 10 12:06:04 EDT 2011

 

So, to conclude, for anyone who has the same problem (can't connect to APC UPS using serial-to-usb cable), the SC-1000 is not supported in 4.7, but it is in 5.0.

 

Also, in the configuration page of apcupsd (In the package manager page of unMenu), you need to put "/dev/ttyUSB0" in the "Use serial port" field. No other value seems to work.

 

Finally, it doesn't seem like you need to put "mknod /dev/ttyUSB0 c 188 0" in your go script.... I tried to get a listing of the directory entries without it, using "ls -l /dev/usb*", and got a "no such file or directory" error, but it still seems to work.... Should I include it anyways, Joe?

 

Thanks a ton Joe L! You are an invaluable addition to this community! I don't know what I would do without you and the other unRaid Gurus!

 

:)!!!

Link to comment

The good news is that it IS part of 5.0beta6a.

 

So, I've got a really good reason for you to upgrade.  ;)

 

Well! Now you've gone and done it :)! I've been avoiding the 5.0 upgrade for months, but you dangled a carrot I just couldn't resist!

 

And, as always, you were right!!! :). I upgraded to the newest release (Very smooth upgrade. No disk weirdness or hiccups), and now the UPS chats with unRaid without issue!

So, to conclude, for anyone who has the same problem (can't connect to APC UPS using serial-to-usb cable), the SC-1000 is not supported in 4.7, but it is in 5.0.

 

Also, in the configuration page of apcupsd (In the package manager page of unMenu), you need to put "/dev/ttyUSB0" in the "Use serial port" field. No other value seems to work.

Excellent news.

Finally, it doesn't seem like you need to put "mknod /dev/ttyUSB0 c 188 0" in your go script.... I tried to get a listing of the directory entries without it, using "ls -l /dev/usb*", and got a "no such file or directory" error, but it still seems to work.... Should I include it anyways, Joe?

No, you do not need them at all.  The "udev" subsystem creates the correct device for you when you plug in the UPS.  That device is, as you described, /dev/ttyUSB0.

Thanks a ton Joe L! You are an invaluable addition to this community! I don't know what I would do without you and the other unRaid Gurus!

You are welcome.

 

Joe L.

Link to comment
  • 2 years later...

Morning all-

Sorry to resurrect an old thread.  Here's whats up.  I recently upgraded from 4.7 to the latest stable release (came out in December 2013) and the upgrade was flawless.  I have a smart UPS that i had configured previously and it was working correctly in 4.7.

 

Now, i see multiple instances of the apcupsd - APC UPS Daemon and i also see the note stating that people have had issues with the newer one and to use the older one.  Great, no problem.  What appears to be messing me up however is that the newer ones are automatically installed.

 

For example:

 

apcupsd - APC UPS Daemon 3.14.10 version

Installed, but version is different. Current version='3.14.3' expected '3.14.10'

 

So, that seems to say that 3.14.3 is installed (and it shows as installed and says it will be reenabled on reboot:  apcupsd - A daemon for controlling APC UPS devices

Currently Installed. Will be automatically Re-Installed upon Re-Boot.)

 

I am stuck at work right now (why does work always get in the way  :o) but am assuming that a simple reboot will get things communicating once again as long as it shows version 3.14.3 as saying it will be reenabled on reboot.  Is this the case?  do i have this set correctly?

 

Thanks in advance

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.