Limiting alarm notifications

Matt B7 years ago

Hi All
I'm new to Traccar and loving it, but still trying to get my head around things like computed attributes etc.

What I'm currently trying to achieve is to limit how many notifications I get for an alarm, primary example being.... I get the fuel level in % from OBD with each position record. I want to do a quick check to see if it's less than a certain level and if so, raise an alarm... but I don't want to get repetative emails/alerts whilst it's under that level.

Ideally it'd only send one alert until such time as the level goes back above the threshold (maybe with a buffer to prevent 'sloshing' setting it off), i.e. the tank has been filled up... but if that's not possible, only send one email per (say) 24 hour period.

Is this possible?

Matt B7 years ago

Thinking about this raised another thought... is it possible to read and write to device attributes from the logic inside the computed attributes? For example, can you create a custom attribute on the device called "fuelAlertSent", then in the computed attribute say "if fuel < 20% and fuelAlertSent = false, set an alarm and set the fuelAlertSent to true" and "if fuel > 25% set fuelAlertSent = false" (to reset it)

Anton Tananaev7 years ago

You can read device attributes, but not write them.

Matt B7 years ago

Hrmm... ok... so any other ways I can achieve this?

Anton Tananaev7 years ago

I can't think of a way to do it.

Matt B7 years ago

Damn. Is there a reason the device attributes are read-only? Could this be changed somehow? Would be handy to have some logic control on the device that way.

Anton Tananaev7 years ago

No particular reason. It can probably be changed in the code, but it won't be easy.