Computed attributes are calculated for every position, which means it happens when device reports something useful.
But what you are trying to implement is already available out of the box. Traccar already has an event for when device hasn't reported anything for selected amount of time.
Hi Anton, sadly I couldn't find this under notification. Could you clarify where I can find this event? Is it a notification?
It's called "Device inactive". What version are you using?
I found Device inactive in the notifications menu, but no option to define a timeframe. I am using the latest 4.13 version :-)
The options are in the device attributes.
Hey, I'm trying to set an alarm status if the device is offline for 4 hours.
This is my code, it correctly validates. My fear is that computed attributes are validated when the device reports it's status to the Server. Is that true? Perhaps someone knows a different solution.
TL;DR
Trigger alarm/Notification when Device is offline for 4 Hours. Some trackers have some connectivity issues and shouldn't immediately trigger an offline event.