Offline status from Traccar Client always takes 10 min to display it on the web client

Nobea year ago

Maybe this is the expected behavior but when i start the service from Traccar Client, the Online status on the web is reflected instantly but when stop the service from Traccar Client, it always takes 10 minutes to reflect it on the web.

Traccar Client configuration:

Tracking frequency: 10s(tried others)
Offline Buffer: Tried On and Off
Force wake up state: Tried On and Off

Online status

https://ibb.co/DDc1jxY

Traccar Client offline - Web display online status

https://ibb.co/4sWCBBy

10 minutes offline status

https://ibb.co/Y8q4FYr

traccar.xml Configuration
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
    <entry key='config.default'>./conf/default.xml</entry>
    
    <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://mysql:3306/traccar?serverTimezone=UTC&amp;allowPublicKeyRetrieval=true&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>xxxxx</entry>
    <entry key='database.password'>xxxxxx</entry>

</properties>
Anton Tananaeva year ago

That's expected because there's no offline status. HTTP based protocols don't have the same connection concept as TCP protocols.

Nobea year ago

I'm going to learn more about that, but why always reflects the status on the web client starting "10 minutes ago" can i change it?

I want to track it since the service is stopped from the Traccar Client but always starts tracking from 10 minutes

Anton Tananaeva year ago

Again, there's no connection concept, so the server doesn't actually know when you stopped the service.

Nobea year ago

Oh i see, so i could make an api call from the web to the device to request the status?

Anton Tananaeva year ago

I don't know where you got that idea from, but no, device is a client, not a server. It cannot accept requests.

Nobea year ago

Directly from my ignorance hahaha, well im going to look more into what i want to achieve

Anton Tananaeva year ago

You would need to change the mobile app to actually send some kind of event to the server and then also implement it on the server to handle that event and close the connection.

Nobea year ago

Something with firebase maybe

Hi,

maybe you could tune the server.timeout or the protocol.timeout (osmand.timeout for the android app) in the config.

10minutes is simply the default value that the server uses to show the device as offline when it stops to send data.

If you use server.timeout with the value 60 the device will show (every) device as offline in 60 Seconds after it stops sending data via the app. There is also a timeout value for the protocols so that you can set different values for phones, trackers etc.

Maybe that helps - but i can bei wrong cause i startest to use traccar only a couple of days ago..

Nobea year ago

I'll check that and report, thank you

Nobea year ago

Well, that fixed it, thank you!!