Creates a sensor rule of the specified rule type. After the sensor rule has been created, it needs to be associated to a device to get activated.
For a sensor rule of the battery, humidity, pressure and temperature type, a range parameter needs
to be specified, defining 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 in case in or out of range transition has taken place, an event gets triggered.
For a sensor rule of the acceleration type, a threshold parameter needs
to be specified, defining the acceleration threshold value.
Every time the device reports its accelerometer sensor reading being above the threshold,
an event gets triggered.
For a sensor rule of the attach and tamper types, no additional parameters need to be specified. 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. Every time the device reports getting attached, detached, tampered with or left with the cover closed (that is, not tampered with), an event gets triggered.
When a sensor rule has been successfully created, the response body will contain the created rule ID.