Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Polling: Not allowed
  • Updating: for updating a data point value, an URL parameters string must be provided. It will be appended to the update URL and must have the form: "<parameter1 name>=<parameter1 value>&<parameter2 name>=<parameter2 value>&...". The URL parameter string must contain the "ValueTag" (specified within xio.http.cfg, default @value@). Suppose the update URL is "http://192.168.0.1/cmd/switch.xml" and the URL parameter string within the resource definition is "id=ceiling_light&state=@value@". If the item value "1" is written the HTTP plugin will initiate a GET request with the URL "http://192.168.0.1/cmd/switch.xml?id=ceiling_light&state=1"

...

Text encoded can be used to retrieve and send values from HTTP servers that provide any kind of text in their responses. The resource definition must be as follows:

  • Polling: for getting data point values from any text document, the regular expressions has to be specified. This regular expression is used to parse the HTTP response and extract the information that shall be set as data point value. The regular expression must contain a matching group (denoted by "()" ) – otherwise the full match will be taken as data point value. Consider the response is as follows: "The data point value is 25%". To retrieve the value "25", the regular expression ".* ([0-9]+)%" can be used. 
  • Updating: for updating a data point value, the text that shall be sent to the HTTP server must be specified. The text must contain the "ValueTag" (specified within xio.http.cfg, default @value@). E.g. "any text. Datapoint value is @value@").

Example

Suppose there is a HTTP server (192.168.0.10) which acts as interface to different devices that provide data point values. The server provides all information as XML via an URL like http://192.168.0.10/data/current.xml. This XML looks as follows.

...