how to set time limit for Idling

Hamza Javed6 years ago

I mean consider idling after 5 min i.e. from last 5 min there is no motion and ignition is ON then consider Idling.
Thanks

roneskinder6 years ago

I would also love a configuration for idling

Saqib6 years ago

Mee too. Anyone who can help?

Primtek5 years ago

yes, I need this too.. anyone can help?

mhzatwork2 years ago

Any Progress ?

nawaza year ago

need this , any way we can do this ??

Anton Tananaeva year ago

What exactly is needed?

Nabil MAKHLAF2 days ago

for exemple is there a way to trigger a notification id the idling is more than a defined time?

Anton Tananaev2 days ago

I believe it should be possible with computed attributes, but it's not a trivial thing to do, so you need to understand the syntax and capabilities of computed attributes.

Nabil MAKHLAF10 hours ago

Atually I tried this expression to get a booleen if the idling is more than 15 min:

(ignition ? (!motion ? (valid && (new Date().getTime() - deviceTime.time) > 15 * 60 * 1000) : false) : false)

the problem is in getting the current time new Date().getTime(), apparently JEXL have some limitation.

Anton Tananaev8 hours ago

Why not use server time instead?

Nabil MAKHLAF7 hours ago

I noticed that serverTime, deviceTime and fixTime are almost the same and it refers to the last message sent by the device and not the actual time

Nabil MAKHLAF7 hours ago

I think the best way to figure this out is, to have a variable that stores the timestamp of the first idling position sent, and each time a position is sent which is an idling status it will be compared to this variable, untill it exceeds 15 min

Anton Tananaev7 hours ago

Yes, something like that.

Nabil MAKHLAF6 hours ago

What do you think if we update the column motionstate in the table tc_devices so that it shows more option (moving, idling, parking and offline) and add a column lastMotionTime which stores the time when the motion starts?

We can use this to know:
1 - driving time without interruption,
2 - idling time,
3 - parking time.

I can work on that.