Configuration

The plugin creates a configuration file on it's first run at one of these two places:

~/.config/garminplugin/garminplugin.xml
~/.garminplugin.xml

Initially created configuration file:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<GarminPlugin logfile="" level="ERROR">
    <Devices>
        <Device>
            <Name>Home /home/username</Name>
            <StoragePath>/home/username</StoragePath>
            <StorageCommand></StorageCommand>
            <FitnessDataPath></FitnessDataPath>
        </Device>
    </Devices>
    <Settings>
        <ScanMounted enabled="true" />
        <ForerunnerTools enabled="true" />
        <BackupWorkouts enabled="false" path="/home/user/Dropbox/Workouts/[YEAR]/[MONTH]/"/>
    </Settings>
</GarminPlugin>

The initially created configuration file lets the plugin show your home directory as a Garmin device.

The configuration in detail

Garmin Devices that are accessible over the file system and that have the following file will be automatically detected (so no need to configure them).

Garmin/GarminDevice.xml

Devices that are not automatically detected need to be added to the configuration. You can configure several devices by simply adding another <Device>…</Device> block. A device will only be visible for the website that uses the plugin if the configured StoragePath exists.

A new Device

Configuring a new device is simple. Simply add a new <Device>…</Device> section to your configuration file.

        <Device>
            <Name>My eTrex</Name>
            <StoragePath>/tmp</StoragePath>
            <StorageCommand>gpsbabel -i gpx -f %1 -o garmin -F usb:</StorageCommand>
            <FitnessDataPath></FitnessDataPath>
        </Device>
  • <Name>…</Name>: This name will be displayed on the website for your device.
  • <StoragePath>…</StoragePath>: This directory will be used to store gpx files that you send to your device. If you need gpsbabel to send gpx files to your device set it to /tmp. If you are able to access the device over the file system, set it to the path where your device accepts gpx files
  • <StorageCommand>…</StorageCommand>: If you need to execute a command after the transfer of the gpx file to the <StoragePath> you can specify this command here. %1 will be replaced by the filename.
  • <FitnessDataPath>…</FitnessDataPath>: For future use…

The above configuration will store gpx files in the /tmp directory and then execute gpsbabel to transfer the file to your device.

Settings

BackupWorkouts

It is possible to create a backup copy of every workout that you choose to upload to a website. Each time you hit upload, the plugin will automatically save the raw file that has been imported from the device to a directory that you specified. To enable this feature use this configuration setting:

    <Settings>
        <BackupWorkouts enabled="true" path="~/Dropbox/Workouts/[YEAR]/[MONTH]/" />
    </Settings>

In path you can use the following placeholders:

  • ~ - Replaced by your home path (eg. /home/andreas) (only first char)
  • [YEAR] - Replaced by the year of your workout (eg. 2013)
  • [MONTH] - Replaced by the month of your workout (eg. 12)
  • [DAY] - Replaced by the day of your workout (eg. 31)
  • [TYPE] - Replaced by FIT or TCX, depending on file type

Needs plugin version 0.3.17

ForerunnerTools

The plugin automatically searches for Edge305/Forerunner305 devices using garmintools. This search confuses some garmin devices so much that they switch themselves off during the next gpsbabel transfer. If you don't own an Edge305/Forerunner305 you can disable this search by setting enabled to false.

    <Settings>
        <ForerunnerTools enabled="false" />
    </Settings>

Disable local scan

The plugin automatically searches through all your mounts for any file based garmin device. When using only a virtual device you might want to disable this scan by setting enabled to false.

    <Settings>
        <ScanMounted enabled="false" />
    </Settings>

Needs plugin version 0.3.20

Debug settings

The plugin supports writting a file that contains debugging information. You can enable this by changing the following line in the configuration:

   <GarminPlugin logfile="/tmp/garminplugin.log" level="DEBUG">

If you want to enable logging set logfile to /tmp/garminplugin.log (or any other file). Level can be either DEBUG, INFO or ERROR. While Debug shows the most. If you set the level to DEBUG, the plugin will store all generated tcx and gpx files in the directory /tmp for further analysis (Format: <timestamp>.TcdXml or <timestamp>.GpsXml)

 
configuration.txt · Last modified: 2017/08/13 18:45 (external edit)     Back to top