Info
Content

Data Formats

The platform is able to automatically parse the following data formats. If Your device uses a different format, please, let us know. We are open to integrating any new formats.

Remember: Parsed value names are stored as fields, there is no connection with the message "topic".

Numeric values

Basic raw numeric values (integer or floating) are supported. The point separator is dot .. These numeric values are stored as a field value.

Examples:

12
-45.23
0.7e8
-9E10

This will be stored as:
value 12.0 timestamp_now
value -45.23 timestamp_now
value 0.7e8 timestamp_now
value -9E10 timestamp_now

JSON

Another supported format is a JSON, which enables to describe structured data in human and also machine readable way. Each JSON property is stored in a database as a field composed from the JSON path to the property. From a JSON structure will be parsed only numerical or boolean data types, other will be ignored.

Reserved keywords

  • "timestmap" - marking specific date-time
    • string with ISO 8601 timestamp
    • doube with number of seconds since 1.1.1970 (Unix timestamp)

See more in examples.

1. Example - first level of immpression

{
   "temperature": 21.5,
   "humidity": 65.3
}

This will be stored as:
temperature 21.5 timestamp_now
humidity 65.3 timestamp_now

2. Example - deeper level of immpression

{
   "values": {
      "temperature": 21.5,
      "humidity": 65.3
   },
   "timestamp": 1540548000
}

This will be stored as:
values.temperature 21.5 1540548000
values.humidity 65.3 1540548000

More information about JSON
https://en.wikipedia.org/wiki/JSON (english)

SenML

Format SenML (Sensor Markup Language) is based on JSON, but it enables to write more datapoints at the time in one message.

Example:

[
   {
      "n": "temperature",
      "t": 1541067035, 
      "v": 23.42,
      "u": "°C"
   },
   {
      "n": "temperature",
      "t": 1541067135, 
      "v": 23.58,
      "u": "°C"
   }
]

In this case, the data will be stored in a database with two timestamps:
temperature_°C 23.42 1541067035
and
temperature_°C 23.58 1541067135

More information about the SenML:
https://tools.ietf.org/html/draft-ietf-core-senml-16 (english)

No Comments
Back to top