EventP

EventP is an command which sends an event to the Wavestore on port 8601.  The command is so named because it starts with the letter P.

Unlike many commands, this command does not require the user to log in first, and the command is entirely textual so it can be sent from a device which sends single lines of text.  A username and password are included in the command in plain text.

  • EVENTP command: P<user>;<pass>;<EventCause><EventSource>[/<Camera>]<OnOffPulse>[<textField>];

This event command is intended to make notification from IP cameras and similar devices easier. It logs in, processes and event and logs out.

<user> and <pass> are cleartext user and password for wavestore login.  This user should be configured on the Wavstore in the normal way.  Select a user with minimal permissions for this since the password can easily be seen by any network dump tools.  It is necessary to add "Post Event" permission for EventP to work.  See Eventp-configuring-user-id-post-events-permission-flag on the KB.

<EventCause> may be a short or long Event Cause name, eg, Input.

<EventSource> is a numeric parameter, an input number or a camera number.  It can contain a dot, for example 1.2 for device 1 subunit 2.

<OnOffPulse> is a separator character. Use : for pulse, or + or - for ON and OFF events. Only one of these characters is allowed, anything following is treated as part of the text.

Note the ; at the end, this is a simple terminator for textual transmission.  No newline character is required, but if one is sent at the end of the line it will be ignored.  The caller will usually disconnect after sending this command, but the connection can be retained for additional commands to be sent.

eg,

Pipcamerauser;mypasswd;Input14; - triggers Input 14 pulse event, with username 'ipcamerauser' and password 'mypasswd'.
Pipcamerauser;mypasswd;Motion14; - triggers motion event on camera 14
Pipcamerauser;mypasswd;Input14+hello; - Input 14 on with text 'hello'
Pipcamerauser;mypasswd;Input14-hello; - Input 14 off with text 'hello'
Pipcamerauser;mypasswd;Input14:hello; - Input 14 pulse with text 'hello'

The fields are limited to: a username of 100 bytes, password of 100 bytes, and event (event type, source and text) of 10000 bytes (from 5.42). This is primarily to prevent corrupt entries filling up internal buffers.