Search code examples
attributestime-seriesthingsboard

Thingsboard mapping - splitting telemetry data correctly into attributes and timeseries


Whenever I post the telemetry data from sensors ( through thingsboard gateway ), I am also adding the time (unix time as well as datetime in ISO8601 format) to json data. For example

{"MAC": "00-14-22-01-23-45","UNIX_TIME": 1519404687,"ISO8601_DATETIME": "2018-
02-23T16:52:38+00:00","VOLTAGE": 3.452}

I was just curious - If we were to split the above data into attributes and timeseries, would it be correct ( in a strict sense ) to split it like this

Attributes: MAC Timeseries: UNIX_TIME, ISO8601 and VOLTAGE

Or would the UNIX_TIME and ISO8601 go under attributes? Because (logically and technically speaking) they are attributes of the posted data? I am no expert in deciding that so It would be great to hear from others. I want to use these in the mapping and want to make sure that I start off right. Thanks


Solution

  • Attributes are attributes for the device, not for the posted data.

    Attributes are like telemetry values, except that only the last submitted value is stored for attributes, while telemetry data is stored as a time series.