get_senseBox_data: Get measurement data from a senseBox

Description Usage Arguments Value Function version Author(s) Examples

View source: R/get_senseBox_data.R

Description

If the arguments fromDate and toDate are NOT given, the measurements from the last 48 h from now are downloaded. The maximum numbers of downloaded measurements are 10,000. The maximum time frame is one month. It is possible to download the data directly as a csv file, when argument CSV is TRUE.

Usage

1
2
3
4
5
6
7
8
9
get_senseBox_data(
  senseBoxId,
  sensorId = rep("all", times = length(unlist(senseBoxId))),
  fromDate = NULL,
  toDate = NULL,
  parallel = FALSE,
  CSV = FALSE,
  POSIXct = TRUE
)

Arguments

senseBoxId

characteror vector of character (required): senseBoxId or a vector of character of senseBoxIds

sensorId

character or list of character (optional): sensorId or a list of senseBoxIds. When no sensorIds are submitted, all sensorIds from this sensebox are requested.

fromDate

character (optional): Just show data with from date in format YYYY-mm-dd HH:MM:SS

toDate

character (optional): Just show data with up to date in format YYYY-mm-dd HH:MM:SS

parallel

logical (optional): Should the calculations be executed on multiple cores? At least 4 cores are necessary to use this feature.

CSV

logical (optional): Download data as csv file? NOT SUPPORTED UNTIL NOW!

POSIXct

logical (optional): Should the timestamp be translated into POSIXct?

Value

A list with every entry is a sensBoxId. Every list entry inherits a data.frame with values and dates.

Function version

0.0.1

Author(s)

Johannes Friedrich

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##=====================================
## Example: get data from sensorId
##=====================================

get_senseBox_data(
  senseBoxId = "5957b67494f0520011304cc1",
  sensorId = "5957b67494f0520011304cc4",
  fromDate = "2017-11-25-12:00:00",
  toDate = "2017-11-25 12:30:00")

## Not run: 
get_senseBox_data(
  senseBoxId = c("5957b67494f0520011304cc1","5957b67494f0520011304cc1") ,
  sensorId = "all",
  fromDate = "2017-11-25-12:00:00",
  toDate = "2017-11-26-12:00:00")

get_senseBox_data(
  senseBoxId = "5957b67494f0520011304cc1",
  sensorId = "5957b67494f0520011304cc4",
  fromDate = "2017-11-25-12:00:00",
  toDate = "2017-11-26-12:00:00")

## End(Not run)

JohannesFriedrich/senseBox documentation built on Nov. 8, 2021, 3:02 p.m.