how to set time limit for Idling

Hamza Javed 7 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

roneskinder 6 years ago

I would also love a configuration for idling

Saqib 6 years ago

Mee too. Anyone who can help?

Primtek 5 years ago

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

mhzatwork 2 years ago

Any Progress ?

nawaz 2 years ago

need this , any way we can do this ??

Anton Tananaev 2 years ago

What exactly is needed?

Nabil MAKHLAF 5 months ago

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

Anton Tananaev 5 months 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 MAKHLAF 5 months 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 Tananaev 5 months ago

Why not use server time instead?

Nabil MAKHLAF 5 months 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 MAKHLAF 5 months 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 Tananaev 5 months ago

Yes, something like that.

Nabil MAKHLAF 5 months 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.