Comment on page
Temperature Measurement Interval
A quick showcase on how to interact with the sampling interval of the 2nd and 3rd generation temperature sensors.
The 2nd and 3rd Generation Wireless Temperature Sensor both supports configuring a sampling interval that is shorter than the heartbeat interval. This enables the temperature sensor to measure the temperature as often as every 30 seconds, with only a minor impact on battery life. Like our 1st generation sensors, an event is generated every periodic heartbeat, but with the 2nd and 3rd generation hardware, the event can contain up to 30 temperature samples, depending on the configuration.
The sampling interval can be configured from Studio in the Sensor Configuration section of the device details page.
Sensor Configuration in Studio for a 2nd and 3rd Generation Temperature Sensor
API support for device configuration is coming later.
When the sensor is configured to sample more than 1 sample per heartbeat, additional samples are included with every temperature event as a list of timestamps and values. As shown in the Temperature Event documentation, the first element in the list is equal to the event timestamp and value, independent of configuration.
If more than 1 sample has been sampled during the period, the list is in decreasing order, meaning that the oldest sample is located at the end. The total length of the list will depend on the configuration.
How events for the 2nd and 3rd Generation Temperature Sensor are scheduled.
samples = 
for event in events:
samples += event.data.samples
updateTimeof an event is set to when the Cloud Connector receives the event from the sensor. Since this is not possible for samples between heartbeats, the timestamp of these samples is estimated by DT Cloud.
The implementation of this estimation assumes an ideally distributed interval according to the configuration. For example, if the sensor is configured to 5 samples per heartbeat and it has been exactly 10 minutes since the previous heartbeat, the interval between the timestamps will be exactly 2 minutes.
Last modified 4mo ago