Double Reporting of a Device

Sumit6 years ago

Hello

I am getting on my server double reporting of a device sometimes. Is there any any way to fix this so that each devicetime would be unique for A Device?

If I make a checker to find the devicetime for the current device exists or not before inserting the position to the server, or I replace the query to get the positions as defined in the traccar:

SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime

And replace this with the following query to get the valid positions:
Select * from tc_positions where id in (select min(id) from tc_positions where deviceid= :deviceId and devicetime between :from and :to and valid=true group by devicetime) order by fixTime

But this query takes much time what traccar has and this query gives very fine results.

So I am confused what to do either go with the "checker" or with the "query".

Anton Tananaev6 years ago

Just enabled duplicate filtering.

Sumit6 years ago

So I have to add filter to stop the duplicate reporting like this:

<entry key='filter.duplicate'>true</entry>
Sumit6 years ago

It did not work for me. I am getting multiple duplicate positions for the same device. Any other solution or I am doing something wrong?

Anton Tananaev6 years ago

Either filtering is not enabled, or time values are different.

Sumit6 years ago

I did this

<entry key="filter.enable">true</entry>
<entry key='filter.duplicate'>true</entry>

And it shows me the log file for each and every device as disconnected.