For which model of gps? there are some that report this by default and you only have to create the corresponding notification.
MY model arr Teltonika FMB920 and FMB130
for teltonika to use these calculated attributes, your devices must be previously configured to report these events.
@Cristian how to configured to report these events with teltonika ?
this is explained in the link I shared
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
@Cristian I will do the configuration as you said and I will get back to you
if (power == 0){ "powerCut"; } else {null;}
if (power < 12){ "powerRestored"; } else {null;}
@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?
@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?
Did you verify that you are getting io252=0 in the data you send the gps?
if (power < 8){ "powerRestored"; } else {null;}
you can check that
@Mohammed Qasim Thank you, this function works well. however I changed <
to >
the code becomes if (power > 8){ "powerRestored"; } else {null;}
.
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 ?