Notifications¶
SmartSafety uses so-called notifications as channels to send alarm notifications send. SmartSafety currently supports the following channels:
- SMS
- Rescue device
- Telegram
- Slack
- Webhook
You can create a notification with one of these types at any time and send it via Parameter can be configured specifically. Of course, you can also configure multiple notifications with the the same type, just as you like.
Standard fields¶
In addition to a name and a description, each notification always consists of a
so-called Alarm up message
and one Alarm down message
. These messages are
always added to a notification, depending on the type of notification
is involved. You can also specify that when you receive a notification about this
Channel no position information is transmitted.
Depending on the type of notification, additional information must then be entered, which is specific to the type of notification channel.
E-mail¶
An e-mail notification is used to send an alarm to one or more recipients send.
The recipient data contains e-mail addresses that are separated by a comma or a space
can be entered separately. You can use the Send Test Message
button to enter a
Have a test message sent to check whether the recipient address(es) are correct.
SMS¶
An SMS notification is equivalent to an e-mail notification, except that the
Recipient (list) consists of telephone numbers. Please note that these will be deleted after the
international standard must be specified with the corresponding prefix, e.g. with +49...
or 0049...
starting for a German telephone number.
Please remember that an SMS notification can only contain a limited number of characters can be transmitted. Costs are also incurred for each SMS.
Rescue device¶
Rescue devices are specially labelled trackers. These have usually have a display with a map display and can be used by rescue units to navigate precisely to the scene of an accident in the event of an alarm.
If such devices are included in your contract, you can find them in the ‘IMEI Select ‘List’ and add.
Telegram¶
Telegram is a channel that allows you to save costs very easily. This channel allows you to send the alarms in a Telegram chat. You can then very easily maintain their contacts in the Telegram chat with the help of Telegram.
- To link the channel to a chat, first install Telegram on your computer Mobile phone and create a chat with the people you want, who will receive your Should receive a message.
- Then add our chatbot with the name @ProtegearBot.
- Send “/chatid” as a message and a number will be displayed in response, e.g. -1234567
- Enter this ID in the
Telegram Chat ID
field - Please check with
Send Test Message
whether our system has sent a message to your chat can send - Telegram supports a subset of HTML tags that you can use.
Slack¶
Slack is a platform for team collaboration. You can use it to set up a workspace free of charge or use an existing workspace to Receive messages from SmartSafety.
In contrast to the other channels, Slack not only supports the alarm UP/DOWN static texts, but the input of templates. You can therefore create dynamic messages which, for example, indicate the last known position of the device or the alarm type include. To use a predefined template, you can click on the use *Default message templates*. Attention: The current text of the alarm messages is displayed here overwritten. If you do not want this to happen, exit the dialogue without saving.
To receive a Slack notification, you must first be logged into your Slack workspace create a so-called inbound webhook (please please note that you need the necessary authorisations in Slack to do this). With the Configuration within Slack, for example, you can configure in which channel in the Slack Workspace is written. Once the webhook is configured, you only need to configure the enter the URL displayed in Slack in the field shown:
Tip
Please make sure that the URL is correct by clicking on Test
; after
after pressing the button, a test message should appear in the Slack channel.
Webhook¶
All previous channels were human-machine interfaces, i.e. Smartsafety has messages whose recipients are usually people who read and analyse them interpret. However, it may also be necessary for SmartSafety to integrate other IT systems should be notified. So-called webhooks are provided for this purpose. Here you can You specify a URL of a system and SmartSafety sends an HTTP POST to the specified address. The body of the request contains a lot of information about the current Status of the trace and the device. For more detailed information about the Data format, please contact us.
As soon as the target system is available on the Internet, you can enter the URL of the system in the
Enter the URL of Webhook
field. Now a click on Test URL
should work and
Send test data.
However, this communication is completely unprotected and therefore not recommended. SmartSafety therefore supports two types of protection:
Preshared Key¶
You can define header fields that are passed through by SmartSafety. This is how
it is possible, for example, that your system contains a header API-KEY
with the value
my-secret-key123
is expected. To do this, in the Headers
field, enter the value
API-KEY=my-secret-key123
. This header is then transferred with every call.
Preshared Key with HMAC¶
Alternatively, a secret key can also be generated which is used to calculate the
of an HMAC code is used. To do this, click on the small symbol on the right in the field
Secret for HMAC Security
(Attention: If you already have a working
Communication via HMAC, a new generation of the key will not affect this communication
may cause it to fail)
SmartSafety sends two headers with every 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 an HMAC. If the HMAC you have calculated is identical to the one in the
Header X-GST-MAC
, you can be sure that your system is protected by
SmartSafety was called.
Here is an example in python
which uses the HMAC key cPtlzGBTjICTrYcW5OhOKTtogbG7O2un
and the timestamp 2021-08-08T14:59:53.965246695Z
received at runtime in order to
to calculate an HMAC.
1 2 3 4 5 6 |
|