Hi Alf-DK,
Create Alarm Computed Attribute e.g.
Description: di2 alarm
Attribute: Alarm
Expression: di2==1?"di2 on":null
Type: String
Then create notification:
Type: Alarm
Check box for all devices if you like
Channels: sms, email, web
Click attributes and enter:
name: alarms
value: di2 on
Link the notification to the user
Pete, what version of Traccar is this for? How do you select "di2 on" as an alarm type for the notification?
Yes that attribute works fine, but no notification can be made on it.
Hi Anton,
I'm using current source code. Probably should have mentioned it in previous comment but for me to get custom alarms to work I create the notification as per below:
Type: Alarm
All Devices: Checked
Alarms: General
Channels: Web, Mail, SMS
I then select Attributes and replace value: "general" with my custom value used in the Alarm type computed attribute. "di2 on" in this instance.
Works for me.
Yeah, "general" will work because it's a pre-defined type in Traccar. But "di2 on" won't work because it's not.
I would like an notification when Di2 gets high 1 and Di3 gets low 0
I have both Di2 and Di3 under state from the tracker.
I am trying to make an alarm attribute on Di2 which is also displayed under state, but it does not look at whether Di2 and Di3 are 1 or 0 that is my problem