Hi
Is there any way to stop the Losant Edge agent from replaying old data from when it was offline ?
I am getting to streams being sent, one with current time stamp, and a second (effectively empty - old) that has a much older timestamp. Is there any way to flush this without deleting the container, and restarting.
T
Hmm, there is no easy way to do this at the moment. We built in the automatic keeping and sending of offline data thinking it would always be what someone would want - that that data would still be important! Didn’t think about the case where the data collected while offline would be meaningless.
Adding a flag to the agent for this case (to not keep a message backlog) should not be terribly difficult, I’ll file a ticket for this case.
In the meantime, I think the best solution might be to wrap your edge workflow’s Device State node with a check on the isConnectedToLosant
payload field. That way your edge workflow won’t even try to report state when the device isn’t connected (so there won’t be anything that gets batched up to send).
Hi Michael
In our case this has already happened. A solar panel was sent north (truck and boat to an island.) The modem was shutdown, however no one isolated the datalogger running the edge agent. So its been quietly logging 5 days of nothing at 5 second intervals whilst offline.
We unfortunately get this a lot ;-(
Will add the isConnectedToLosant as a guard. However this means changing the workflow once it reaches site, so that we do catch that data whilst offline.
We should probably look at some global that indicates deployed. Hmm again means different things when testing vs not.
Oh well
What I also have found, if the edge agent get’s backed up (for instance workflow timeout on modbus) when it clears we get have seen update overruns, where the device updates come in too quick and the you throttle/disconnect the agent.