From: DaveC on
> You're in luck. I've a decent amount of experience with apcupsd - great
> utility!

Thank you. While I consider myself pretty proficient at all things Mac,
apcupsd is pretty thin when it comes to UI. It's downright intimidating. ;-)
But it's power is invaluable.

> How are you trying to "run" it?

sudo /sbin/apcupsd
$ password: (I enter the sys. pw)

Then... nothing.

Activity Monitor shows no process with a name I can identify as associated
with apcupsd.

The app Console shows:

2010-04-18 08:06:25 -0700 apcupsd FATAL ERROR in smartsetup.c at line
70
Cannot open UPS port tty.PL2303-000053FD: No such file or directory
2010-04-18 08:06:25 -0700 apcupsd error shutdown completed

Yet I can list the devices in directory /dev and it is there. There is no
typo: it is spelled right.

> In normal operation, apcupsd runs
> automatically at startup as a background daemon. You don't have much, if
> any, direct interaction with it. To see if the daemon is already
> running, issue this command:
>
> /sbin/apcaccess
>
> If it's running you will see a screen dump showing lots of juicy
> information about your UPS - something like this:

I get

Error contacting apcupsd @ localhost:3551: Connection refused

I suspect the tty port is busy. How can I get whatever process is using it to
release it? (Rebooting doesn't help.)

The ups is a "APC Smart-UPS 1400".

Thanks again,
Dave

From: Jolly Roger on
In article
<0001HW.C7F08BB300485F74B01AD9AF(a)news.eternal-september.org>,
DaveC <invalid(a)invalid.net> wrote:

> > You're in luck. I've a decent amount of experience with apcupsd - great
> > utility!
>
> Thank you. While I consider myself pretty proficient at all things Mac,
> apcupsd is pretty thin when it comes to UI. It's downright intimidating. ;-)
> But it's power is invaluable.

Yes, apcupsd acquired a Mac UI only recently, and that's just in the
form of a mostly useless menu extra on the menu bar.

> > How are you trying to "run" it?
>
> sudo /sbin/apcupsd
> $ password: (I enter the sys. pw)
>
> Then... nothing.

Ok. That's not how you run it. You don't the daemon manually. After you
installed it, you should have been instructed to restart the computer.
After the restart, it should automatically start up on its own.

> Activity Monitor shows no process with a name I can identify as associated
> with apcupsd.

Just to be sure, you did restart after installing it, right?

> The app Console shows:
>
> 2010-04-18 08:06:25 -0700 apcupsd FATAL ERROR in smartsetup.c at line
> 70
> Cannot open UPS port tty.PL2303-000053FD: No such file or directory
> 2010-04-18 08:06:25 -0700 apcupsd error shutdown completed
>
> Yet I can list the devices in directory /dev and it is there. There is no
> typo: it is spelled right.

Hmm... Did you install the required USB driver? Unless things have
changed very recently, apcupsd, having its heritage in plain Unix
systems, requires libusb to be present on the host system. And at least
for Mac OS X, it needs to be a specific legacy version as well (0.1.12).
Here are the details:

<http://www.apcupsd.com/manual/manual.html#mac-os-x-darwin-usb-configurat
ion>

If you don't have a package manager like MacPorts, just download the
libusb-0.1.12 source from http://www.libusb.org then decompress it and
run these terminal commands after changing to that directory:

./configure
make
sudo make install

> > In normal operation, apcupsd runs
> > automatically at startup as a background daemon. You don't have much, if
> > any, direct interaction with it. To see if the daemon is already
> > running, issue this command:
> >
> > /sbin/apcaccess
> >
> > If it's running you will see a screen dump showing lots of juicy
> > information about your UPS - something like this:
>
> I get
>
> Error contacting apcupsd @ localhost:3551: Connection refused
>
> I suspect the tty port is busy. How can I get whatever process is using it to
> release it? (Rebooting doesn't help.)

Typically the apcupsd kernel extension takes care of disabling Apple's
built-in UPS support, which should free up the port. Do you see a UPS
tab in the System Preferences > Energy Saver panel?

Check to be sure you have the apcupsd extension installed. It's at:

/System/Library/Extensions/ApcupsdDummy.kext

> The ups is a "APC Smart-UPS 1400".

Seems like it should be supported.

--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.

JR
From: Jolly Roger on
In article <jollyroger-FFB3C3.12340918042010(a)news.individual.net>,
Jolly Roger <jollyroger(a)pobox.com> wrote:

> In article
> <0001HW.C7F08BB300485F74B01AD9AF(a)news.eternal-september.org>,
> DaveC <invalid(a)invalid.net> wrote:
>
> > The app Console shows:
> >
> > 2010-04-18 08:06:25 -0700 apcupsd FATAL ERROR in smartsetup.c at line
> > 70
> > Cannot open UPS port tty.PL2303-000053FD: No such file or directory
> > 2010-04-18 08:06:25 -0700 apcupsd error shutdown completed
> >
> > Yet I can list the devices in directory /dev and it is there. There is no
> > typo: it is spelled right.
>
> Hmm... Did you install the required USB driver? Unless things have
> changed very recently, apcupsd, having its heritage in plain Unix
> systems, requires libusb to be present on the host system. And at least
> for Mac OS X, it needs to be a specific legacy version as well (0.1.12).
> Here are the details:
>
> <http://www.apcupsd.com/manual/manual.html#mac-os-x-darwin-usb-configurat
> ion>
>
> If you don't have a package manager like MacPorts, just download the
> libusb-0.1.12 source from http://www.libusb.org then decompress it and
> run these terminal commands after changing to that directory:
>
> ./configure
> make
> sudo make install

Another thing to check, just to be sure:

In /etc/apcupsd/apcupsd.conf, make sure you have these settings:

UPSCABLE usb

UPSTYPE usb
DEVICE

--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.

JR
From: DaveC on
> Ok. That's not how you run it. You don't the daemon manually. After you
> installed it, you should have been instructed to restart the computer.
> After the restart, it should automatically start up on its own.

Just following the manual...

Making Sure apcupsd Is Running:
The simplest way to invoke apcupsd is from the command line by
entering:
/sbin/apcupsd

>> Activity Monitor shows no process with a name I can identify as associated
>> with apcupsd.
>
> Just to be sure, you did restart after installing it, right?

Several times.

> Hmm... Did you install the required USB driver?

The Smart-UPS 1400 is a serial (DB-9) UPS. I have installed serial-to-USB
adapters and drivers from Source Forge (these work much better than the
Prolific drivers). I have tested the 2 adapters with a serial Wacom digital
tablet I have. The adapters (as well as the drivers) both work flawlessly.

> Typically the apcupsd kernel extension takes care of disabling Apple's
> built-in UPS support, which should free up the port. Do you see a UPS
> tab in the System Preferences > Energy Saver panel?

No tab for UPS.

> Check to be sure you have the apcupsd extension installed. It's at:
>
> /System/Library/Extensions/ApcupsdDummy.kext

It is there.

>> The ups is a "APC Smart-UPS 1400".
>
> Seems like it should be supported.

So one would think. Once I confirm apcupsd is running, I have to determine if
this UPS speaks apcsmart protocol or simple serial protocol or if it just
does bit-setting "voltage-level" communication.

Thanks again JR for your help.

Dave

From: Jolly Roger on
In article
<0001HW.C7F09725004B0E39B01AD9AF(a)news.eternal-september.org>,
DaveC <invalid(a)invalid.net> wrote:

> > Ok. That's not how you run it. You don't the daemon manually. After you
> > installed it, you should have been instructed to restart the computer.
> > After the restart, it should automatically start up on its own.
>
> Just following the manual...
>
> Making Sure apcupsd Is Running:
> The simplest way to invoke apcupsd is from the command line by
> entering:
> /sbin/apcupsd

Read the section carefully. That is to be done *before* you restart, I
believe.

> > Hmm... Did you install the required USB driver?
>
> The Smart-UPS 1400 is a serial (DB-9) UPS. I have installed serial-to-USB
> adapters and drivers from Source Forge (these work much better than the
> Prolific drivers). I have tested the 2 adapters with a serial Wacom digital
> tablet I have. The adapters (as well as the drivers) both work flawlessly.

I take it that's a "no, I did not install libusb"?

While your UPS is a serial device, it's going to communicate with
apcupsd through USB. So I'm pretty sure you will need to install libusb.

> > Typically the apcupsd kernel extension takes care of disabling Apple's
> > built-in UPS support, which should free up the port. Do you see a UPS
> > tab in the System Preferences > Energy Saver panel?
>
> No tab for UPS.

Then that part is loaded and working. Good.

> > Check to be sure you have the apcupsd extension installed. It's at:
> >
> > /System/Library/Extensions/ApcupsdDummy.kext
>
> It is there.

Good.

> >> The ups is a "APC Smart-UPS 1400".
> >
> > Seems like it should be supported.
>
> So one would think. Once I confirm apcupsd is running, I have to determine if
> this UPS speaks apcsmart protocol or simple serial protocol or if it just
> does bit-setting "voltage-level" communication.

I doubt it is going to run until it can communicate with the device as
configured. You need to install libusb, I'm afraid. It's easy enough to
install. I'd just try it.

--
Send responses to the relevant news group rather than email to me.
E-mail sent to this address may be devoured by my very hungry SPAM
filter. Due to Google's refusal to prevent spammers from posting
messages through their servers, I often ignore posts from Google
Groups. Use a real news client if you want me to see your posts.

JR