Lightweight read-only companion to tb_setup_devices: when you
only need a device's internal UUID (e.g. to call the telemetry-delete
endpoint), this returns it directly without touching the access token or
creating the device on the side. Returns NA_character_ when the device
does not exist.
Usage
tb_get_device_id(
device_name,
api_key = Sys.getenv("TB_API_KEY"),
host = tb_default_host(),
username = Sys.getenv("TB_USERNAME"),
password = Sys.getenv("TB_PASSWORD")
)Arguments
- device_name
device name as shown in the ThingsBoard UI.
- api_key
account-level API key. Defaults to env var
TB_API_KEY.- host
base URL of the ThingsBoard instance. Defaults to env var
TB_HOSTif set, otherwise"https://thingsboard.cloud".- username
ThingsBoard user for the username/password (JWT) login (self-hosted / Community Edition). Defaults to env var
TB_USERNAME.- password
ThingsBoard password. Defaults to env var
TB_PASSWORD.