Configure Trip duration on front-end

Nunosan9992 years ago

Hi,

I would like to be able to configure the duration and/or distance of a stop, via the front-end of Traccar, ie, I want users to be able to change what is considered a stop on a regular basis, without needing to go to the configuration file or changing the device configuration. From what I read on the "Motion" documentation I understood that this can be done using "Computed Attributes". Adding an entry like:

Attribute: Motion
Expression: report.trip.minimalTripDuration = 100 : true
Type: Boolean

Meaning the minimal trip duration would be overriden from the default 300 seconds to 100 seconds. And a user would be able to edit this attribute whenever necessary via the front-end. Is this correct?

I am not familiar with the syntax for the expression so I would appreciate some advice.

Thanks in advance!

Anton Tananaev2 years ago

Those are regular device attributes, not computed attributes.

Nunosan9992 years ago

Noted, thanks for the feedback!

So does that mean the only way I can change the parameters is on the configuration? Not possible to configure on the front-end?

Anton Tananaev2 years ago

Have you read my comment? I said you can set it in device attributes.

Nunosan9992 years ago

Hi Anton. Sorry I had misunderstood. Yes, now I have found where to add device attributes in the front end. However, I don't see Motion or TripDuration in the drop-down list of attributes. If I write the expression on that field will it work?

Thanks for the support!

Anton Tananaev2 years ago

It should if you're using the latest version.