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.

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

Johannes Friedrich

Examples


##=====================================
## 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")
#> $`5957b67494f0520011304cc1`
#> $`5957b67494f0520011304cc1`$`Temperatur [°C]`
#>     value           createdAt
#> 1    8.85 2017-11-25 12:28:25
#> 2    8.99 2017-11-25 12:25:57
#> 3    8.55 2017-11-25 12:23:29
#> 4    8.29 2017-11-25 12:21:01
#> 5    8.37 2017-11-25 12:18:34
#> 6    8.23 2017-11-25 12:16:06
#> 7    8.01 2017-11-25 12:13:38
#> 8    8.17 2017-11-25 12:11:10
#> 9    8.00 2017-11-25 12:08:42
#> 10   7.74 2017-11-25 12:06:14
#> 11   7.68 2017-11-25 12:03:47
#> 12   8.60 2017-11-25 12:01:19
#> 13   8.26 2017-11-25 11:58:51
#> 14   7.93 2017-11-25 11:56:23
#> 15   7.52 2017-11-25 11:53:55
#> 16   7.13 2017-11-25 11:51:27
#> 17   7.39 2017-11-25 11:48:59
#> 18   6.97 2017-11-25 11:46:31
#> 19   7.59 2017-11-25 11:44:03
#> 20   7.27 2017-11-25 11:41:35
#> 21   6.86 2017-11-25 11:39:08
#> 22   6.45 2017-11-25 11:36:40
#> 23   5.66 2017-11-25 11:34:12
#> 24   6.66 2017-11-25 11:31:44
#> 25   6.14 2017-11-25 11:29:16
#> 26   5.89 2017-11-25 11:26:49
#> 27   5.81 2017-11-25 11:24:21
#> 28   5.44 2017-11-25 11:21:53
#> 29   5.78 2017-11-25 11:19:25
#> 30   5.32 2017-11-25 11:16:57
#> 31   4.94 2017-11-25 11:14:30
#> 32   4.87 2017-11-25 11:12:02
#> 33   4.16 2017-11-25 11:09:34
#> 34   4.30 2017-11-25 11:07:06
#> 35   4.52 2017-11-25 11:04:38
#> 36   4.09 2017-11-25 11:02:11
#> 37   3.71 2017-11-25 10:59:42
#> 38   3.74 2017-11-25 10:57:14
#> 39   3.73 2017-11-25 10:54:46
#> 40   3.29 2017-11-25 10:52:19
#> 41   2.99 2017-11-25 10:49:51
#> 42   2.74 2017-11-25 10:47:23
#> 43   2.34 2017-11-25 10:44:55
#> 44   2.41 2017-11-25 10:42:27
#> 45   2.70 2017-11-25 10:39:59
#> 46   2.86 2017-11-25 10:37:31
#> 47   2.71 2017-11-25 10:35:03
#> 48   2.79 2017-11-25 10:32:35
#> 49   2.68 2017-11-25 10:30:08
#> 50   2.42 2017-11-25 10:27:40
#> 51   1.96 2017-11-25 10:25:12
#> 52   1.98 2017-11-25 10:22:44
#> 53   1.84 2017-11-25 10:20:16
#> 54   1.87 2017-11-25 10:17:49
#> 55   2.07 2017-11-25 10:15:21
#> 56   2.22 2017-11-25 10:12:52
#> 57   2.10 2017-11-25 10:10:24
#> 58   1.81 2017-11-25 10:07:56
#> 59   1.90 2017-11-25 10:05:28
#> 60   1.96 2017-11-25 10:02:59
#> 61   2.02 2017-11-25 10:00:31
#> 62   1.97 2017-11-25 09:58:03
#> 63   1.70 2017-11-25 09:55:35
#> 64   1.60 2017-11-25 09:53:07
#> 65   1.52 2017-11-25 09:50:39
#> 66   1.73 2017-11-25 09:48:11
#> 67   1.83 2017-11-25 09:45:43
#> 68   1.38 2017-11-25 09:43:15
#> 69   1.64 2017-11-25 09:40:47
#> 70   1.99 2017-11-25 09:38:19
#> 71   1.82 2017-11-25 09:35:51
#> 72   1.48 2017-11-25 09:33:23
#> 73   1.04 2017-11-25 09:30:55
#> 74   0.85 2017-11-25 09:28:27
#> 75   0.74 2017-11-25 09:25:59
#> 76   0.75 2017-11-25 09:23:31
#> 77   0.68 2017-11-25 09:21:03
#> 78   0.54 2017-11-25 09:18:35
#> 79   0.37 2017-11-25 09:16:07
#> 80   0.42 2017-11-25 09:13:39
#> 81   0.85 2017-11-25 09:11:12
#> 82   0.67 2017-11-25 09:08:44
#> 83   0.65 2017-11-25 09:06:16
#> 84   0.74 2017-11-25 09:03:48
#> 85   0.47 2017-11-25 09:01:21
#> 86   0.48 2017-11-25 08:58:53
#> 87   0.48 2017-11-25 08:56:25
#> 88   0.59 2017-11-25 08:53:57
#> 89   0.54 2017-11-25 08:51:29
#> 90   0.09 2017-11-25 08:49:00
#> 91   0.13 2017-11-25 08:46:33
#> 92   0.42 2017-11-25 08:44:05
#> 93   0.16 2017-11-25 08:41:37
#> 94   0.32 2017-11-25 08:39:09
#> 95   0.34 2017-11-25 08:36:42
#> 96   0.13 2017-11-25 08:34:14
#> 97   0.03 2017-11-25 08:31:45
#> 98   0.28 2017-11-25 08:29:17
#> 99   0.06 2017-11-25 08:26:50
#> 100  0.12 2017-11-25 08:24:22
#> 101  0.07 2017-11-25 08:21:54
#> 102 -0.07 2017-11-25 08:19:26
#> 103 -0.21 2017-11-25 08:16:58
#> 104 -0.14 2017-11-25 08:14:30
#> 105  0.03 2017-11-25 08:12:02
#> 106  0.12 2017-11-25 08:09:34
#> 107  0.47 2017-11-25 08:07:07
#> 108  0.62 2017-11-25 08:04:39
#> 109  0.30 2017-11-25 08:02:11
#> 110  0.27 2017-11-25 07:59:43
#> 111  0.23 2017-11-25 07:57:16
#> 112  0.16 2017-11-25 07:54:48
#> 113 -0.05 2017-11-25 07:52:20
#> 114 -0.08 2017-11-25 07:49:52
#> 115  0.10 2017-11-25 07:47:24
#> 116 -0.13 2017-11-25 07:44:57
#> 117 -0.31 2017-11-25 07:42:29
#> 118 -0.42 2017-11-25 07:40:01
#> 119 -0.46 2017-11-25 07:37:33
#> 120 -0.64 2017-11-25 07:35:05
#> 121 -0.49 2017-11-25 07:32:37
#> 122 -0.42 2017-11-25 07:30:09
#> 123 -0.46 2017-11-25 07:27:41
#> 124 -0.37 2017-11-25 07:25:13
#> 125 -0.48 2017-11-25 07:22:46
#> 126 -0.50 2017-11-25 07:20:18
#> 127 -0.43 2017-11-25 07:17:50
#> 128 -0.37 2017-11-25 07:15:22
#> 129 -0.38 2017-11-25 07:12:54
#> 130 -0.36 2017-11-25 07:10:27
#> 131 -0.41 2017-11-25 07:07:59
#> 132 -0.32 2017-11-25 07:05:31
#> 133 -0.28 2017-11-25 07:03:03
#> 134 -0.31 2017-11-25 07:00:36
#> 135 -0.40 2017-11-25 06:58:08
#> 136 -0.25 2017-11-25 06:55:40
#> 137 -0.30 2017-11-25 06:53:12
#> 138 -0.29 2017-11-25 06:50:45
#> 139 -0.30 2017-11-25 06:48:17
#> 140 -0.19 2017-11-25 06:45:49
#> 141 -0.11 2017-11-25 06:43:21
#> 142 -0.26 2017-11-25 06:40:53
#> 143 -0.15 2017-11-25 06:38:26
#> 144 -0.08 2017-11-25 06:35:58
#> 145 -0.15 2017-11-25 06:33:30
#> 146 -0.15 2017-11-25 06:31:03
#> 147 -0.11 2017-11-25 06:28:35
#> 148 -0.17 2017-11-25 06:26:07
#> 149  0.01 2017-11-25 06:23:39
#> 150  0.02 2017-11-25 06:21:11
#> 151 -0.04 2017-11-25 06:18:44
#> 152 -0.07 2017-11-25 06:16:16
#> 153  0.05 2017-11-25 06:13:48
#> 154  0.04 2017-11-25 06:11:20
#> 155  0.02 2017-11-25 06:08:53
#> 156  0.01 2017-11-25 06:06:25
#> 157  0.03 2017-11-25 06:03:57
#> 158  0.10 2017-11-25 06:01:29
#> 159  0.12 2017-11-25 05:59:01
#> 160  0.22 2017-11-25 05:56:33
#> 161  0.20 2017-11-25 05:54:05
#> 162  0.22 2017-11-25 05:51:37
#> 163  0.36 2017-11-25 05:49:09
#> 164  0.24 2017-11-25 05:46:42
#> 165  0.26 2017-11-25 05:44:14
#> 166  0.27 2017-11-25 05:41:46
#> 167  0.39 2017-11-25 05:39:18
#> 168  0.36 2017-11-25 05:36:50
#> 169  0.28 2017-11-25 05:34:23
#> 170  0.30 2017-11-25 05:31:55
#> 171  0.15 2017-11-25 05:29:27
#> 172  0.13 2017-11-25 05:26:59
#> 173  0.14 2017-11-25 05:24:32
#> 174  0.24 2017-11-25 05:22:04
#> 175  0.21 2017-11-25 05:19:36
#> 176  0.40 2017-11-25 05:17:08
#> 177  0.48 2017-11-25 05:14:40
#> 178  0.57 2017-11-25 05:12:13
#> 179  0.53 2017-11-25 05:09:45
#> 180  0.51 2017-11-25 05:07:17
#> 181  0.49 2017-11-25 05:04:50
#> 182  0.44 2017-11-25 05:02:22
#> 183  0.41 2017-11-25 04:59:54
#> 184  0.36 2017-11-25 04:57:26
#> 185  0.27 2017-11-25 04:54:58
#> 186  0.45 2017-11-25 04:52:31
#> 187  0.44 2017-11-25 04:50:03
#> 188  0.52 2017-11-25 04:47:35
#> 189  0.56 2017-11-25 04:45:07
#> 190  0.61 2017-11-25 04:42:39
#> 191  0.56 2017-11-25 04:40:12
#> 192  0.45 2017-11-25 04:37:44
#> 193  0.46 2017-11-25 04:35:16
#> 194  0.49 2017-11-25 04:32:49
#> 195  0.48 2017-11-25 04:30:21
#> 196  0.62 2017-11-25 04:27:53
#> 197  0.62 2017-11-25 04:25:25
#> 198  0.63 2017-11-25 04:22:58
#> 199  0.66 2017-11-25 04:20:30
#> 200  0.57 2017-11-25 04:18:02
#> 201  0.47 2017-11-25 04:15:34
#> 202  0.77 2017-11-25 04:13:07
#> 203  0.85 2017-11-25 04:10:39
#> 204  0.89 2017-11-25 04:08:11
#> 205  0.82 2017-11-25 04:05:44
#> 206  0.77 2017-11-25 04:03:16
#> 207  0.73 2017-11-25 04:00:48
#> 208  0.66 2017-11-25 03:58:20
#> 209  0.67 2017-11-25 03:55:53
#> 210  0.69 2017-11-25 03:53:25
#> 211  0.65 2017-11-25 03:50:57
#> 212  0.68 2017-11-25 03:48:29
#> 213  0.55 2017-11-25 03:46:02
#> 214  0.45 2017-11-25 03:43:34
#> 215  0.45 2017-11-25 03:41:06
#> 216  0.42 2017-11-25 03:38:38
#> 217  0.52 2017-11-25 03:36:11
#> 218  0.55 2017-11-25 03:33:43
#> 219  0.65 2017-11-25 03:31:15
#> 220  0.74 2017-11-25 03:28:47
#> 221  0.72 2017-11-25 03:26:20
#> 222  0.77 2017-11-25 03:23:52
#> 223  0.77 2017-11-25 03:21:24
#> 224  0.77 2017-11-25 03:18:56
#> 225  0.73 2017-11-25 03:16:29
#> 226  0.76 2017-11-25 03:14:01
#> 227  0.72 2017-11-25 03:11:33
#> 228  0.80 2017-11-25 03:09:05
#> 229  0.66 2017-11-25 03:06:38
#> 230  0.71 2017-11-25 03:04:10
#> 231  0.81 2017-11-25 03:01:42
#> 232  0.89 2017-11-25 02:59:14
#> 233  0.91 2017-11-25 02:56:47
#> 234  0.85 2017-11-25 02:54:19
#> 235  0.88 2017-11-25 02:51:51
#> 236  0.84 2017-11-25 02:49:23
#> 237  0.85 2017-11-25 02:46:55
#> 238  0.85 2017-11-25 02:44:28
#> 239  0.83 2017-11-25 02:42:00
#> 240  0.73 2017-11-25 02:39:32
#> 241  0.73 2017-11-25 02:37:04
#> 242  0.59 2017-11-25 02:34:37
#> 243  0.70 2017-11-25 02:32:09
#> 244  0.66 2017-11-25 02:29:41
#> 245  0.73 2017-11-25 02:27:13
#> 246  0.72 2017-11-25 02:24:45
#> 247  0.76 2017-11-25 02:22:18
#> 248  0.90 2017-11-25 02:19:50
#> 249  0.94 2017-11-25 02:17:22
#> 250  0.91 2017-11-25 02:14:54
#> 251  0.79 2017-11-25 02:12:27
#> 252  0.72 2017-11-25 02:09:59
#> 253  0.85 2017-11-25 02:07:31
#> 254  0.69 2017-11-25 02:04:59
#> 255  0.76 2017-11-25 02:02:31
#> 256  0.94 2017-11-25 02:00:03
#> 257  0.94 2017-11-25 01:57:35
#> 258  0.84 2017-11-25 01:55:08
#> 259  0.74 2017-11-25 01:52:40
#> 260  0.89 2017-11-25 01:50:12
#> 261  0.77 2017-11-25 01:47:44
#> 262  0.84 2017-11-25 01:45:16
#> 263  0.69 2017-11-25 01:42:49
#> 264  0.69 2017-11-25 01:40:21
#> 265  0.71 2017-11-25 01:37:53
#> 266  0.73 2017-11-25 01:35:25
#> 267  0.74 2017-11-25 01:32:58
#> 268  0.76 2017-11-25 01:30:30
#> 269  0.71 2017-11-25 01:28:02
#> 270  0.82 2017-11-25 01:25:34
#> 271  0.81 2017-11-25 01:23:06
#> 272  0.80 2017-11-25 01:20:39
#> 273  0.79 2017-11-25 01:18:11
#> 274  0.99 2017-11-25 01:15:43
#> 275  0.84 2017-11-25 01:13:15
#> 276  1.03 2017-11-25 01:10:48
#> 277  0.92 2017-11-25 01:08:20
#> 278  0.77 2017-11-25 01:05:52
#> 279  0.81 2017-11-25 01:03:24
#> 280  0.85 2017-11-25 01:00:57
#> 281  0.92 2017-11-25 00:58:29
#> 282  0.88 2017-11-25 00:56:01
#> 283  0.86 2017-11-25 00:53:33
#> 284  0.81 2017-11-25 00:51:06
#> 285  0.85 2017-11-25 00:48:38
#> 286  0.81 2017-11-25 00:46:10
#> 287  0.79 2017-11-25 00:43:42
#> 288  0.81 2017-11-25 00:41:15
#> 289  0.87 2017-11-25 00:38:47
#> 290  0.91 2017-11-25 00:36:19
#> 291  1.00 2017-11-25 00:33:51
#> 292  0.95 2017-11-25 00:31:24
#> 293  0.95 2017-11-25 00:28:56
#> 294  0.91 2017-11-25 00:26:28
#> 295  1.01 2017-11-25 00:24:00
#> 296  1.11 2017-11-25 00:21:33
#> 297  1.21 2017-11-25 00:19:05
#> 298  1.20 2017-11-25 00:16:37
#> 299  1.16 2017-11-25 00:14:09
#> 300  1.21 2017-11-25 00:11:42
#> 301  1.16 2017-11-25 00:09:14
#> 302  1.08 2017-11-25 00:06:46
#> 303  1.04 2017-11-25 00:04:18
#> 304  1.00 2017-11-25 00:01:51
#> 
#> 

if (FALSE) {
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")
}