Check status events and calculate the time difference?
Thank you, this would be specifically in the tc_events table correct? Checking using the deviceid, in the "deviceStopped" event type. Then I would subtract the "eventtime" from the current date, would it be something like this?
What exactly do you mean downtime? It sounds to me like you want to calculate stop time, not downtime.
Sorry for my English, that's exactly it. Stop time. Not downtime.
Then you can probably just use stops report.
I know there is a stop report, but I'm trying a small function in PHP, using the API. Where I have a line called Status, when the vehicle is moving, the text is "In Motion" and when the device stops, I would like to show a time, which would count the time that the device is stopped, understand? Between one position and another. Once the device moves again and stops, the counter is recalculated again.
Hello everyone, I would like to know if it is possible to somehow calculate the downtime of devices.