Skip to content
This repository was archived by the owner on Mar 16, 2023. It is now read-only.

basf/rzentra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Eduard Szöcs
Mar 16, 2023
a5b89c5 · Mar 16, 2023

History

3 Commits
Dec 14, 2020
Dec 15, 2020
Dec 15, 2020
Dec 14, 2020
Dec 14, 2020
Dec 14, 2020
Dec 14, 2020
Dec 14, 2020
Dec 14, 2020
Mar 16, 2023
Mar 16, 2023
Dec 14, 2020
Dec 14, 2020

Repository files navigation

rzentra

Lifecycle: deprecated CRAN status R build status codecov

An R client for Zentracloud API.

DEPRECATED: Please use the official client package: https://gitlab.com/meter-group-inc/pubpackages/zentracloud

Installation

Example

library("rzentra")

Authentcation

To work with the API you first need to authenticate. The zc_token() function authenticates you with your username and password and returns a token that can be used in subsequent API-calls.

The username & password are by default read from environmental variables ZC_USERNAME and ZC_PASSWORD, but you can provide them also in every function call using the username= and password= arguments.

token <- zc_token(username = "yourname", password = "yourpassword")$token

Querying data

Device settings

Querying the settings of a device can be done with zc_settings

zc_settings(token = token, 
  sn = "z6-00033", 
  start_time = as.numeric(as.POSIXct(Sys.Date(), origin = "1970-01-01"))
  )

Device statuses

Querying the settings of a device can be done with zc_statuses

zc_statuses(token = token, 
  sn = "z6-00033", 
  start_time = as.numeric(as.POSIXct(Sys.Date(), origin = "1970-01-01"))
  )

Device readings

zc_readings(token = token, 
  sn = "z6-00033", 
  start_time = as.numeric(as.POSIXct(Sys.Date(), origin = "1970-01-01"))
  )

Parsing data

Readings can be parsed into a long time-series table with zc_timeseries()

head(
  zc_timeseries(readings)
)

About

An R client for Zentra Cloud API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages