Alarms version 6.10 with attributes, do not work

antonio15 days 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.

Anton Tananaev15 days ago

What expressions are you using?

antonio15 days 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.

bluelaser15 days 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 Tananaev14 days ago

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

antonio14 days 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 Tananaev14 days ago

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

antonio14 days 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!!!

antonio13 days ago

I think there's a problem with io175. TracCar filters this data. The way I set it up doesn't work. I don't know if you could tell me anything about this. Thanks.

alarm	event == 175 && io175 == "1" ? "geofence" : (alarm ?? null)      string	
alarm	event == 175 && io175 == "0" ? "geofenceExit" : (alarm ?? null)      string
JoseLuisG11 days ago

Hello, the automatic geofencing and autogeofence attributes (175) aren't working, but they are in manual geofencing. Could you please check and fix this?

Anton Tananaev10 days ago

If you have a feature request, you have to use GitHub and provide more context and documentation.

JoseLuisG10 days ago

The same problem that Antonio mentions.