getMax()

Returns the maximum value in an Observation's buffer.

This function is available in firmware 3.1.0+.

Parameters

ParameterTypeRequiredDescription
obs_nameStringYesThe name of the Observation from which to get the maximum value from the buffer.
windows_time_size IntegerNoThe time window, in seconds, is the time from which to begin analyzing the data.

Returns

The resulting data will be a scalar, or null if the buffer is empty.

Example

Request

var result = Observation.getMin('light', 10);

Response

780