Alarm Event Notification not working on Web on Traccar Server 4.2

Atul Kuruvilla6 years ago

Hi,

Traccar Server version: 4.2
I am looking for help with an issue with Notifications. I configured an Alarm notification to trigger on Web as well as Mail, but though the alarm event gets triggered in the server (I am able to see the event in Event report), the notification does not show on the Web as well as Email.

However the status online notification type works fine for both web and mail.

Would appreciate any pointers on how I might be able to get the Alarm event notification working.

Thanks!

Atul Kuruvilla6 years ago

P.S: This was not an issue in Traccar 4.0. The Alarm event notification was working fine on both Web as well as Mail

Anton Tananaev6 years ago

If you provide some information on what exactly you have configured in settings, we might be able to help you. Ideally screenshots.

Atul Kuruvilla6 years ago

Notification Settings

Notification Settings

Notification is selected for the Device in question

Notification is selected for the Device in question

Alarm Events in Reports showing correctly
Alarm Events in Reports showing correctly

Atul Kuruvilla6 years ago

Nothing in Events
Nothing in Events

Enirh6 years ago

@Atul,

Try specifying the alarm types in the settings that you want to monitor.

Anton Tananaev6 years ago

You haven't set alarm types.

Atul Kuruvilla6 years ago

@Anton,

We are using a custom attribute (in computed attributes) based on an expression to trigger the alarm event. We are not sure what is the alarm type in such a scenario. The default type in the computed attributes while setting alarm is "String", but we do not see such a type in settings to choose from.

Atul Kuruvilla6 years ago

The computed attributes when Alarm is selected it shows only String as option.

Computed Attributes

Anton Tananaev6 years ago

Alarm is a string only attribute. You need to use alarm keys:

https://github.com/traccar/traccar/blob/master/src/org/traccar/model/Position.java#L102-L140

Atul Kuruvilla6 years ago

Thanks a lot Anton, that helped us get the notification event working,

But in our scenario, we are trying to send an email notification using the alarm event with a value from one of the attributes that is being captured from the android client.

Can we write an expression to post the value of the custom attribute along with the Alarm type, so that the email will contain the value of the custom attribute as well.

As in the screenshot we need to send this value of the Customer attribute as an email notification to the user.

As in the screenshot we need to send this value of the Customer attribute as an email notification to the user.

Atul Kuruvilla6 years ago

We got the work around for it. Updated the email template with the attribute value we wanted to show in the mail. Everything is working fine. Thanks a ton for the help.

Ali Raza4 years ago

Hi, I'm using Teltonika FMB920. This device sends an event named "io253" whose value if = 1,2, or 3 refer to as "hard, acceleration, braking and cornering" respectively.
I've created an alarm using "Computed Attributes" like below:

Alarm
io253 == "2" ? "Hard Braking" : null
String

It is showing in the left STATE-PANEL and reports but these alarms are not displaying as web or email notifications since upgraded from Traccar version 4.0 to 4.8.

All other notifications are just working fine. I also see there hard braking and acceleration and such other alarms types are already available in drop-down menu of Notification settings, I tried but still not able to get notifications.

I read this thread and thought this may be also problem of setting up the new alarm types. Do we need to edit config file or can be done from the web interface.

@Anton @ Atul
Can anyone help, how to setup the ALARM-KEYS or TYPES in order to get notifications of these custom alarms? Thanks for help in advance

Anton Tananaev4 years ago