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.

Web

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

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

SMS notifications are available since Traccar version 3.11. You need an SMPP service to enable SMS notifications in Traccar.

Some additional information about using SMS as notification can be found in Notificators documentation.

You need access to an SMPP server. Most of the major mobile service providers have SMPP servers. Alternatively you can install own proprietary or open source sever to send SMS via modem or mobile phone.

There are quite a few configuration paremeters required for SMS notifications. All possible parameters are listed in the configuration file documentation (see sms.smpp.* parameters).

Tips:

Examples:

<entry key='sms.enable'>true</entry>
<entry key='sms.smpp.host'>smpp.example.com</entry>
<entry key='sms.smpp.port'>2345</entry>
<entry key='sms.smpp.username'>systemId</entry>
<entry key='sms.smpp.password'>password</entry>
<entry key='sms.smpp.notificationsCharset'>GSM</entry>
<entry key='sms.smpp.notificationsDataCoding'>0</entry>
<entry key='sms.smpp.sourceAddress'>+79000000000</entry>

Push notifications

Push notifications are available since Traccar version 4.1. Notifications are sent through Firebase platform. To receive notifications you need to have recent version of Traccar Manager app installed.

To send notifications from server, a Firebase server key is required. It has to be the key linked to the same Firebase project that mobile apps a built against. Note that it means that if you want to enable it on your own server, most likely you need to build your own versions of the mobile apps, with corresponding Firebase keys. We are working on a way to enable push notifications to official Traccar mobile apps without a server key, but it's not available at the moment.

Configuraition example for push notifications:

<entry key='notificator.types'>web,mail,firebase</entry>
<entry key='notificator.firebase.key'>FIREBASE_SERVER_KEY</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: