Skip to content

Notifications

SmartSafety uses so-called Notifications as channels to send alarm notifications. alerts. Currently SmartSafety supports the following channels:

  • EMail
  • SMS
  • Rescuedevice
  • Telegram
  • Slack
  • Webhook

You can create a notification with one of these types at any time and configure it via the parameters to configure it. Of course you can also create multiple notifications with the the same type, just as you like.

Info

When making changes or creating new notifications, please note that you must always click on the right on top to click on the SAVE button, so that your inputs are also taken over.

Standard fields

Every notification consists of a name and a description and also always of a so-called alarm up message. so called Alarm up message and an Alarm down message. These messages are always added to a notification, depending on the type of notification it is. it is about.

Depending on the type of notification, additional information must then be specified, which is specific to the type of notification channel.

EMail

An email notification is used to send an alarm to one or more recipients. recipients.

EMail Notification

The recipient data contains email addresses, which can be separated by a comma or a space. separated by a comma or a space. With the button Send Test Message you can send a test message to check if the message to check if the recipient address(es) are correct.

SMS

An SMS notification is equivalent to an email notification, except that the recipient recipient(s) list consists of phone numbers. Please note that they must be sent according to the international standard with the corresponding prefix, e.g. +49... or 0049.... or 0049... for a German phone number.

Please do not forget that with SMS notifications only a limited number of characters can be transmitted. can be transmitted. There is also a charge for each SMS.

Rescuedevice

A rescuedevice is a specially marked tracker. These have a display with a map and can be used by rescue units in order to reach the navigate to the scene of the accident in case of an alarm.

If such devices are included in your contract, you can select and add them in the list ‘IMEI List` and add them.

Telegram

Telegram is a channel with which you can easily save costs. This channel allows you to send the alarms in a Telegram chat. You can then very easily maintain your contacts in the Telegram chat with the help of Telegram.

  1. to link the channel to a chat, first install Telegram on your cell phone and create a chat with the desired people who should receive your message you want to receive.
  2. then add our ChatBot with the name @ProtegearBot.
  3. send as message “/chatid”, as answer you will get a number, e.g. -1234567
  4. enter this ID in the Telegram Chat ID field
  5. please check with Send Test Message if our system is able to send a message to your chat to your chat
  6. telegram supports a subset of HTML tags that you can use.

Telegram Notification

Slack

Slack is a team collaboration platform. There you can set up a workspace for free or use an already existing workspace to receive messages from SmartSafety.

In contrast to the other channels, Slack supports not only static texts for the alarm UP/DOWN but also the entry of static texts but the input of templates. You can therefore create dynamic messages messages, e.g. the last known position of the device or the alarm type. included.

To receive a Slack notification, you must first create a [incoming web message] in your Slack workspace. incoming webhook in your Slack workspace (please note that in note that you need the necessary permissions in Slack to do this). During the configuration within Slack you can e.g. configure in which channel in the Slack workspace is written to. Once the webhook is configured, you only need to enter the URL displayed in Slack in the field that appears:

Slack Notification

Tip

Please make sure that the URL is correct by clicking on ‘Test URL’. after pressing the button a test message should appear in the Slack channel.

Webhook

All previous channels were human-machine interfaces, i.e. Smartsafety sent messages whose recipients are usually humans who read and interpret them. interpret them. However, it may also be necessary for SmartSafety to notify other IT systems. to notify other IT systems. For this purpose, so-called Webhooks are provided. Here you can URL of a system and SmartSafety sends a HTTP POST to the specified address. specified address. The body of the request contains a lot of information about the current status of the trace and the device. status of the trace and the device. For more detailed information about the data format please contact Contact.

Webhook Notification

Once the target system is deployed on the Internet you can enter the URL of the system in the field URL of Webhook. Now a click on Test URL should work and send test data.

However, this communication is completely unprotected and so not recommended. SmartSafety therefore supports two types of protection:

Preshared Key

You can specify header fields that are passed through by SmartSafety. In this way for example, it is possible for your system to specify an API-KEY header with the value my-secret-key123. To do this, enter in the Headers field the value API-KEY=my-secret-key123 in the Headers field. This header will then be passed with each call.

Preshared Key with HMAC

Alternatively, a secret key can be generated that is used to calculate an HMAC code. a HMAC code. To do this, click on the small icon on the right in the field Secret for HMAC Security (Caution: If you already have a working communication via HMAC, a new generation of the key may cause this communication to stop may cause this communication to stop).

SmartSafety sends two headers with each request:

  • X-GST-Time
  • X-GST-MAC

Use the value from X-GST-Time and the secret from the configuration of the webhook to calculate a HMAC. If the HMAC you compute is identical to the one in the header X-GST-MAC, then you can be sure that your system was called by SmartSafety was called.

Here is an example in python which contains the HMAC key cPtlzGBTjICTrYcW5OhOKTtogbG7O2un and the runtime timestamp 2021-08-08T14:59:53.965246695Z to calculate a to compute a HMAC.

~~python import hashlib, hmac message = bytes(‘2021-08-08T14:59:53.965246695Z’,’utf-8’) secret = bytes(‘cPtlzGBTjICTrYcW5OhOKTtogbG7O2un’,’utf-8’) sig = hmac.new(secret, message, digestmod=hashlib.sha256).digest().hex() print(f’“{sig}”’) “3520543b5a93e37eb7ece79435f2376059cf3af4564d64c40f3a69e1e7d26c7b” ~~~