getBuffer()

Extracts the raw buffer from an Observation.

This function is available in firmware 3.1.0+.

Parameters

ParameterTypeRequiredDescription
obs_name StringYesThe name of the Observation from which to get the values from the buffer.
windows_time_size IntegerNoThe time window, in seconds, is the time from which to begin analyzing the data.

Returns

An array of value/timestamp pairs:

FieldTypeDescription
value VariableThe current value for this buffered item.
timestamp IntegerThe 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}
]