Notifications

Notifications is the way to notify users about events.

Notification is standard traccar object that can be created by user and linked to other objects (devices and groups).

Type field corresponds to Event type.

All Devices means that notification will be sent from all user devices, if it is not set the Notification will be sent from only device/group it is linked to.

Any available channels (notificators) can be selected.

Also can be selected Calendar to limit notification working hours.

Push Notifications

Push notifications are available since Traccar version 4.1. Notifications are sent through Firebase platform.

There are two options for push notifications in Traccar:

To receive notifications to the official Traccar Manager app from Google Play all you need to do is configure Traccar with the following parameters:

<entry key='notificator.types'>web,mail,traccar</entry>
<entry key='notificator.traccar.key'>TRACCAR_KEY</entry>

You can find your personal API key on the Account page. You need to be registered on the website.

To receive Firebase push notifications directly you need a custom mobile app that is built with your Firebase keys. Server configuration for direct Firebase notifications should look like this:

<entry key='notificator.types'>web,mail,firebase</entry>
<entry key='notificator.firebase.key'>FIREBASE_KEY</entry>

Web Notifications

Web notification is a simple pop-up window in the web interface or mobile app.

Web notifications are delivered instantly without any delays. It is possible enable sound for the notifications to attract attention of the user.

Email Notifications

There are two ways to configure email notifications:

All possible parameters are listed in the configuration file documentation (see mail.smtp.* parameters).

Tips:

Examples:

Use SSL server-wide:

<entry key='mail.smtp.host'>smtp.gmail.com</entry>
<entry key='mail.smtp.port'>465</entry>
<entry key='mail.smtp.ssl.enable'>true</entry>
<entry key='mail.smtp.from'>traccar@gmail.com</entry>
<entry key='mail.smtp.auth'>true</entry>
<entry key='mail.smtp.username'>traccar@gmail.com</entry>
<entry key='mail.smtp.password'>password</entry>

Use STARTTLS server-wide:

<entry key='mail.smtp.host'>smtp.gmail.com</entry>
<entry key='mail.smtp.port'>587</entry>
<entry key='mail.smtp.starttls.enable'>true</entry>
<entry key='mail.smtp.from'>traccar@gmail.com</entry>
<entry key='mail.smtp.auth'>true</entry>
<entry key='mail.smtp.username'>traccar@gmail.com</entry>
<entry key='mail.smtp.password'>password</entry>

Use SSL per-user:

SMS Notifications

SMS notifications are available since Traccar version 3.11. Originally Traccar required SMPP service for SMS, but since version 4.12 only HTTP SMS APIs are supported.

Tips:

Example:

<entry key='sms.http.url'>https://www.traccar.org/sms/</entry>
<entry key='sms.http.authorization'>TOKEN</entry>
<entry key='sms.http.template'>
    {
        "to": "{phone}",
        "message": "{message}"
    }
</entry>

Templates

Traccar uses Velocity Engine for email and SMS notification templates (Velocity User Guide).

Templates can be easily adjusted to your needs or translated.

You do not need configure anything by default, but if you want you can change templates root folder.

Templates (*.vm) files must be in UTF-8 encoding.

Testing

You can send test message via all currently available notificators in your account dialog: