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

Tracking Faso2 months 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 ?

Cristian2 months ago

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

Tracking Faso2 months ago

MY model arr Teltonika FMB920 and FMB130

Cristian2 months 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

Cristian2 months ago
Tracking Faso2 months ago

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

Cristian2 months ago

this is explained in the link I shared

Tracking Faso2 months 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 Faso2 months ago

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

Mohammed Qasim2 months ago

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

Tracking Faso2 months 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 Faso2 months 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?

Cristian2 months ago

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

Mohammed Qasim2 months ago

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

Tracking Faso2 months ago

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