Managing events of old positions with teltonika protocol

fecondori2 years ago

Hi Anton we are trying to filter old record to get just the latest events for the most recent records. When a teltonika device has no connection, it stores the records until the connection resume and sends all the records, every one of these records has its own attributes so it can trigger an event like speed limit exceed if in that position the limit has been exceed. So if notifications are enabled for that event, traccar would notify those past events over the newest positions events. How traccar works with this delayed or outdated records?

Anton Tananaev2 years ago

Please don't address questions directly to me. It's a forum for everyone.

Traccar will process all the data as it comes in.

jafar habibi2 years ago

I think it would be good to add a filter handler to filter notifications at which server time and fixtime has a delay

rcordova2 years ago

Kinda difficult to handle when the protocol doesn't support it or the device doesn't notify in some way to the server.
Can only think of two ways right now:
1.- in case of teltonika like described, they use an Operator attribute, if the value is 0, it should indicate a disconnected device so the server could ignore the position.
2.- store the latest fixTime (or deviceTime) and serverTime (well they are stored, but maybe in memory to avoid another db query). If the serverTime delta is too small compared to deviceTime delta, the ideal scenario here is that there are queued messages from the device and you can ignore notifications for those positions
Still these methods are not 100% reliable since there are cases where the check may filter useful positions.
If any better idea come to your mind, please share it, may try to implement it.