Stupid question on apcupsd

This forum is for discussion about general software issues.

Stupid question on apcupsd

Postby cagnulein » Thu Jul 03, 2014 7:21 am

Hi folks,
i've always used apcupsd without a problem.
Today i installed a new raspberry and obviously i installed apcupsd too (ver. 3.14.12-2)
apctest works flawlessly but when i start the demon and i try to read the values with apcaccess it gives me always this output

$ sudo apcaccess status
Usage: apcaccess [-f <config-file>] [-h <host>[:<port>]] [-p <parameter-name>] [-u] [<command>] [<host>[:<port>]]
-f Load default host,port from given conf file (default: /etc/apcupsd/apcupsd.conf)
-h Connect to host and port (supercedes conf file)
-p Return only the value of the named parameter rather than all parameters and values
-u Strip unit labels
Supported commands: 'status' (default)
Trailing host/port spec overrides -h and conf file.

I've tried sudo apcaccess also with the same result.

Am i an idiot?
cagnulein
 
Posts: 11
Joined: Mon Jan 14, 2013 10:58 am

Re: Stupid question on apcupsd

Postby cagnulein » Thu Jul 03, 2014 10:14 am

cagnulein
 
Posts: 11
Joined: Mon Jan 14, 2013 10:58 am

Re: Stupid question on apcupsd

Postby Geoff » Thu Jul 03, 2014 2:40 pm

I know this doesn't resolve the issue, but an alternative might be to use the CGI interface over HTTP. For example, if you have a web server running:

$this->bbcode_second_pass_code('', 'curl http://servername/ups/upsfstats.cgi?host=n.n.n.n |& sed -e 's/<[^<>]\+>//g' | grep '^[A-Z]'')
The web server doesn't even need to be the same machine that has the UPS attached, just as long as the web server also has apcupsd installed and communicating with the UPS server (over TCP port 3551). You would want to set this up anyway, if the same UPS is providing power also to the web server.
Geoff
 
Posts: 231
Joined: Wed Mar 09, 2011 5:14 pm

Re: Stupid question on apcupsd

Postby cagnulein » Thu Jul 03, 2014 2:44 pm

Thank you Geoff.
I've solved downgrading apcupsd to the 3.14.11
cagnulein
 
Posts: 11
Joined: Mon Jan 14, 2013 10:58 am


Return to General

Who is online

Users browsing this forum: No registered users and 23 guests