Example

<?xml version="1.0" ?>
<sensedata>
    <package id="Sumit-Local-Laptop" timestamp="1346113433203">
        <gps>
           <location longitude="38.446" latitude="96.334" altitude="100.34" />
           <delta climb="0.0" track="130.4" speed="0.0" />
           <accuracy longitude_error="1.0" latitude_error="2.5" altitude_error="" climb_error="" track_error="" speed_error="" />
        </gps>
        <sensors>
            <sensor id="SUMTEMP001" type="Temperature" units="C">
                <data>11</data>
            </sensor>
            <sensor id="SUMVOL001" type="Volume" units="l">
                <data>484</data>
            </sensor>
            <sensor id="SUMFLO001" type="FlowRate" units="l">
                <data>776.300</data>
            </sensor>
        </sensors>
    </package>
</sensedata>

SenseData elements can contain multiple package elements. Each package contains the Relay ID listed as just id and a timestamp which is a standard UNIX timestamp in seconds. Each package should contain only one sensors element. The sensors element can have multiple sensor elements, each with an id (Sensor ID), type and units. The sensor can contain one data element with the sensor data in its TEXT field.

Valid Sensor Types

*Volume and FlowRate are typically both components of the same counter. For 1-Wire devices in LtSense, currently a single counter will be represented by two sensor elements, one where the id ends with a -FR and the other with a -V for FlowRate and Volume respectively.

**Capitalization matters.

Spatial Data

Location data is optional and can be specified using the gps tag. All three sections within the gps tag, location, delta, and accuracy are optional. However if a tag is present, all attributes within that tag are required. If data is not available for a given field, simply use the empty string ("").

Future Sensors

Security

If security is enabled within BigSense, then a signature will need to be attached to the XML data. The attachment should be a Base64 encoded RSA with SHA1 digest signature of the XML data in its transmitted form, not including any leading or trailing whitespace or newlines. The signature must be separated by two newline characters. Both XML data and the signature should be in the HTTP POST Body. The following is a full POST request from a client to the BigSense web service from the LtSense client:

POST /bigsense/api/Sensor.sense.xml HTTP/1.1
Accept-Encoding: identity
Content-Length: 703
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
Connection: close
User-Agent: Python-urllib/2.7

<?xml version="1.0" ?><SenseData><package id="Sumit-Local-Laptop" timestamp="1346251838355"><sensors><sensor id="SUMTEMP001" type="Temperature" units="C"><data>1</data></sensor><sensor id="SUMVOL001" type="Volume" units="l"><data>488</data></sensor><sensor id="SUMFLO001" type="FlowRate" units="l"><data>776.659</data></sensor></sensors></package></SenseData>

uWKUWtrqkL7B81K7jV47k2Kw7neOdl3npxao4zCk4tVgcdMeaj7IDMrVnw0wKYcsX7YMftHg83GRsf+Ovtu8ZC6OymgdpR4mAzb3jdk7cOBoDXLq0/O88TVLASHzhZ4BPu4qv0K8jQ/omSix1T49zYUeKL8jTHD+AOXBzksGX2J6SHkWLvTbUUqwkgMOwcm6sMO7Xb/f+aq/UFRkpafvHjHfCzLXwD3RGte4qqGgM+K+bpJOmv4OGZyx+FozXo5FAqYn7O/OA1JkzGnyPrUXxVdUKcKg+njDIcTl3CNeuUt6ZNWhxIO/LPtD9j0uI2HLH/b4mpNSPzcbAGeMOBe4Kg==

For information on how to build these signatures in both Python 2 and Java, please refer to http://penguindreams.org/blog/signature-verification-between-java-and-python/.