Are you sure you registered devices first before they sent the first data?
Thanks for the quick reply!
Yes, we did register the devices first through the API before any data was sent. We created the devices and assigned permissions properly using the permissions API.
However, we noticed that even after device creation, the server was not processing incoming data from the new devices until we restarted the server.
What exactly did it look like in the logs?
In the server logs, we could clearly see incoming data packets for the new device ID, each packet logged with timestamp, device ID, and location data, confirming that the server was receiving data from the device. However, when connecting via wscat to the WebSocket endpoint, no data was being pushed for that device. The device appeared in the system (device list/UI), but no real-time data updates were visible through the WebSocket stream
So is it web socket only issue? Or the data is not processed at all? Those are very different things.
Data was processed and accessible from web socket endpoint only after server restart.
However before restarting I could see the data in server logs(aws ec2) but these data where not accessible from web socket endpoint.
I think you should check if it's web socket issue only or not.
Okey is there any way to invalidate and reload cache manually? If so which method/function do should we use to update the cache when new devices are added via API?
No way to invalidate cache manually.
Okey thanks
Hi everyone,
I’m facing an issue where new devices added via the API show up in the device list, but do not receive any socket data until I restart the Traccar server. The server logs show that data is being received, but the WSCat WebSocket or front-end doesn’t get updates for those new devices until after a restart.
It seems like the device cache or session management is not refreshing automatically when devices are added through the API.
Has anyone else experienced this? Is there a recommended way to force cache refresh or avoid needing a restart after adding devices via API?
Thanks in advance!