Events
An overview of the various event types that can be encountered throughout our services.
Event Types
The following table lists all event types and the triggers that generate them. An overview of event types per device can be found on the Devices page.
Event Name | Event Type | Trigger |
| When touched. | |
| Every periodic heartbeat and when touched. | |
|
| |
| Every periodic heartbeat and when touched. | |
| Every periodic heartbeat. | |
| Every periodic heartbeat. | |
|
| |
| Every periodic heartbeat. | |
| Every periodic heartbeat. | |
|
| |
|
| |
|
| |
| Probe wire state change. | |
| See event details. | |
| Every periodic heartbeat and together with trigger-based events. | |
| When a device label is created, modified, or removed. | |
| Changes in connection type. | |
| Changes in the ethernet connection. | |
| Changes in the cellular connection. |
Structure
All event types available through our API use the same outer layer structure, shown in the snippet below, where event metadata is found. Information specific to each event type is found in the data
field.
Field | Type | Description |
|
| The unique identifier of the Event. This can be used to deduplicate events in case the same event is published multiple times. |
|
| The resource name of the source device. Includes both the identifier of the project the device is currently in, and the identifier of the device itself. |
|
| The event type. |
|
| Includes the event data and is specific for each |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
There are four places where events can be encountered in our services.
The
reported
field of a Device when listing devices through REST API.When pushed to a client using the event stream REST API endpoint.
When fetching historical data through the event history REST API endpoint.
When pushed by a Data Connector to another server.
Periodic Heartbeat
All sensors send a Network Status event at a predefined interval depending on sensor type. Depending on the sensor type, this heartbeat may be accompanied by additional events. For instance, the Temperature sensor will also send a Temperature event every heartbeat.
Triggered Events
A few of our sensors are designed to send events immediately at some trigger. These are sent in addition to, but independent of, the periodic heartbeat.
Touch Event for Touch Sensors.
A Network Status Event accompanies each triggered event.
Timestamps
Here are a few notes regarding timestamps and how they are presented in our services.
Timezone Offset
All timestamps fetched using our APIs are always given in UTC and must be accounted for. DT Studio will, however, always shows timestamps depending on user locale.
Format
The RFC 3339 format with fractional seconds is used for our timestamps. This is an internet-specific profile of the ISO 8601 specification, and an example can be seen below.
2021-05-16T08:13:15.361624Z
.
Variations
A result of how our events are structured is that two different timestamp fields can be found in each event when fetching them through our API. The timestamp
and updateTime
fields are located in the outer layer and data
field of an event respectively, but will always contain the same value.
You may use either timestamp
or updateTime
when deciding when an event was received.
A third type, sampleTime
, can only be found within the Temperature Event. These represent the timestamps of inter-heartbeat samples and are estimated by our cloud. Read more.
Event Details
The following event types are available in our APIs. A table of which event types are available per device type and their triggers can be found on the Devices page.
Touch Event
Event Type:
touch
Trigger: When touched.
Most of our devices will send a Touch Event when touched. This can be useful for identification.
An exception to this is Counting Touch Sensors, which aggregate each touch into a Touch Count Event sent every periodic heartbeat. To force a single Touch Event, hold your finger on the sensor for 3 seconds.
The following snippet shows the event data
field content of a touch
event.
Field | Type | Description |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Temperature Event
Event Type:
temperature
Trigger: Every periodic heartbeat or when touched.
Note: 2nd Gen Temperature Sensors and 3rd Gen Temperature Sensors will only send temperature on heartbeats, and not when touched.
The following snippet shows the event data
field content of a temperature
event.
Field | Type | Description |
|
| Temperature value in Celsius. |
|
| A list of temperature samples and timestamps sampled since the previous heartbeat, ordered newest-to-oldest. Its length is equal to the configured samples per heartbeat, which is 1 by default. |
|
| Sample temperature value in Celsius. |
|
| |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
|
| Indicates if the temperature event is backfilled. The backfill feature is supported for Temperature Probe Sensors and Temperature Sensors with Data Backfill. When this field is |
Samples per Heartbeat Configuration
Our 2nd and 3rd generation temperature sensors can be configured to sample up to 30 samples per heartbeat. If enabled, these inter-heartbeat samples will be contained in a list found under the samples
field, accompanied by a timestamp called sampleTime
. By default, if no configuration is enabled, this list contains only the single temperature value and timestamp found in the temperature event. Read more.
Object-Present Event
Event Type:
objectPresent
Trigger: When an object in close proximity appears or disappears.
The following snippet shows the event data
field content of an objectPresent
event.
Field | Type | Description |
|
| Indicates whether an object is |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Humidity Event
Event Type:
humidity
Trigger: Every periodic heartbeat or when touched.
The following snippet shows the event data
field content of a humidity
event.
Field | Type | Description |
|
| Temperature value in Celsius. |
|
| Relative humidity in percent. |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Object Present Count Event
Event Type:
objectPresentCount
Trigger: Every periodic heartbeat.
This event aggregates Object Present Events and sends the total lifetime count every periodic heartbeat.
The following snippet shows the event data
field content of an objectPresentCount
event.
Field | Type | Description |
|
| The total number of times the sensor has detected the appearance or disappearance of an object over its lifetime. This can currently not be reset. |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Touch Count Event
Event Type:
touchCount
Trigger: Every periodic heartbeat.
This event aggregates each Touch Event and sends the total lifetime count every periodic heartbeat. To force a single Touch Event to be sent, hold your finger on the sensor for 3 seconds.
The following snippet shows the event data
field content of a touchCount
event.
Field | Type | Description |
|
| The total number of times the sensor has been touched over its lifetime. This can currently not be reset. |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Water Present Event
Event Type:
waterPresent
Trigger: When the sensor detects the appearance or disappearance of water.
The following snippet shows the event data
field content of a waterPresent
event.
Field | Type | Description |
|
| Indicates whether water is |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
CO2 Event
Event Type:
co2
Trigger: Every periodic heartbeat.
The following snippet shows the event data
field content of a co2
event.
Field | Type | Description |
---|---|---|
|
| CO2 in parts per million. |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Pressure Event
Event Type:
pressure
Trigger: Every periodic heartbeat.
The following snippet shows the event data
field content of a pressure
event.
Field | Type | Description |
---|---|---|
|
| Barometric pressure in Pascal. |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Motion Event
Event Type:
motion
Trigger: Every periodic heartbeat.
The following snippet shows the event data
field content of a motion
event.
Field | Type | Description |
---|---|---|
|
| Indicates whether |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Desk Occupancy Event
Event Type:
deskOccupancy
Trigger: When the state changes between
OCCUPIED
andNOT_OCCUPIED
.
The following snippet shows the event data
field content of a deskOccupancy
event.
Field | Type | Description |
---|---|---|
|
| Indicates whether the sensors reports |
|
| Additional information about the estimated |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Remarks
We use the remarks
field to relay additional information to the user about the estimated state
field in the deskOccupancy
event. If the field is empty, nothing is out of the ordinary.
The remarks
field can contain none, one, or a combination of the following remarks.
INCOMPLETE_DATA
: The model has determined that the occupancy accuracy may be degraded due to insufficient data. If your connection is poor, we recommend using a Range Extender to improve the connection or adding one or more additional Cloud Connectors to extend your coverage.
Remarks are automatically highlighted in DT Studio as shown in the figure below.
Contact Event
Event Type:
contact
Trigger: When the state of a
contact
sensor changes betweenOPEN
andCLOSED
.
The following snippet shows the event data
field content of a contact
event.
Field | Type | Description |
---|---|---|
|
| Indicates whether the sensors reports |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Probe Wire Status Event
Event Type:
probeWireStatus
Trigger: When wires are plugged in or unplugged from a
temperature
probe sensor.
These are the possible state values for the event:
State | Description |
---|---|
| A 2-wire probe has been connected to the sensor. |
| A 3-wire probe has been connected to the sensor. |
| A 4-wire probe has been connected to the sensor. |
| Either too few wires are connected to the sensor, or the wires are connected to the wrong terminals. Look at the Datasheet for more information. |
| The coefficient configuration in Studio does not match the probe that's connected to the sensor. This may happen if a PT100 probe is connected to the sensor, but the coefficients for a PT1000 probe is configured in Studio. |
The following snippet shows the event data
field content of a probeWireStatus
event.
Field | Type | Description |
---|---|---|
|
| Indicates whether the probe wire state is |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Network Status Event
Event Type:
networkStatus
Trigger: Every periodic heartbeat.
This event describes the current connectivity state of a sensor. It is sent in addition to other events and contains information like the signal strength to the Cloud Connector it propagated through.
Proximity to multiple Cloud Connectors
One networkStatus
event is sent for each Cloud Connector that heard the sensor. As shown in the snippet below, when fetching events through a stream, Data Connector, or event history, each networkStatus
event contains only a single entry in the cloudConnectors
field. When listing a device, these individual networkStatus
events are merged and all displayed in the reported
field.
The following snippet shows the event data
field content of a networkStatus
event.
Field | Type | Description |
|
| The percentage signal strength (0% to 100%) of the strongest Cloud Connector, derived directly from the RSSI value. |
|
| Raw Received Signal Strength Indication as measured by the Cloud Connector with the strongest signal. |
|
| The Cloud Connector that forwarded the event. |
|
| Unique Cloud Connector identifier. |
|
| The percentage signal strength (0% to 100%) between the sensor and Cloud Connector. |
|
| Raw Received Signal Strength Indication between the sensor and Cloud Connector. |
|
| Indicated whether the sensor is in |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Battery Status Event
Event Type:
batteryStatus
Trigger: Approximately once per day.
The following snippet shows the event data
field content of a batteryStatus
event.
Field | Type | Description |
|
| A coarse percentage estimate (0% to 100%) of the remaining battery. |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Labels Changed Event
Event Type:
labelsChanged
Trigger: When a device label is added, modified, or removed.
The following snippet shows the event data
field content of a labelsChanged
event.
Field | Type | Description |
|
| Key- and value pairs of new labels added, both of |
|
| Key- and value pairs of modified labels, both of |
|
| A list of keys of removed labels. |
Connection Status Event
Event Type:
connectionStatus
Trigger: Changes in connection for a Sensor or Cloud Connector.
This event is sent when a Sensor or Cloud Connector changes which type of connection it has. This is the recommended way to determine if a device is online or offline.
These are the possible status values for a device's connection status:
Connection | Description |
---|---|
| Used for Sensors when they are online. SDS is the Secure Data Shot protocol. |
| Used for Cloud Connectors when they are online and communicate to the Cloud through an ethernet cable. |
| Used for Cloud Connectors when they are online and communicate to the Cloud through a cellular connection. Note that a cellular connection might have a higher latency than an ethernet connection, so prefer to use an ethernet cable whenever possible. |
| Used for both Sensors and Cloud Connectors when they are determined to be offline. Cloud Connectors are determined to be offline 5–15 minutes after they've lost their connection to the Cloud. Sensors are determined to be offline once the Cloud hasn't received a Periodic Heartbeat within the expected time period, depending on the heartbeat interval of the sensor. The current threshold is |
For a Cloud Connector, if both ETHERNET
and CELLULAR
connections are available, ETHERNET
is prioritized.
The following snippet shows the event data
field content of a connectionStatus
event for a Cloud Connector that is connected through ETHERNET
.
Field | Type | Description |
|
| Whether the current connection is |
|
| A list of the |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Ethernet Status Event
Event Type:
ethernetStatus
Trigger: Changes in Cloud Connector ethernet connection.
This event is sent when the ethernet status for a Cloud Connector changes, such as when it gets connected to ethernet or when it receives a new IP address. Note that this means that a Cloud Connector has to be connected to ethernet at least once to get the MAC address of the Cloud Connector through an ethernetStatus
event.
The information in this event can be useful for locating a Cloud Connector on the local network or open the necessary ports in a corporate firewall.
The following snippet shows the event data
field content of an ethernetStatus
event.
Field | Type | Description |
|
| The MAC address of the local network interface. |
|
| The IP address of the Cloud Connector on the local network. |
|
| Any errors related to connecting to the local network. |
|
| Error status code. |
|
| A description of the error. |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Cellular Status Event
Event Type:
cellularStatus
Trigger: Changes in Cloud Connector cellular connection.
The following snippet shows the event data
field content of a cellularStatus
event.
Field | Type | Description |
|
| Cellular reception signal strength (0% to 100%) of the Cloud Connector. |
|
| Any errors related to connecting to the local network. |
|
| Error status code. |
|
| A description of the error. |
|
| Timestamp of when a Cloud Connector received the event, represented on the RFC 3339 format. |
Last updated