Re: [Apcupsd-users] protocol of the 3551 port
Brought to you by:
adk0212
|
From: Adam K. <ad...@kr...> - 2014-02-12 15:57:08
|
I was responding to the part of your question that said, "Or is there
already a monitor program for Window?", to which the answer is "Yes, it's
called apcupsd." :-)
As for the network protocol, I could have sworn I've described it many
times over the years, but Google is failing me so here goes once more. This
time I'll put it in the manual...
The protocol operates over TCP. The client opens a connection to the server
> and sends a message, to which the server will reply with one or more
> messages. Each message consists of a 2-byte length (in network byte order)
> followed by that many bytes of data. Both the client->server and
> server->client messages follow this format.
>
> apcupsd supports 2 commands, sent as the body of a message:
1. "status" - The status command requests that the server send a copy of
all status values, in the form displayed by apcaccess. After the client
sends the "status" command, the server will reply with a series of messges,
each one containing one line of apcaccess status data. The end of the
command series is indicated by an empty message (length of 0).
2. "events" - The events command operates the same as "status" except the
server replies with lines from the log of recent events.
As an example, the following bytes would be sent by a client to solicit the
status:
0x00 0x06 0x73 0x74 0x61 0x74 0x75 0x73
The first two bytes are the data length (6) in network byte order. The 6
bytes of data that follow are the ASCII characters for "status". The server
will respond to this command with a series of its own messages containing
the status data.
Hope this helps.
--Adam
On Wed, Feb 12, 2014 at 10:15 AM, Danny Casier <dan...@co...>wrote:
> Tnx Adam;
>
>
>
> I know that. I'm using it. But I have to monitor over 20 old UPSes. I
> like to build one application that monitors all of them.
>
> I see this is a protocol over TCP/IP so it is easier to ask what protocol
> is used than dive in the source.
>
>
>
> Dan
>
>
>
>
>
> *Van:* Adam Kropelin [mailto:ad...@kr...]
> *Verzonden:* woensdag 12 februari 2014 15:58
> *Aan:* Apcupsd Discussion List
> *Onderwerp:* Re: [Apcupsd-users] protocol of the 3551 port
>
>
>
> There is a build of apcupsd for Windows which includes a tray applet in
> addition to the daemon itself. If you just want to watch the status of
> another apcupsd running somewhere else you can install the tray applet by
> itself.
>
>
>
> On Wed, Feb 12, 2014 at 6:16 AM, Danny Casier <dan...@co...>
> wrote:
>
>
>
> Hello
>
>
>
> I'm looking for the protocol to the 3551 port of the agent so I can
> request information to monitor other UPS.
>
> Or is there already a monitor program for Windows?
>
>
>
>
>
>
>
> Dan C
>
>
|