PowerCut Alarm not repeted within 30 second period

Juankaher a year 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 Tananaev a year ago

Have you tested it?

Juankaher a year ago

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

Anton Tananaev a year ago

At the very least nul is not valid.