Create custom notification

Hans Vis6 years ago

Hi Anton,
is it possible to create a custom notification? For example I would like to get an alert if ignition off AND device is moving..

Thanks,
Hans

Anton Tananaev6 years ago

You can create an alarm using computed attributes.

leninweblb6 years ago

Take a look:
alt text

Best Regards
Lenin

Africa5 years ago

Hello,
Is there a way to send notification of an event globally to many users.

Regards,

Africa

Lordrak2 years ago

Hello,
i want create custom notificatoin too. When i use picture upper uploaded by leninweblb, notification is not fired. I can only see text from expressoin as alarm in detail of my device but notification is not send. When i se up text to "lowPower" exactly, it works but i need more information in the event.
Events are generally sended only when exact match string defined here https://github.com/traccar/traccar/blob/master/src/main/java/org/traccar/model/Position.java#L85.
Is it possible change this behaviour to support any text or user "contains" ?
Thank you
Lordrak

Anton Tananaev2 years ago

You're commenting on a very old thread. Alarms probably worked differently at the time.

Lordrak2 years ago

Yes, thread is old but alarms working same way. Attribute must be alarm and result in expression must be deffined key word from link i posted.
Second problem which i did not mentioned that oin modern interface is wrong parsing of special characters. For example expression 13 > 12 ? "lowPower"+"ble" : null is showed as 13 > 12 ? "lowPower"+"ble" : null
But for me is priority send custom message to web and telegram. For example when Power is lower than 12.2V, send notification with actual value. Like Low power, 12.2V.
Or do you think it is different problem? May i create new thread?

Anton Tananaev2 years ago

Sure create a new thread. Why not use the template to include additional data?

Lordrak2 years ago

Ok, i have created new threads.