GPS TK102-2 - Battery voltage display in WEB GUI / and alarm

mario_dd6 years ago

Hello, I'm new here in the forum First, apologize for my bad english.
I have successfully set up a Raspberry PI3 + as a TRACCAR server. Communication with a XEXUN GPS TK102-2 device works very well.
In the WEB GIU via the address and PORT: 8082 can also access the position.

My problem - Question: in the log (traccar.log) is also the battery voltage (F: 3,79V)

I would like to display in the WEB GIU on the left side (status) the battery voltage and if the battery voltage is less than 3.7V a message (WEB, EMAIL).

I worked with the notifications. Unfortunately, I did not succeed. I do not know how to create the string / expression.

Here is a part of the TK102-2 GPS device protocol after the HEX conversion.

imei: xxxxxxx07810829,03,126.3, F: 3.79V, 0,119,8xx8,212,01,870A, 11Dd, itakka_fw492

Thanks alot

Ernesto Vallejo6 years ago

Try computed attributes like this:

Alarm
battery < 3.7 ? "lowBattery" : null
String
mario_dd6 years ago

Hello and thanks for your help.
Unfortunately, that does not work. Email works, but not at the battery voltage.

I wrote everything as written. With GSP congestion I get a message - email.

In the traccar.log see the following:

undefined viaable battery (.... <computedAtributesHandler: 91 <* BaseDataHandler: 27 <...........

After the HEX converter there is something in the telegamm of F: ... Volt
Is this the woodworker?
Hello and thanks for your help.
Unfortunately, that does not work. Email works, but not at the battery voltage.

I wrote everything as written. With GSP congestion I get a message - email.

In the traccar.log see the following:

undefined viaable battery (.... <computedAtributesHandler: 91 <* BaseDataHandler: 27 <...........

After the HEX converter there is something in the telegamm of F: ... Volt
Is this the woodworker?

Thanks to the help

Ernesto Vallejo6 years ago

Maybe battery is not the name of the attribute you are receiving. It could be like "io3" or "batteryLevel" or something else. If this is the case, you would have to write your computed attribute like

Alarm
io3 < 3.7 ? "lowBattery" : null
String

Hope this helps.

mario_dd6 years ago

Thanks, I tried it right away. Unfortunately, the error comes:

org.traccar.processing.ComputedAttributesHandler.computeAttribute@91![0,3]: 'io3 < 4.00? 'lowBattery' : null;' undefined variable io3 - Variable (... < ComputedAttributesHandler:91 < AttributeResource:54 < ...)

My GPS Tracker device uses XEXUN telegram:
XEXUN Protokoll: .........,,A*68,F,, imei:123456789012345,04,481.2,F:4.15V,0,139,2689,232,03,2725,0576\n',

Where the F: is also the battery voltage.
Can I somehow read out this fixed variable - bring it to display?

tried it that way, but it does not work either.
Alarm
F: < 3.7 ? "lowBattery" : null
String

Thanks alot