At this point it is using its own DB I think.Ĥ Set up my trackers - I added the trackers through the GUI with their ID (I have 2 in cars and the traccar client on my phone). You can create a new account or login to admin/admin. Added the following to the configuration.yaml file:ĭb_url: restarting HA it seemed to pick up the new database, old stuff was lost (I think) but nothing else new appeared.ģ Installed the traccar ad-in with the config: ssl: true.I’m running on a dedicate Raspberry Pi 4 Model B 4GB with the 32bit version of Home Assistant on a 64GB micro SD card.Īt this point nothing is using MariaDb but 2 empty databases are created somewhere on my SD card ready for HA and traccar to use. So if it helps other newbies I summarize (my interpretation) what I did to get it going. It was a struggle pulling together all the snippets of info from the main documentation and various support fora, but I think I’m there. I’m a complete newbie to Home Assistant, but have been using traccar for several years relying on the demo servers so was very pleased to see that I could create my own server - Thanks Franck. It can be copied manually with SQL queries. IMPORTANT NOTE: existing data of original web interface will not be accessible because it is stored in other tables. In chrome this can be done like said here Then data can be copied between databases using SQL queries or some scripts.Ħ) If necessary clear web browser cookies related to your traccar web UI. If it needed to be preserved, then instead of dropping database just use a brand new database with a different name. IMPORTANT NOTE : this will delete all existing data. Also this can be done via GUI management tools (like MySQL workbench). This database will be created automatically when service starts.įor any other databases like MySQL there are queries to drop and create them. To ensure this please drop and re-create existing database:įor default H2 database this can be done by removing contents of data folder under the traccar installation folder. VALUES (:deviceId, :protocol, CURRENT_TIMESTAMP(), :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes) ī) Database must be empty before first startup. VALUES (:deviceId, :protocol, CURRENT_TIMESTAMP(), :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :other) Temporarily comment out the following queries in default configuration file (located in conf\default.xml of traccar installation folder). not when upgrading from previous versions when the database is already present INNER JOIN users AS u ON ud.users_id=u.idĨa) Only for the first time installation, i.e. SELECT ud.users_id AS userId, ud.devices_id AS deviceId FROM users_devices AS ud SELECT u.id AS userId, d.id AS deviceId FROM users AS u, devices AS d WHERE u.admin = 1 LEFT OUTER JOIN user_settings AS us ON us.id = s.userSettings_id LEFT OUTER JOIN user_settings AS us ON us.id = u.userSettings_id LEFT OUTER JOIN user_settings us ON us.id = u.userSettings_id Us.speedUnit, us.centerLatitude AS latitude, us.centerLongitude AS longitude, U.expirationDate AS expirationTime, u.blocked AS disabled, u.admin, SELECT u.id, u.login AS name, u.password AS hashedPassword, u.salt, u.email, u.readOnly AS readonly, UPDATE devices SET latestPosition_id = :id WHERE id = :deviceId Valid, latitude, longitude, altitude, speed, course, address, other AS attributesįROM positions WHERE id IN (SELECT latestPosition_id FROM devices) SELECT id, protocol, device_id AS deviceId, serverTime, time AS deviceTime, time AS fixTime, VALUES (:deviceId, :protocol, :now, :deviceTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes) INSERT INTO positions (device_id, protocol, serverTime, time, valid, latitude, longitude, altitude, speed, course, address, other) Then data can be copied between databases using SQL queries or some scripts.ħ) Disable queries for the group permissions and attribute aliases in default configuration file (located in conf\default.xml of traccar installation folder): IMPORTANT NOTE : This will delete all existing data. Also this can be done via GUI management tools (like MySQL Workbench). The database will be automatically re-created on first service start.įor any other databases like MySQL there are queries to drop and create them. To ensure this please drop and re-create the existing database:įor a default H2 database this can be done by removing contents of the data folder under the traccar installation folder. Your database must be empty before first startup. IMPORTANT NOTE : These changes must be done in default configuration file named default.xml, not in traccar.xml. opt/traccar/schema/changelog-master.xml ->
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |