Hello Traccar Community,
I am currently trying to implement a custom attribute for detecting hard braking events in my Traccar system. I have defined the following expression for the 'alarm' attribute:
Attribute: alarm
Expression:
var speedThreshold = 20;
var timeThreshold = 5;
var isHardBraking = speed > speedThreshold && time > timeThreshold;
isHardBraking ? "Hard braking detected" : null;
Type: String
I would appreciate it if anyone could guide me on how this attribute works and if there are any specific considerations I need to keep in mind while using it. I want to ensure that the attribute accurately detects hard braking events based on the defined speed and time thresholds.
Your insights and suggestions on how to fine-tune this attribute would be highly valuable. Thank you in advance for your help.
Ok so any idea how I can do this?
You can't do what you want just with computed attributes.
Hello Traccar Community,
I am currently trying to implement a custom attribute for detecting hard braking events in my Traccar system. I have defined the following expression for the 'alarm' attribute:
Attribute: alarm
Expression:
var speedThreshold = 20; // Define the speed threshold for hard braking in km/h var timeThreshold = 5; // Define the time threshold in seconds var isHardBraking = speed > speedThreshold && time > timeThreshold; isHardBraking ? "Hard braking detected" : null;
Type: String
I would appreciate it if anyone could guide me on how this attribute works and if there are any specific considerations I need to keep in mind while using it. I want to ensure that the attribute accurately detects hard braking events based on the defined speed and time thresholds.
Your insights and suggestions on how to fine-tune this attribute would be highly valuable. Thank you in advance for your help.