Push a Single "Latest" Telemetry Record (no Timestamp)
Source:R/push_to_thingsboard.R
tb_push_latest_telemetry.RdSends a flat {"key": value, ...} JSON object to the ThingsBoard
telemetry endpoint, letting the server stamp it with the current time.
This is the simplest possible telemetry POST and is useful both as a
smoke test for the device-token auth path and as a fallback when the
bulk-with-ts format is rejected (some ThingsBoard Cloud Maker tier
configurations return an opaque HTTP 500 to the array-of-records form
even though the same device accepts attributes and latest-style
single records).
Usage
tb_push_latest_telemetry(
values,
device_token,
host = Sys.getenv("TB_HOST", unset = "https://thingsboard.cloud")
)Examples
if (FALSE) { # \dontrun{
tb_push_latest_telemetry(
values = list(`GW-Stand` = 35.6, `Wassertemperatur` = 11.2),
device_token = Sys.getenv("TB_DEVICE_TOKEN")
)
} # }