Notification on hard stop/brake

Nikiu7 years ago

Is there any notification about the hard brake of the car? For example, the car is going with 90 kmph and it crashes, suddenly stops. I need a notification on that occasion. Is it possible? I can't seem to find it.

Anton Tananaev7 years ago

Yes, Traccar can handle it if your device supports this kind of event.

Nikiu7 years ago

As I mentioned in another post, I use Teltonika FM1202 and it supports such an event. We already get such notifications on some of our cars that we have on TAVL4.

But what do I need to configure on Traccar so it relies this event via email to the user?

Anton Tananaev7 years ago

For Teltonika it's not supported in decoder directly, but you should be able to use computed attributes to enable this event.

Nikiu7 years ago

Is it this one?

public static final String ALARM_BREAKING = "hardBreaking";

Got it from Position.java

Anton Tananaev7 years ago

Yes, it is.

Nikiu7 years ago

I can't seem to make it work. Can you create a computed attribute here so I work on it? Thanks in advance.

Anton Tananaev7 years ago

If you provide example of what you tried I might be able to help you.

Nikiu7 years ago

Description: Hard Break

Attribute: Alarm

Expression: hardBreaking

Type: string

I know, I'm stupid.

Anton Tananaev7 years ago

Hmm... obviously you need to map whatever event code or parameter Teltonika sends to the alarm key. Without knowing what it sends I won't be able to help you.

Nikiu7 years ago

I get this error message when I try to test the computed attribute.

org.traccar.processing.ComputedAttributesHandler.computeAttribute@84![0,11]: 'hardBraking;' undefined variable hardBraking - Variable (... < ComputedAttributesHandler:84 < AttributeResource:51 < ...)

Tried to find what Teltonika sends but google wasn't of much help.

Nikiu7 years ago

Same thing with other alarms which are in lowercase letters, like shock and accident.

Anton Tananaev7 years ago

Alarm key is a string, so it should be in double-quotes.

Nikiu7 years ago

Now, when I put the expression in double quotes and when I check the computed attribute, it gives back a window with the name of the attribute. Check the screenshot for more info.

alt text

Is this OK now? As I'm not getting any email.

Anton Tananaev7 years ago

Looks fine. Do you have an SMTP server configured? Have you enabled alarms in the settings?