Greetings,
I have a Teltonika GPS connected to Flespi. Then I stream the data to thingsboard because I will do some analytics using the Thingsboard Rule Chain. Periodically the GPS will send data to Flespi.
But the problem is sometime there is a network issue, so there will be a delayed data. Moreover, my analytics is a state based, it means the calculation depends on the value of the previous data.
Let say there are 15 data from t=0 to t=14. Sometimes, I get the t=10 data for now, but due the network issue the t=7 data just arrive exactly after the t=10 data. The t=7 should be sent and be received earlier than the t=10 data but it can happen because of lost network connection. So the order of the data coming to the thingsboard rule chain is broken.
Actually, I don't need a realtime analysis. For example I can just calculate the analytics every a single day. I can call the Flespi REST API to get the ordered data and then post the data on by one to the thingsboard REST API. But I'm afraid that this is not the best solution.
Do you have any suggestion?
Thank you