Migrating from V1 to V2
Version 2 of P2G is a complete rewrite of Version 1 into dotnet. Version 2 has feature parity with Version 1 and additional new features. One of the key benefits of Version 2 over Version 1 is the ability to generate and upload FIT files. FIT files are able to capture more data than the TCX format used in Version 1.
Version 2 will not interfere with your Version 1 install, so if anything doesn't work for you on V2, you can always return to using V1.
Steps
1. Backup your current config
- Navigate to where you currently have version 1 installed
- Rename the folder to something like
p2g_v1
2. Download v2
- Download and install v2, see Install
3. Migrate your config
- Find your original v1
config.ini
file and open it
- In a new window, find the v2
configuration.local.json
file and open it
- Below walks through section by section how the old config maps to the new config values.
Peloton section
[PELOTON]
Email = pelotonEmail@example.com
Password = pelotonPassword
WorkoutTypes = cycling, strength
Property |
New Config |
Notes |
Email |
Peloton Config.Email |
|
Password |
Peloton Config.Password |
|
WorkoutTypes |
Peloton Config.ExcludeWorkoutTypes |
In v1 this was a list of workout types to include, in v2 this changes to a list of workout types to exclude. |
Garmin section
[GARMIN]
UploadEnabled = false
Email = garminEmail@example.com
Password = garminPassword
Property |
New Config |
Notes |
Email |
Garmin Config.Email |
|
Password |
Garmin Config.Password |
|
UploadEnabled |
Garmin Config.Upload |
You will additionally need to specify FormatToUpload if you have this enabled. |
PTOG Section
[PTOG]
EnablePolling = false
PollingIntervalSeconds = 600
Property |
New Config |
Notes |
EnablePolling |
App Config.EnablePolling |
|
PollingIntervalSeconds |
App Config.PollingIntervalSeconds |
|
Output Section
[OUTPUT]
Directory = Output
WorkingDirectory = Working
ArchiveDirectory = Archive
RetainFiles = true
ArchiveFiles = true
SkipDownload = true
ArchiveByType = true
Property |
New Config |
Notes |
Directory |
none |
|
WorkingDirectory |
App Config.WorkingDirectory |
|
ArchiveDirectory |
App Config.OutputDirectory |
|
RetainFiles |
Format Config.SaveLocalCopy |
|
ArchiveFiles |
none |
|
SkipDownload |
none |
|
ArchiveByType |
Format Config.[Fit,Tcx,Json] |
Set the formats you want to save to true and then set SaveLocalCopy: true |
Logger Section
[LOGGER]
LogFile = peloton-to-garmin.log
LogLevel = INFO
For the general use case, the below config should be sufficient.
"Observability": {
"Serilog": {
"Using": [ "Serilog.Sinks.Console", "Serilog.Sinks.File" ],
"MinimumLevel": "Information",
"WriteTo": [
{ "Name": "Console" },
{
"Name": "File",
"Args": {
"path": "./peloton-to-garmin.txt",
"rollingInterval": "Day",
"retainedFileCountLimit": 7
}
}
]
}
}
Debug Section
[DEBUG]
PauseOnFinish = true
Property |
New Config |
Notes |
PauseOnFinish |
App Config.CloseWindowOnFinish |
|