sensorVars
namespace, e.g. sensorVars.geolocation
.latestValue
property, which contains the latest sensor value obtained, and a values
array, which contains a number of historical values.timestamp
property, making it easy to check when the latest value was retrieved.latestValue
is undefined
and values
is an empty array.active
boolean property, which denotes if the sensor poller is active or not.latestValue
(and optionally, empties the values
array) for the given sensorvalues
array, and for certain sensors like geolocation, additional polling options.sensorVars.accelerometer.latestValue
would update with the latest accelerometer reading, and sensorVars.accelerometer.values
array would get a new item.values
array has as many historical values as was defined when starting the poller, the oldest entry is removed when the new entry is added.latestValue
and values
will be preserved.sensorVars.geolocation.latestValue
and values
will update with a new location value as soon as the native API resolves, and then again when the update interval triggers.latestValue
and values
variables when getting a single sensor value.latestValue
to null
. Optionally, you can also reset the values
array, setting it to an empty array.onPollerError
event.onPollerError
eventsensor:<sensorName>:onPollerError
is triggered, e.g. sensor:geolocation:onPollerError
.