Sensor rules generate events and notifications when they get triggered by a reported device sensor reading.
Once a rule is created, it can be associated to a device. This association means that every time a sensor update is received from the device, it will be evaluated against the sensor rule condition. As soon as the evaluation changes (for example, from true to false), an event will be recorded and a notification triggered.
Supported sensor types for the sensor rules creation are battery, humidity, pressure, temperature, acceleration, attach and tamper sensors.
Sensor rules are managed via the sensors endpoint.
Range rules: battery, humidity, pressure and temperature sensors
The user can define range rules for battery, humidity, pressure and temperature sensors. Such rules define both upper and lower thresholds for the sensor readings. When the device ingests data, the reported sensor reading is compared to the defined range and if an 'in range' or an 'out of range' transition has taken place, an event gets generated.
For example, in case of the battery rule the user can get notified when the device battery needs to get recharged. Humidity, pressure and temperature sensor rules help the user to monitor the physical tracking environment and get alerted if the device gets exposed to harmful environmental conditions.
Threshold rule: acceleration sensor
The acceleration rule is applicable to devices equipped with an accelerometer sensor. To configure the rule, the user needs to define an acceleration threshold value. Every time the device reports the accelerometer sensor reading being above the threshold, an event gets triggered.
For example, the user can get notified if the device was dropped or experienced some other mechanical shock.
Boolen rules: attach and tamper sensors
Some devices have attach and tamper sensors. The attach sensor detects whether the device is attached to some object, for example to an asset. The tamper sensor detects whether the device cover is open or closed. When the cover is open, the device is considered to be tampered with.
With attach and tamper sensor rules users can get notified whenever the device gets attached or detached, or when the device is being tampered with.