# Garmin-integration - Supportguide
## Översikt
Appen stödjer synkronisering av träningspass till Garmin Connect, så att användare kan få sina pass direkt på sin Garmin-klocka.
## Hur funktionen fungerar
### Koppla Garmin
1. Gå till **Profil** → **Din klocka**
2. Tryck på **"Koppla Garmin"**
3. Logga in på ditt Garmin-konto i webbläsaren
4. Ge appen behörighet att synka workouts
5. Du kommer automatiskt att redirectas tillbaka till appen
### Synka ett pass till Garmin
1. Öppna ett pass från ditt program
2. Scrolla ner till Garmin-sektionen
3. Tryck på **"Skicka till Garmin"**
4. Ett meddelande bekräftar att passet har skickats
5. Öppna Garmin Connect-appen för att bekräfta att passet synkats
### Status-meddelanden
**✅ Synkad till Garmin**
- Passet har skickats till Garmin Connect
- Passet kommer synkas till din klocka när du öppnar Garmin Connect
- Du kan trycka på **"Öppna Garmin Connect"** för att öppna appen direkt
- Du kan trycka på **"Synka igen"** om du vill skicka passet igen (t.ex. om du tagit bort det från Garmin Connect)
**❌ Synkning misslyckades**
- Något gick fel vid synkningen
- Tryck på **"Försök igen"** för att försöka igen
- Om problemet kvarstår, se felsökningssektionen nedan
### Alternativa metoder
Om den vanliga synkningen misslyckas finns två alternativ:
**1. Skicka FIT-backup till Garmin**
- Tryck på **"Skicka FIT-backup till Garmin"**
- Använder Garmins äldre FIT-uppladdning som reserv
- Fungerar även om JSON-synkningen misslyckas
**2. Ladda ner FIT-fil manuellt**
- Tryck på **"Ladda ner FIT-fil för Garmin"**
- Följ instruktionerna för att ladda ner filen
- Överför filen manuellt till din Garmin-klocka via USB
## Vanliga problem och lösningar
### "Passet synkas inte till min klocka"
**Lösning:**
1. Öppna Garmin Connect-appen på telefonen
2. Kontrollera att klockan är ansluten och synkad
3. Gå till **Training** → **Workouts** i Garmin Connect
4. Verifiera att passet finns där
5. Synka klockan igen från Garmin Connect
### "Jag kan inte synka samma pass igen"
**Lösning:**
- Om du har tagit bort passet från Garmin Connect kan du trycka på **"Synka igen"**
- Systemet lägger automatiskt till datum och tid i namnet för att undvika exakta dupliceringar
- Exempel: "Intervallpass" blir "Intervallpass (2024-01-15 14:30)" vid återsynkning
### "Synkning misslyckades"
**Lösning:**
1. Kontrollera din internetanslutning
2. Försök koppla bort och koppla till Garmin igen:
- Gå till **Profil** → **Din klocka**
- Tryck **"Koppla bort Garmin"**
- Tryck sedan **"Koppla Garmin"** igen
3. Om problemet kvarstår, prova FIT-backup-metoden
### "Jag ser inte Garmin-knappen"
**Möjliga orsaker:**
- Du är inte kopplad till Garmin (gå till Profil → Din klocka)
- Funktionen är inte aktiverad i din version av appen
- Passet har inget workout_id
## Koppla bort Garmin
1. Gå till **Profil** → **Din klocka**
2. Tryck på **"Koppla bort Garmin"**
3. Bekräfta i dialogen
4. Din Garmin-koppling tas bort
## Tekniska detaljer
- Appen använder Garmin Training API för att skicka workouts
- OAuth 1.0a används för autentisering
- Workouts konverteras automatiskt till Garmin-format
- Status sparas i databasen för att spåra synkade pass
# Garmin Integration - Support Guide
## Overview
The app supports syncing workouts to Garmin Connect, allowing users to get their workouts directly on their Garmin watch.
## How the feature works
### Connect Garmin
1. Go to **Profile** → **Your Watch**
2. Tap **"Connect Garmin"**
3. Log in to your Garmin account in the browser
4. Grant the app permission to sync workouts
5. You will be automatically redirected back to the app
### Sync a workout to Garmin
1. Open a workout from your program
2. Scroll down to the Garmin section
3. Tap **"Send to Garmin"**
4. A message confirms that the workout has been sent
5. Open the Garmin Connect app to verify that the workout has synced
### Status messages
**✅ Synced to Garmin**
- The workout has been sent to Garmin Connect
- The workout will sync to your watch when you open Garmin Connect
- You can tap **"Open Garmin Connect"** to open the app directly
- You can tap **"Sync again"** if you want to send the workout again (e.g., if you removed it from Garmin Connect)
**❌ Sync failed**
- Something went wrong during sync
- Tap **"Try again"** to retry
- If the problem persists, see the troubleshooting section below
### Alternative methods
If the regular sync fails, there are two alternatives:
**1. Send FIT backup to Garmin**
- Tap **"Send FIT backup to Garmin"**
- Uses Garmin's legacy FIT upload as a fallback
- Works even if JSON sync fails
**2. Download FIT file manually**
- Tap **"Download FIT file for Garmin"**
- Follow the instructions to download the file
- Transfer the file manually to your Garmin watch via USB
## Common issues and solutions
### "The workout doesn't sync to my watch"
**Solution:**
1. Open the Garmin Connect app on your phone
2. Check that the watch is connected and synced
3. Go to **Training** → **Workouts** in Garmin Connect
4. Verify that the workout is there
5. Sync the watch again from Garmin Connect
### "I can't sync the same workout again"
**Solution:**
- If you've removed the workout from Garmin Connect, you can tap **"Sync again"**
- The system automatically adds date and time to the name to avoid exact duplicates
- Example: "Interval workout" becomes "Interval workout (2024-01-15 14:30)" when re-synced
### "Sync failed"
**Solution:**
1. Check your internet connection
2. Try disconnecting and reconnecting Garmin:
- Go to **Profile** → **Your Watch**
- Tap **"Disconnect Garmin"**
- Then tap **"Connect Garmin"** again
3. If the problem persists, try the FIT backup method
### "I don't see the Garmin button"
**Possible reasons:**
- You're not connected to Garmin (go to Profile → Your Watch)
- The feature is not enabled in your version of the app
- The workout has no workout_id
## Disconnect Garmin
1. Go to **Profile** → **Your Watch**
2. Tap **"Disconnect Garmin"**
3. Confirm in the dialog
4. Your Garmin connection will be removed
## Technical details
- The app uses Garmin Training API to send workouts
- OAuth 1.0a is used for authentication
- Workouts are automatically converted to Garmin format
- Status is saved in the database to track synced workouts
