How create "Power cut" and "Power Restored" notification with power value

Tracking Faso 2 years ago

hello,
I need to create "Power cut" notification with power value = 0 V and "Power Restored" if power value < 12 V. How can create expression to use Alarm Attribute in Computed Attributes ?

Cristian 2 years ago

For which model of gps? there are some that report this by default and you only have to create the corresponding notification.

Tracking Faso 2 years ago

MY model arr Teltonika FMB920 and FMB130

Cristian 2 years ago

for teltonika to use these calculated attributes, your devices must be previously configured to report these events.

https://ibb.co/34VgnXB
https://ibb.co/hcS4pxk

Cristian 2 years ago
Tracking Faso 2 years ago

@Cristian how to configured to report these events with teltonika ?

Cristian 2 years ago

this is explained in the link I shared

Tracking Faso 2 years ago

this link https://wiki.teltonika-gps.com/view/FMB920_Teltonika_Data_Sending_Parameters_ID show id of data sending (io252)
0 – battery present
1 – battery unplugged

Tracking Faso 2 years ago

@Cristian I will do the configuration as you said and I will get back to you

Mohammed Qasim 2 years ago

if (power == 0){ "powerCut"; } else {null;}
if (power < 12){ "powerRestored"; } else {null;}

Tracking Faso 2 years ago

@Mohammed Qasim I used your method, it works well but there is a problem with power restoration (I receive a notification every second telling me that power is restored) how to solve this?

Tracking Faso 2 years ago

@Cristian
for your method I configured then used your attributes it works at least. I receive the notification of the power cut but I do not receive the notification of the restored power. This is exactly the same behavior as the problem encountered here https://www.traccar.org/forums/topic/poweron-notification/#post-89047
how to solve this?

Cristian 2 years ago

Did you verify that you are getting io252=0 in the data you send the gps?

Mohammed Qasim 2 years ago

if (power < 8){ "powerRestored"; } else {null;}
you can check that

Tracking Faso 2 years ago

@Mohammed Qasim Thank you, this function works well. however I changed < to > the code becomes if (power > 8){ "powerRestored"; } else {null;}.