This guide will show you how to set up email messages in Studio using the Notifications feature. Through notifications, customized emails can be sent about specific sensor events, for example to:
- Know when a Cloud Connector or a sensor is offline
- Send an alert when a freezer is too hot
- Alert security when a window opens
- Notify a maintenance team if there is a water leakage
- Be aware when someone presses a service button
What you need
- Access to Studio
- A user account with Project developer or Project administrator permissions
- In Studio, select the Notifications tab
- Select Create a new notification
- Choose a suitable name
- Select Trigger
- Select Schedule (Optional)
- Select Add devices
- Select Add recipients
- Click Save Notification in the right-hand corner
Select the event that will trigger the notification.
|Triggered when the temperature is above, below, outside, or within the defined range.
|When the sensor is covered within 5mm, it is triggered if set to True.
Triggered when the sensor stops being covered if set to False.
|Proximity sensor (Counting Proximity sensor is not supported)
|Notifications will be sent when a sensor reaches the set count of open events. The counter resets when the notification has been sent.
|Notifications will be sent when a sensor is touched.
|All small sensors
|Notifications will be sent when a sensor reaches the set count of touches. The counter resets when the notification has been sent.
Touch Sensor, Tactile Touch Sensor
|Triggered when the humidity is above, below, outside, or within the defined range.
|Humidity, CO2 Sensor
|It is triggered when the sensor is covered with water if set to True.
Triggered when the sensor stops being covered with water if set to False.
|It is triggered when the sensor detects motion if the state is set to Motion detected.
It is triggered when the sensor does not detect motion if the state is set to No motion detected.
|Triggered when the CO2 level is above, below, outside, or within the defined PPM range.
|It is triggered when the sensor detects occupancy if the state is set to Occupied.
It is triggered when the sensor does not detect occupancy if the state is set to Not occupied.
|Desk Occupancy sensor
|Offline Monitoring (Beta)
Triggered when a Cloud Connector or a sensor is offline.
For Cloud Connectors: Notifications are triggered when a Cloud Connector has been offline for an extended period of time (5-15 minutes) and is unable to forward sensor events.
For sensors: Notifications are triggered when a sensor loses connection to its Cloud Connectors (eg. due to a depleted battery or going out of range). However, if the Cloud Connector itself goes offline, you won't receive individual sensor notifications.
|All sensors and Cloud Connectors
Adding a trigger delay
Notifications can trigger immediately, or after a delay, e.g., the temperature remains above 40°C for 1 hour and 30 minutes, or a door remains open for more than an hour. The maximum delay is 72 hours.
Updating a notification while a sensor is in the triggering state
If you update the trigger, trigger delay, or schedule while a device in the Notification is triggering*, that state will be ignored, and no e-mail will be sent.
- Your Notification is set to send an e-mail whenever a temperature sensor has sent temperature events above 4°C for 1 hour
- You decide to update this Notification to get notified when all temperature sensor events have been above 4°C for 2 hours
- At the time you update the Notification, one of your sensors has already sent temperature events above 4°C for 30 minutes; and is thus, in the triggering state
- To avoid false alerts, the fact that this sensor is currently triggering will be ignored, and no e-mail will go out.
- The temperature sensor goes below 4°C
- The temperature sensor is above 4°C for 2 hours
- The trigger is set to true for two hours, and an email notification is sent.
* Triggering means that the trigger for a device is set to true. You can see the trigger status in the list of devices.
Optionally, you can set a schedule for when the triggers can happen by selecting the desired days and timeslots in the drop-down menus. Notifications triggered outside the set timeslots are not delivered.
Set the schedule to apply for local time or UTC by toggling the option in the right-hand corner.
Add all devices that the notification shall apply to by selecting Add Devices. You will then get a list view of all your devices, similar to the Sensors & Cloud Connectors overview. Add the devices by choosing the (+) to the left of the sensor name.
Currently, sending an email is the only action available. Fill out the recipients, the subject, and the body text to include in the email.
You can add variables to the notification text to include relevant information for the device. Supported variables are:
|Name of the device.
The device ID is displayed if there is no name.
|Description of the device.
|Mounted on the top of the fridge.
|The ID of the device.
|The temperature (°C).
|The temperature (°F).
|The humidity (%RH).
|The status displayed in Studio for proximity sensors ("open" or "closed")
|The status displayed in the API for proximity sensors ("not present" or "present")
|The status displayed in Studio for water sensors ("water present" or "no water present")
|no water present
|The value of a Label for a device.
|If a device has a Label where Key=room and value=34A, then $label.room displays the value 34A
|The status displayed in Studio for Desk Occupancy sensors ("occupied" or "not occupied")
|The status displayed in Studio for Motion sensors ("motion detected" or "no motion detected")
|No motion detected
CO2 sensor value in PPM
|Can be used if the “Resolved Notification” toggle is enabled where a notification is sent when the trigger is resolved. $triggerStatus will then either be “Triggering” or “Resolved”.
How to include the Studio link in the email
It can be valuable to have a link in the notification email for quick access to the sensor details in Studio. A simple way to achieve this is to put the link (URL) for the sensor in the description field of the sensor and include it in the message.
Step 1 - Add the sensor link (URL) to the sensor description
- Open the detailed view for a device in Studio
- Copy the URL from the browser address (typically at the top)
- Paste the URL into the description field for the sensor
Step 2 - Include the description field in the email
- Open the Notification rule
- Go to the "Send Email" section
- Include the $description placeholder in the Email body. It should look something like this:
- Save by selecting "Update Notification"
- Emails sent out will now include a link to the device in Studio
Note that the recipient needs a Studio account to access the device and that you could do a similar approach using Labels.
Tip - emulated sensors
Use emulated sensors to test out your notifications with different values.