Not Receiving Online/Offline events on Sockets

Furqan Mughal12 days ago

I have connected Socket on my Flutter Application. Also I have already added "Status Online" & "Status Offline" in Settings>Notifications. Furthermore, i have added on Settings>Device>myDevice>connections selected "Status Online" & "Status Offline" from Notifications dropdown. Now, I want to know when ever traccar client is coming online or offline. I am testing this use-case by toggle on/off on Traccar Client but this doesn't work at all and not send any online/offline event through socket. I had also try to offline my device my shut down, disconnect wifi and turn off location but nothing works.
Help me out, how would i get Traccar Client device online/offline event on my socket?
Thanks in advance!

Anton Tananaev11 days ago

Traccar Client doesn't support offline status because it uses HTTP protocol.

Furqan Mughal11 days ago

So, it only send type "deviceOnline" & "deviceUnknown" in events through socket ?

Anton Tananaev11 days ago

Yes.

Furqan Mughal11 days ago

"deviceOnline" type, event comes on socket instantly as Traccar Client become online. But "deviceUnknown" type status comes randomly after some time. Is there any way to get "deviceUnknown" event as device disconnected by internet or go offline or powered off

Anton Tananaev11 days ago

It's not random. There's very clear and simple logic for it.

Furqan Mughal11 days ago

Help me out! with the logic regarding "deviceUnknown" type event.

Anton Tananaev11 days ago

Try searching the forum.

Furqan Mughal11 days ago

sure! Thanks for your assistance.

Furqan Mughal11 days ago

Hey! Anton
I have checked about "deviceUnknown" its happening after 10 mints of not receiving location update from Traccar Client.
How do i reduce this time to 1 minute is there any settings on Traccar Manager or somewhere else ?

Anton Tananaev10 days ago
Furqan Mughal10 days ago

Thanks Anton