Filter rule not working

bttd2 years ago

Hi,

I have a device in a car without always 12v on. So sometimes, I get 0.0,0.0 as coordinates.
I try to filter this with a filter rule without success.

Here is my traccar.xml:

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>

<properties>

    <entry key='config.default'>./conf/default.xml</entry>

    <!--

    This is the main configuration file. All your configuration parameters should be placed in this file.

    Default configuration parameters are located in the "default.xml" file. You should not modify it to avoid issues
    with upgrading to a new version. Parameters in the main config file override values in the default file. Do not
    remove "config.default" parameter from this file unless you know what you are doing.

    For list of available parameters see following page: https://www.traccar.org/configuration-file/

    -->

    <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
    <entry key='database.url'>jdbc:mysql://192.168.112.2:3306/traccar-db?serverTimezone=UTC&amp;allowPublicKeyRetrieval=true&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
    <entry key='database.user'>username</entry>
    <entry key='database.password'>password</entry>
    <entry key='filter.enable'>true</entry>
    <entry key='filter.zero'>true</entry>
    <entry key='filter.invalid'>true</entry>
    <entry key='filter.future'>300</entry>
    <entry key='filter.duplicate'>true</entry>
    <entry key='filter.relative'>true</entry>
    <entry key='web.console'>true</entry>
    <entry key='web.debug'>true</entry>
</properties>

My traccar instance run in a docker, and I restart it after editing the config file. Also if I put someting eles in the config file it works (like debug console) or db connection
With this config file I still get 0 coordinates.

2023-01-30 18:16:36  INFO: [T3a2c96fb] id: deviceidhere, time: 2023-01-30 18:16:36, lat: 0.00000, lon: 0.00000, course: 0.0

Am I missing something?

Anton Tananaev2 years ago

The configuration looks file. Sounds like your server doesn't use it though.

bttd2 years ago

It is possible to verify it? Somehow list the actual settings?

Anton Tananaev2 years ago

Verify that the right configuration file is used? Change some other parameter and see if it's applied. Something obvious like a port number could be an easy option to verify.

bttd2 years ago

I already verified it with enable web console.
I add just to check the config file applied and also I can check the database settings applied too.

Now I removed web.console and web.debug. Config file applied because both disabled. At morning if the device runs out the battery I can verify again if the filters work or not.