Help about position attributes

Atulalma2 months ago

I have added the timestamp in the position attribute, when I am restarting the server so my timestamp is clearing.

How can solve this

Anton Tananaev2 months ago

How did you add it?

Atulalma2 months ago

I am adding in the code when position not null so I am adding position.set("myattrubute","myvalue")

I also add this attributes in config file

Anton Tananaev2 months ago
  1. Where in the code?
  2. How is it stored in the database?
Atulalma2 months ago

1- I have added this on distance handler under the if condition

        if (last != null) {
          position.set("myattrubute","myvalue");
         //Other original codes
}

2- I don't now how traccar is storing data but with each position it's going in the database and showing in the position api.

But after restarting it's not showing

Anton Tananaev2 months ago

If you're doing it in the distance handler, it should still be there. Have you checked the database?