What's the mistake?
The valid is locate between fixTime and latitude. They show null in the database.
fixTime | valid | latitude
2016-03-20 14:17:40 | | 13.886868
It's not possible to be null with default configuration. Have you modified any thing in the config file?
Hi Anton,
Here is an addition for my traccar.xml.
<entry key='database.insertPosition'> INSERT INTO positions (deviceId, protocol, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, attributes) VALUES (:deviceId, :protocol, :now, :time, :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :attributes); </entry>
Here is my table positions descripton, since they do not have values in valid record.
mysql> desc positions; +------------+---------------+------+-----+---------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +------------+---------------+------+-----+---------------------+-----------------------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | protocol | varchar(128) | YES | | NULL | | | deviceId | int(11) | NO | MUL | NULL | | | serverTime | timestamp | NO | | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP | | deviceTime | timestamp | NO | | 0000-00-00 00:00:00 | | | fixTime | timestamp | NO | | 0000-00-00 00:00:00 | | | valid | bit(1) | NO | | NULL | | | latitude | double | NO | | NULL | | | longitude | double | NO | | NULL | | | altitude | float | NO | | NULL | | | speed | float | NO | | NULL | | | course | float | NO | | NULL | | | address | varchar(512) | YES | | NULL | | | attributes | varchar(4096) | NO | | NULL | | +------------+---------------+------+-----+---------------------+-----------------------------+ 14 rows in set (0.00 sec)
As you can see the "valid" field cannot be null. I'm not sure how you managed to get null in there.
Hi Anton Tananaev
Traccar is the good job for your gps tracking project since it works great as aspect. I have found some mistake from the valid field in mysql database so that they can not saved them at all. Please look into my query report.