Alarms version 6.10 with attributes, do not work

antonioa day ago

Hello, I was using version 5.8 and the ALARMS worked perfectly. I have upgraded to 6.10 and the alarms using calculated attributes are not working properly, i have Teltonikas FMC920. I have checked all the settings, they are the same as in 5.8 but they are not working properly. Only the notifications work properly, and the rest looks very good. Has anyone else seen the same thing, with the alarms not working in version 6.10? I've gone back to 5.8. Thank you.

What expressions are you using?

antonio10 hours ago
Vibracion_TK	alarm	event == 240 && ignition == false ? "vibration" : null    string
Remolque_TK	alarm	!ignition && speed > 1 ? "tow" : null	string

All of this works fine in version 5.8, but when I update to version 6.10, the alarms do not work. If I look in REPORTS-EVENTS, nothing appears either. It seems that in version 6.10 there is some internal filter that eliminates these alarms. Thank you for all your help.

bluelaser8 hours ago

antonio you need to add checks to ensure the event attribute is present and ignition.
Something like:

event ? event == 240 && ignition == false ? "vibration" : null : null

Depending on your device setup you might not be getting the ignition attribute in every position so you'll need to check for this also.

Anton Tananaev7 hours ago

Returning null is what breaks it. You have to returns the alarm value.

antonio4 hours ago

Is that how you say Anton?

Vibracion_TK alarm event == 240 && ignition == false ? "vibration" : alarm string
Remolque_TK alarm !ignition && speed > 1 ? "tow" : alarm string

Thanks!!

Anton Tananaev4 hours ago

Instead of alarm, you should use (alarm ?? null). Otherwise it will fail with undefined value.

antonioan hour ago

Okay, that's how those two attributes work.

alarm !ignition && speed > 1 ? "tow" : (alarm ?? null) string
alarm event == 240 && ignition == false ? "vibration" : (alarm ?? null) string

So I understand that these others also have to go the same way:
alarm event == 175 && io175 == "1" ? "geofence" : (alarm ?? null) string
alarm event == 175 && io175 == "0" ? "geofenceExit" : (alarm ?? null) string

Once again, THANK YOU VERY MUCH FOR YOUR WORK!!!