We have a use case where we want to track the last connect and last disconnect for a device to losant.
As of now we were using the connectionTime string that we get by default on the device as the last connect and we were manually storing the timestamp for disconnect everytime the disconnect node was triggered on the workflow but the timestamps that we have gathered are a bit confusing?
Most of the time its the same value for both. Is there a clear way to know when was the last time the device established a connection and when it got disconnected?
Would you be able to tell me more about (or share a screenshot of) the workflow that is setting these values?
In the Disconnect Trigger, the
connectedAt field is the time that the device last connected, and the
time value would be the time that the device disconnect.
we were manually storing the timestamp for disconnect every time the disconnect node was triggered on the workflow
Could you share the configuration of the node you are using to store this data?
I ran a simple test with a standalone device and our Device Simulator and this workflow:
Here are the two payloads:
connectedAt key in the disconnect payload shows the same time as the
time field of the connect payload. The disconnect time is the
time field in the disconnect payload.
Please let me know if this helps or if you need more clarification. Including the information above would be a great help.