email templates in v 3.15

Anton Tananaev6 years ago

@visiondrive, the issue was with your templates, right?

visiondrive6 years ago

Appears that speedUnits worked in 3.14 but not in 3.15 which uses only speedUnit

Josue6 years ago

Anton what do i have to check in traccar apart of traccar settings for fix this problem? i couldnt resolve yet.. it seems that it occurs in updated traccar, i get to bd and i have found a little difference in devices table. i try to set again in device1 the max speed in 85km and the other one i see that preserve the old data with 85km too, but i dont know why tracar 3.15 doesnt have quotes, is there a problem?
device 1 {"speedLimit":45.8963282937365} <== traccar 3.15
device 2 {"speedLimit":"45.8963282937365"} <== old traccar

also server table has a {"speedUnit":"kmh","distanceUnit":"km","volumeUnit":"ltr"} value in atributes

Anton Tananaev6 years ago

Internally Traccar always uses knots for speed values.

Josue6 years ago

ok but i cannot detect the problem, what do i need to check? if config is everything ok. could you give you the access? or what can i do

Anton Tananaev6 years ago

What is the problem?

Josue6 years ago

im getting max speed email notifications in knots, and traccar is configured to use km.
i have the same problem in sms notifications
example
VEHICULO ESTADO VELOCIDAD FECHA UBICACION GOOGLE MAPS
Kia cerato Exceso de velocidad 250.0 kn 02-01-2018 10:10:24 Circuito de Playas, Cercado de Lima, Municipalidad Metropolitana de Lima, PE Circuito de Playas, Cercado de Lima, Municipalidad Metropolitana de Lima, PE

Anton Tananaev6 years ago

Have you checked @visiondrive comment? It explains what the problem is.

Josue6 years ago

the comment said that is a issue template, but i dont have the original templates of 3.15, it was overwritten, or is there a location to download apart?
this is my sms template

#if($speedUnits == 'kmh')
#set($speedValue = $position.speed * 1.852)
#set($speedString = $numberTool.format("0.0 km/h", $speedValue))
#elseif($speedUnits == 'mph')
#set($speedValue = $position.speed * 1.15078)
#set($speedString = $numberTool.format("0.0 mph", $speedValue))
#else
#set($speedString = $numberTool.format("0.0 kn", $position.speed))
#end
$device.name exceso de velocidad $speedString el $dateTool.format("dd-MM-YYYY HH:mm:ss", $event.serverTime, $locale, $timezone) Ubic: #{if}($position.address)$position.address#{else}$position.latitude°, $position.longitude°#{end} http://maps.google.es/?q=$position.latitude,$position.longitude&z=16

whats wrong?

Anton Tananaev6 years ago

Comment says exactly what's wrong. I don't know how it can be more clear. Instead of speedUnits you should use speedUnit. Please read more carefully next time.