Push Static Attributes of one Wasserportal Station to ThingsBoard
Source:R/push_to_thingsboard.R
tb_push_station_attributes.RdSends station metadata (coordinates, level reference, operator, ...) as
client-side attributes to the ThingsBoard device attributes endpoint
(/api/v1/{token}/attributes). Attributes are key/value pairs without a
timestamp; ThingsBoard overwrites the previous value on every push.
Usage
tb_push_station_attributes(
attributes,
device_token,
host = Sys.getenv("TB_HOST", unset = "https://thingsboard.cloud")
)Examples
if (FALSE) { # \dontrun{
tb_push_station_attributes(
attributes = list(
name = "Pegel Mueggelheim",
latitude = 52.4291,
longitude = 13.6450,
pegelnullpunkt_m_NHN = 32.18
),
device_token = Sys.getenv("TB_DEVICE_TOKEN_5867000")
)
} # }