Skip to contents

List and show devices, events, properties associated to the user

Official documentation:

Usage

devices_list(
  serial = NULL,
  tags = NULL,
  store_token = "option",
  token = NULL,
  silent = FALSE
)

devices_show(device_id, store_token = "option", token = NULL, silent = FALSE)

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

devices_get_properties(
  device_id,
  show_deleted = FALSE,
  store_token = "option",
  token = NULL,
  silent = FALSE
)

Arguments

serial

serial number of the device you may want to filter from the list (not device_id)

tags

tags you may want to filter from the list

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)

device_id

The id of the device (The arn of the associated device)

limit

The number of events to select

start

A Posixct or Date object. Time at which to start selecting events

show_deleted

If TRUE, shows the soft deleted properties. Default to FALSE

Value

A tibble showing extensive information about devices (and related things) associated to the user

Examples

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

create_auth_token()

### check properties list ###
d_list = devices_list()
device_id = d_list %>% slice(1) %>% pull(id)

devices_show(device_id = device_id)

### get device events ###
devices_get_events(device_id = device_id)

### get device properties ###
devices_get_properties(device_id = device_id)

}