Fetch telemetry data of an entity.

It uses the following API: https://thingsboard.io/docs/user-guide/telemetry/#get-telemetry-values

The method getValues has a strong limitation as the 'ThingsBoard' API only send the 100 last values of each key. The method getTelemetry overcomes this limitation by automatically by calling getValues in a loop.

Arguments

entityId

A character with the entity ID given (See https://thingsboard.io/docs/user-guide/entity-views/)

keys

Vector of character with the list of keys from which getting the telemetry values

entityType

A character (default "DEVICE")

startTs

A numeric or a POSIXct representing respectively the epoch or the date of the start of data extraction period

endTs

A numeric or a POSIXct representing respectively the epoch or the date of the end of data extraction period

Value

A data.frame with one row per data and 3 columns:

  • key: a character with the key

  • ts: a POSIXct with the timestamp of the data

  • value: a numeric with the value of the data