-----------------------------------------------------------------------------------------------------------------------

 Description of VALUES.XML file for Wx7xx devices

 v1.0 for firmware 10-0-2-0 or higher, 2021-01-27

-----------------------------------------------------------------------------------------------------------------------

1.  History of changes

    |-----------------------|--------------------|--------------------------------------------------------------------|
    | Date                  | Version            | Description of changes                                             |
    |                       |                    |                                                                    |
    |-----------------------|--------------------|--------------------------------------------------------------------|
    | 2021-01-27            |  v1                | Initial version of specification                                   |
    |-----------------------|--------------------|--------------------------------------------------------------------|


2.  Structure of VALUES.XML and parameters

2.1 Description

    Measured values can be obtained by HTTP GET requests sent to http server running at WiFi sensor. Requests for file
    values.xml can be sent to http server running at port 80. This feature is independent on http(s) server running at
    port 81 or 443 (when security is enabled) which are intended to access by human. To be able utilize this feature, it 
    needs to be enabled in the device settings (Protocols / HTTP server / JSON and XML). This feature is disabled 
    by the default. When feature is disabled http error code 403 is returned. Access to file values.xml is independent 
    to device security subsystem. In case of feature is enabled together with the device security, file values.xml is
    accessible at port 80 without any restrictions.

    Responses to GET requests to file values.xml at port 80 are served by the http 1.0 server with single TCP socket 
    capability. Response time depends of WiFi signal strength and load of http server. Average response time at high 
    performance mode is 25 ms. In case of communication issues or server overloading it can be response time up to 10 sec.


2.2 XML structure

    Structure of XML file is described at XSD schema available at "xsd" directory.


2.3 Tags at <root> key

    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | Parameter             | Type   | Range     | Description                                                        |
    |                       |        |           |                                                                    |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <devname>             | STR    | 64B len   | Device name                                                        |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <devsn>               | STR    | 8B len    | Serial number of the device (e.g. 20280001)                        |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <time>                | STR    | RFC3339   | Current device time according https://tools.ietf.org/html/rfc3339  |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <timeunix>            | INT    | 32b unsig | Current device time as Unix timestamp (seconds since 01/01/1970)   |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <synch>               | INT    | 0, 1      | Indication if device time is valid (1 = RTC time is valid)         |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <rssi>                | INT    | -30 ~ -99 | Received signal strength indication at [dBm]                       |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <acc>                 | INT    | 0, 1      | Acoustic active (=1)                                               |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <ch1>                 |        |           | Element with information about each channel with current measured  |
    |  ...                  |        |           | values.                                                            |
    | <ch8>                 |        |           |                                                                    |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|


2.4 Tags at channels

    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | Parameter             | Type   | Range     | Description                                                        |
    |                       |        |           |                                                                    |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <name>                | STR    | 32B len   | Name of the channel (at English language)                          |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <unit>                | STR    | 16B len   | Unit of the channel                                                |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <value>               | STR    | 32B len   | Measured value at string format (e.g. 12.8, n/a, ErrorX)           |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <alarm1>              | INT    | 0, 1      | Alarm 1 state (1 = alarm)                                          |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|
    | <alarm2>              | INT    | 0, 1      | Alarm 2 state (1 = alarm)                                          |
    |-----------------------|--------|-----------|--------------------------------------------------------------------|


3.  Example of values.xml

    Example of XML file is at directory "xml-example".


4.  Code examples

    Directory "code-examples" contains examples how to obtain values via different programming languages. Current
    version of SDK contains example at Python language only.

