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:
- 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
- Know when a Cloud Connector is offline
What you need
- Access to Studio
- A user account with Project developer or Project administrator permissions
Steps
- 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 trigger
Select the event that will trigger the notification.
Trigger | Description | Devices |
Touched | Triggered when a sensor or Cloud Connector is touched | All sensors and Cloud Connectors (counting variants require a 4-second touch) |
Temperature | Triggered when the temperature is above, below, outside, or within the defined range. | Temperature, EN12830/330s, Humidity, Industrial Temperature, Temperature (Gen 2) |
Relative Humidity | Triggered when the humidity is above, below, outside, or within the defined range. | Humidity |
Object Present | 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 (Counting Proximity is not supported) |
Water Detected | 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. |
Water Detector |
Device Monitoring (Beta) | Triggered when a Cloud Connector is offline. | All 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.
Example:
-
- 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 temperatures 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.
Schedule
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 devices
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.
Add recipients
Currently, sending an email is the only action available. Fill out the recipients, the subject, and the body text to include in the email.
Variables
You can add variables to the notification text to include relevant information for the device. Supported variables are:
Placeholder | Description | Example |
$name | Name of the device. The device ID is displayed if there is no name. |
Fridge 3 |
$description | Description of the device. | Mounted on the top of the fridge. |
$deviceID | The ID of the device. | bivd53b1e97600enrts0 |
$celsius | The temperature (°C). | 12.70°C |
$fahrenheit | The temperature (°F). | 12.70°F |
$relativeHumidity | The humidity (%RH). | 87 %RH |
$proximityStatus | The status displayed in Studio for proximity sensors ("open" or "closed") | Closed |
$objectPresent | The status displayed in the API for proximity sensors ("not present" or "present") | not present |
$waterPresent | The status displayed in Studio for water sensors ("water present" or "no water present") |
no water present |
$label.{labelKey} | 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 |
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.