Automatically upload new activities from specified directory to garmin connect.
Use case:
- Make your ride to create new activity file
- Connect your device to computer via USB cable
- New activity will be automatically uploaded to garmin connect, you will get tray notification about success or failure
The same way as it works on Windows with official client.
Run sudo make install-debian
if you are on Debian based distro. Otherway see Makefile
for dependencies list and try to install them yourself.
To configure garmin-sync
you should run it from command line without any parameters. This will ask you for login and password from garmin connect, path to the directory with activities and so on. All configuration are stored at ~/.config/garmin-sync
.
At this point you can connect your device to computer using USB cable, mount it and run garmin-sync
manually to upload new activities to garmin connect. See next section if this is not very handy for you.
- First of all you need to make your device mount automatically when it is connected to computer. For example in KDE I can do this in systemsettings:
Removable storage -> Removable devices -> Enable automatic mounting of removable media -> select your device
. - Then we need to create new systemd service which will execute
garmin-sync
when our device is mounted:- run
systemctl edit garmin.service --force --user --full
from your normal user - and create such unit file:
Replace[Unit] Description=Garmin Activities Uploader Requires=media-oleg-GARMIN.mount After=media-oleg-GARMIN.mount [Service] ExecStart=/usr/local/bin/garmin-sync [Install] WantedBy=media-oleg-GARMIN.mount
media-oleg-GARMIN.mount
with name of your device, which may be found withsudo systemctl list-units -t mount
- run
- Enable systemd service:
systemctl enable garmin.service --user
Next time you'll connect garmin device all new activities will be automatically uploaded to garmin connect.
First of all it will never remove activities from watched directory. To find new activities it stores modification time of newest activity from last run in ~/.config/garmin-sync/last_uploaded_mtime.json
. You can modify this time manually if you ever need.