Event is likely a number, not a string.
The computed attribute works regardless of using 5 or "5". I've tested this by sending a signal with event=5 and using the "Check Computed Attribute" tool. It correctly displays "tow" as the value. The problem is I can't get a notification for this alarm, even though I have it set up to notify me for all devices.
Are you sure that notifications for alarms are enabled? Are other alarms working?
Yes, they are enabled and the notifications for "Device is offline" or "Device status is unknown" are working. I have tested alarm values with computed attributes such as "sos" and they do not work. Is there any other way that I can test alarms? My GPS does not send an "alarm" field, that's why I'm using computed attributes.
Here is an image album of the configurations.
Thank you for your help.
You can test with Traccar Client for Android. It can send SOS alarm.
Ok, the SOS alarm and notification works when sent from an Android client.
Then there must be some issue with your computed attribute.
My computed attributes are working correctly as shown in the imgur album, the "Check Computer Attribute" shows that it is assigning the correct value to the "Alarm" attribute. I have set up the same scenario in a demo server and my GPS is constantly sending a signal that triggers the computed attribute, but the alarms still won't work. Let me know if you want to check it out, I'll keep searching for a solution.
Do you see alarm in the state panel for your device? If not, it means that it's not working.
we can use only the attributes in the stat panel in computed attributes ? that is if event is not showing in the state panel can't we use event in computed attributes ?
could you show me any code snippet that triggering an event in computed attributes ?
i am using traccar client android, and when it will send an "sos" alarm ?
Hello, I have a Syrus GPS for testing purposes and it has worked fine with Traccar so far. I tried to create a notification when a certain event occurs, but have failed to do so. This is what I have so far:
When testing the computed attribute, it correctly shows "tow" as the value assigned when the signal arrives with event=5
The problem is I can't trigger a notification for the alarm, I have set an "Alarms" type of notification assigned to all devices, but no event is registered an no notification is sent.
Am I doing something wrong? I have searched through the forums and google and seems that I'm not missing anything.
Any help is appreciated.