Hello,
I have the following problem. I'm trying to optimize the system so that when the car is not running (stopped completely) the server is not accepting more data and accumulating writes, since I have little disk space. The problem is that when the car is parked, the server stops accepting more data and thus doesn't accept engine status changes and other parameters as well (for example, the speed doesn't change at 0 km/h, it stays at the last active speed). I am asking for help on how to organize the configuration so that when the vehicle stops, it stops recording more location data but the other parameters change (speed, engine status, battery, etc).
Here is my configuration.
Thanks in advance.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/traccar?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC</entry>
<entry key='database.user'>traccar</entry>
<entry key='database.password'>pass</entry>
<entry key='gt06.enable'>true</entry>
<entry key='status.timeout'>7200</entry>
<entry key='server.timeout'>7200</entry>
<entry key='user.email.required'>false</entry>
<entry key='notificator.types'>traccar,mail,web</entry>
<entry key='notificator.traccar.key'>eyJkYXRhIjo5ODE....y93Mms5bXJB</entry>
<entry key='web.map'>google</entry>
<entry key='web.selectors'>true</entry>
<entry key='web.maps'>google,google.satellite,osm,custom</entry>
<entry key='report.trip.minimalTripDistance'>100</entry>
<entry key='report.trip.minimalTripDuration'>180</entry>
<entry key='report.trip.minimalNoDataDuration'>300</entry>
<entry key='coordinates.filter'>true</entry>
<entry key='coordinates.minError'>30</entry>
<entry key='coordinates.maxError'>30000</entry>
<entry key='web.sanitize'>true</entry>
<entry key='geocoder.enable'>false</entry>
<entry key='filter.zero'>true</entry>
<entry key='filter.distance'>20</entry>
<entry key='filter.accuracy'>300</entry>
<entry key='filter.invalid'>true</entry>
<entry key='filter.duplicate'>false</entry>
<entry key='filter.future'>3600</entry>
<entry key='processing.copyAttributes.enable'>true</entry>
<entry key='processing.copyAttributes'>power,ignition,battery,batteryLevel</entry>
<entry key='mail.smtp.host'>mail</entry>
<entry key='mail.smtp.port'>26</entry>
<entry key='mail.smtp.from'>admin@mail</entry>
<entry key='mail.smtp.username'>admin@mail</entry>
<entry key='mail.smtp.password'>pass</entry>
<entry key='mail.smtp.auth'>true</entry>
</properties>
You have conflicting requirements. Do you want to stop receiving data or do you want to receive data?
By the way, I also noticed that you have a bunch of config parameters that don't exist. Where did you get it from?
Hello Anton and thanks for your response.
The configuration file was inherited from the old server configuration before moving the application to me. I added some things in an attempt to achieve what I described. The idea is the following - after the vehicle stops, the database should not accumulate "hollow" records for the same location, but it should be possible to update the speed and engine status data. I hope you manage to understand what I'm looking for.
Please, if you don't mind, point out which parameters I don't need and which I need to change to achieve the above. Thank you!
That's not something you can easily configure using existing filters. It might be possible with some combination of filtering and computed attributes, but that's not trivial.
Well I would hope some user who has managed to achieve something similar would give me some advice. I think there should be a way to trim the data if the last X records sent have the same coordinates. That way I could easily do for example after the car stops and gets 5 identical location records, stop recording data, with the last 5 received it would have updated the engine status and instantaneous speed (0 km/h).
@Anton can you guide me on how I could achieve what I described in my previous comment? I tried several variations, combining different filters, but without success.
On high level the idea would be to add some attribute depending on a condition you want. And then skip filtering if the attribute is present.
Hello,
I have the following problem. I'm trying to optimize the system so that when the car is not running (stopped completely) the server is not accepting more data and accumulating writes, since I have little disk space. The problem is that when the car is parked, the server stops accepting more data and thus doesn't accept engine status changes and other parameters as well (for example, the speed doesn't change at 0 km/h, it stays at the last active speed). I am asking for help on how to organize the configuration so that when the vehicle stops, it stops recording more location data but the other parameters change (speed, engine status, battery, etc).
Here is my configuration.
Thanks in advance.
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'> <properties> <!-- Documentation: https://www.traccar.org/configuration-file/ --> <entry key='database.driver'>com.mysql.cj.jdbc.Driver</entry> <entry key='database.url'>jdbc:mysql://localhost:3306/traccar?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC</entry> <entry key='database.user'>traccar</entry> <entry key='database.password'>pass</entry> <!-- Base config --> <entry key='gt06.enable'>true</entry> <entry key='status.timeout'>7200</entry> <entry key='server.timeout'>7200</entry> <entry key='user.email.required'>false</entry> <!-- Notifications --> <entry key='notificator.types'>traccar,mail,web</entry> <entry key='notificator.traccar.key'>eyJkYXRhIjo5ODE....y93Mms5bXJB</entry> <!-- Map Config --> <entry key='web.map'>google</entry> <entry key='web.selectors'>true</entry> <entry key='web.maps'>google,google.satellite,osm,custom</entry> <!-- Optimizations --> <!-- <entry key='report.trip.useIgnition'>true</entry> --> <entry key='report.trip.minimalTripDistance'>100</entry> <entry key='report.trip.minimalTripDuration'>180</entry> <entry key='report.trip.minimalNoDataDuration'>300</entry> <entry key='coordinates.filter'>true</entry> <entry key='coordinates.minError'>30</entry> <entry key='coordinates.maxError'>30000</entry> <entry key='web.sanitize'>true</entry> <!-- Geocoder --> <entry key='geocoder.enable'>false</entry> <!-- <entry key='geocoder.enable'>true</entry> <entry key='geocoder.type'>nominatim</entry> <entry key='geocoder.url'>https://nominatim.openstreetmap.org/reverse</entry> <entry key='geocoder.key'>5e81cf.....092</entry> <entry key='geocoder.processInvalidPositions'>false</entry> <entry key='geocoder.onRequest'>true</entry> <entry key='geocoder.ignorePositions'>true</entry> --> <!-- Filters --> <entry key='filter.zero'>true</entry> <entry key='filter.distance'>20</entry> <entry key='filter.accuracy'>300</entry> <entry key='filter.invalid'>true</entry> <entry key='filter.duplicate'>false</entry> <entry key='filter.future'>3600</entry> <!-- Attributes --> <entry key='processing.copyAttributes.enable'>true</entry> <entry key='processing.copyAttributes'>power,ignition,battery,batteryLevel</entry> <!-- Mail conf --> <entry key='mail.smtp.host'>mail</entry> <entry key='mail.smtp.port'>26</entry> <entry key='mail.smtp.from'>admin@mail</entry> <entry key='mail.smtp.username'>admin@mail</entry> <entry key='mail.smtp.password'>pass</entry> <entry key='mail.smtp.auth'>true</entry> </properties>