PowerCut Alarm not repeted within 30 second period

Juankaher6 months ago

Hello traccar team,
I need to setup a "freeze strategy" to avoid repeated alarms like powercut coming from same device in a 30 secs period.
Could you please advise if this expresion in computed attribute do the magic ?

alarm ? ( alarm == 'powerCut' || alarm == 'powerCut' && (serverTime.getTime() - deviceTime.getTime() < 30000) ? null : alarm) : nul
Anton Tananaev6 months ago

Have you tested it?

Juankaher6 months ago

yes. using "test expression" button but not able to replicate real scenario yet

Anton Tananaev6 months ago

At the very least nul is not valid.