Hello Traccar team,
I would like to suggest a feature related to computed attributes and notifications.
I am currently using computed attributes to detect conditions that are not directly provided by the GPS device. For example, I created a computed attribute to detect when a vehicle has poor or no satellite visibility.
The computed attribute works well for displaying the status in the vehicle information popup. However, I would also like this condition to generate an event and trigger a notification.
As I understand it, the current approach is to create an alarm computed attribute and return one of the existing alarm keys. For example:
satellites < 3 ? "tampering" : null
This works technically, but tampering is not semantically related to the actual condition. In this example, the real event would be something like:
noGps
or:
noSatelliteVisibility
I understand that Traccar currently uses predefined alarm types for notifications, and that a computed event attribute by itself does not generate a server-side event.
Would it be possible to add support for custom alarm/event types that can be created and used with computed attributes?
For example, an administrator could define a custom alarm such as:
noSatelliteVisibility — No satellite visibility
lowFuel — Low fuel
highCoolantTemperature — High coolant temperature
customDoorOpen — Door opened
externalBatteryLow — External battery voltage low
Then a computed attribute could simply return:
satellites < 3 ? "noSatelliteVisibility" : null
And this custom alarm could be selected when creating a notification, just like the existing built-in alarm types.
Ideally, the administrator could also define the display name and possibly the notification message for the custom alarm.
I believe this would make computed attributes considerably more useful for creating server-side business rules without having to repurpose an unrelated built-in alarm such as tampering.
Would this be something that could be considered for a future version of Traccar?
Thank you!
Hello Traccar team,
I would like to suggest a feature related to computed attributes and notifications.
I am currently using computed attributes to detect conditions that are not directly provided by the GPS device. For example, I created a computed attribute to detect when a vehicle has poor or no satellite visibility.
The computed attribute works well for displaying the status in the vehicle information popup. However, I would also like this condition to generate an event and trigger a notification.
As I understand it, the current approach is to create an
alarmcomputed attribute and return one of the existing alarm keys. For example:This works technically, but
tamperingis not semantically related to the actual condition. In this example, the real event would be something like:or:
I understand that Traccar currently uses predefined alarm types for notifications, and that a computed
eventattribute by itself does not generate a server-side event.Would it be possible to add support for custom alarm/event types that can be created and used with computed attributes?
For example, an administrator could define a custom alarm such as:
noSatelliteVisibility— No satellite visibilitylowFuel— Low fuelhighCoolantTemperature— High coolant temperaturecustomDoorOpen— Door openedexternalBatteryLow— External battery voltage lowThen a computed attribute could simply return:
And this custom alarm could be selected when creating a notification, just like the existing built-in alarm types.
Ideally, the administrator could also define the display name and possibly the notification message for the custom alarm.
I believe this would make computed attributes considerably more useful for creating server-side business rules without having to repurpose an unrelated built-in alarm such as
tampering.Would this be something that could be considered for a future version of Traccar?
Thank you!