{"id":16496982,"url":"https://github.com/bencevans/tracksix","last_synced_at":"2025-03-16T18:32:09.633Z","repository":{"id":39738023,"uuid":"170146261","full_name":"bencevans/tracksix","owner":"bencevans","description":"Track your [⛵|🚂|🚙|🚜|🛵|🛷|🚶] with a Raspberry Pi and a GPS.","archived":false,"fork":false,"pushed_at":"2025-03-03T22:28:33.000Z","size":514,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T04:41:19.162Z","etag":null,"topics":["iot","location","owntracks","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bencevans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["bencevans"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-02-11T14:50:44.000Z","updated_at":"2025-03-03T22:28:29.000Z","dependencies_parsed_at":"2023-11-21T03:29:40.935Z","dependency_job_id":"e4db4430-0be7-4de3-a713-d0de0928fcdb","html_url":"https://github.com/bencevans/tracksix","commit_stats":{"total_commits":76,"total_committers":4,"mean_commits":19.0,"dds":0.2763157894736842,"last_synced_commit":"1640a83be09667ff09c7bcd5f5f342c597ae7137"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencevans%2Ftracksix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencevans%2Ftracksix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencevans%2Ftracksix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bencevans%2Ftracksix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bencevans","download_url":"https://codeload.github.com/bencevans/tracksix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910675,"owners_count":20367546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","location","owntracks","raspberry-pi"],"created_at":"2024-10-11T14:37:33.127Z","updated_at":"2025-03-16T18:32:07.350Z","avatar_url":"https://github.com/bencevans.png","language":"JavaScript","funding_links":["https://github.com/sponsors/bencevans"],"categories":[],"sub_categories":[],"readme":"# Tracksix\n\n\u003e Track your [⛵|🚂|🚙|🚜|🛵|🛷|🚶] with a Raspberry Pi and a GPS.\n\n## Features\n\n* [OwnTracks](https://owntracks.org/) Compatable Config \u0026 Reporting Format\n* MQTT(S) Reporting\n* MQTT over WebSocket Reporting\n* Programmatic usage or executable use\n* Compatable with a huge array of GPS [devices](http://catb.org/gpsd/hardware.html) through [`GPSd`](http://catb.org/gpsd/)\n* Replays reports when an internet connection arrises\n\n## Install\n\nTo communicate with your GPS device, `tracksix` utilises [`GPSd`](http://catb.org/gpsd/) (Global Positioning System daemon) which standardises the format from different GPS devices.\n\nOn OSX:\n\n    $ brew install gpsd\n\nOn Debian/Ubuntu:\n\n    $ sudo apt install gpsd\n\nEnsure you have [Node.js](https://nodejs.org) installed on your device, then install `tracksix`:\n\n    $ npm install --global tracksix\n\n## Usage\n\n    $ tracksix [path to config file]\n\nTracksix uses the same configuration format as OwnTracks, this can be exported from your OwnTracks mobile app or copy the config.example.json and edit the contents appropriately.\n\n## Programmatic Usage\n\nFirst follow the above steps for installing GPSd. Then install the tracksix library into your nodejs project:\n\n     $ npm install tracksix\n\nImport the library:\n\n```js\nconst tracksix = require('tracksix')\n```\n\nLoad your configuration file:\n\n```js\nconst path = require('path')\nconst config = tracksix.readConfigSync(\n    path.resolve(__dirname, './config.json')\n)\n```\n\nStart tracking:\n\n```js\nconst tracker = tracksix(config)\n```\n\nTo listen for errors, `tracksix()` returns an EventEmitter which emits `'error'` events.\n\n```js\ntracker.on('error', (err) =\u003e {\n    console.error(err)\n})\n```\n\nTo listen for updates sent to the MQTT server, subscribe to `'location'` events. A location event contains the same elements as specified in the OwnTracks [location object](https://owntracks.org/booklet/tech/json/#_typelocation).\n\n```js\ntracker.on('location', (report) =\u003e {\n    console.log(report)\n})\n```\n\n## Run as a service\n\nWrite the following to `/etc/systemd/system/tracksix.service` and update the path to node `which node` and tracksix `which tracksix`.\n\n```\n[Unit]\nDescription=Tracksix Service\nAfter=network.target\n\n[Service]\nType=simple\n# Another Type: forking\nUser=pi\nWorkingDirectory=/home/pi\nExecStart=/home/pi/.nvm/versions/node/v10.13.0/bin/node /home/pi/.nvm/versions/node/v10.13.0/bin/tracksix\nRestart=on-failure\n# Other restart options: always, on-abort, etc\n\n# The install section is needed to use\n# `systemctl enable` to start on boot\n# For a user service that you want to enable\n# and start automatically, use `default.target`\n# For system level services, use `multi-user.target`\n[Install]\nWantedBy=multi-user.targe\n```\n\nAfterwards you need to enable the service:\n\n```\n$ sudo systemctl enable tracksix.service\n```\n\nThen start the service with:\n\n```\n$ sudo systemctl start tracksix\n```\n\nYou can check the status / logs with:\n\n```\n$ systemctl status tracksix.service\n```\n\n## Development\n\nTo start a mock `GPSd` server use [`gpsd-fake`](https://github.com/loewexy/gpsd-fake#readme): `npm install -g gpsd-fake \u0026\u0026 gpsd-fake`.\n\n## Licence\n\nMIT \u0026copy; [Ben Evans](https://bencevans.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencevans%2Ftracksix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbencevans%2Ftracksix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbencevans%2Ftracksix/lists"}