Extracts the raw buffer from an Observation.
This function is available in firmware 3.1.0+.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
obs_name | String | Yes | The name of the Observation from which to get the values from the buffer. |
windows_time_size | Integer | No | The time window, in seconds, is the time from which to begin analyzing the data. |
Returns
An array of value/timestamp pairs:
Field | Type | Description |
---|---|---|
value | Variable | The current value for this buffered item. |
timestamp | Integer | The time window, in seconds, is the time from which to begin analyzing the data for the current buffered item. |
Example
Request
var result = Observation.getBuffer('light');
Response
[
{"value" : 254, "timestamp" : 1234567890},
{"value" : 259, "timestamp" : 1233563449}
]