Skip to contents

[Experimental]

Get device properties values in a range of time (note: this API method is bugged and waiting to be fixed by Arduino team. Here for completeness and future developments but would not suggest using it)

Official documentation: devicesV2Timeseries

Usage

devices_properties_timeseries(
  device_id,
  property_id,
  start = NULL,
  limit = NULL,
  store_token = "option",
  token = NULL,
  silent = FALSE
)

Arguments

device_id

The id of the device

property_id

The id of the property

start

A Posixct or Date object. The time at which to start selecting properties.

limit

The number of properties to select

store_token

Where your token is stored. If option it will be retrieved from the .Rprofile (not cross-session and default), if envir it will be retrieved from environmental variables list (cross-session).

token

A valid token created with create_auth_token or manually. It not NULL it has higher priority then store_token

silent

Whether to hide or show API method success messages (default FALSE)

Value

A tibble showing of time and value for property of given device

Examples

if (FALSE) {
# Sys.setenv(ARDUINO_API_CLIENT_ID = 'INSERT CLIENT_ID HERE')
# Sys.setenv(ARDUINO_API_CLIENT_SECRET = 'INSERT CLIENT_SECRET HERE')

create_auth_token()

device_id = "fa7ee291-8dc8-4713-92c7-9027969e4aa1"
property_id = "d1134fe1-6519-49f1-afd8-7fe9e891e778"

devices_properties_timeseries(device_id = device_id, property_id = property_id,
 start = "2022-08-20", limit = 10)
}