Skip to content

0.8.0 – set up by answering questions, a web page, alerts by e-mail and push

Choose a tag to compare

@futureweb futureweb released this 12 Oct 14:32
· 43 commits to main since this release

Set up by answering questions, run in the background without a window, sign in to
Garmin in your browser – also on a NAS – and get an e-mail or a push message when the
bridge needs you.

Upgrading needs no change: systemd units and containers keep working as before.
Windows and Mac users who followed the earlier guides can run setup once in their
bridge folder: it takes over settings, Garmin session and data and replaces the
hand-made logon task / launch file. Container users: the image now serves an
optional web page (BRIDGE_UI_PORT, BRIDGE_UI_PASSWORD).

Added

  • setup – the whole setup as questions: Intervals API key (checked on the spot,
    never shown), time zone, Garmin sign-in with MFA, gear, ImReady4 (only when its field
    exists), the trend advice, charts, a trial run that writes nothing, then the start
    in the background. Saves after every step; run it again to change anything.
  • autostart [--status | --remove | --dry-run] – runs the bridge at every login:
    a Task Scheduler task for your own account on Windows (pythonw.exe: no window, no
    admin rights, no 72-hour limit, also on battery), a LaunchAgent on the Mac, a systemd
    user service on Linux.
  • The web page – ui opens it in your browser (127.0.0.1, a random key in the
    link); next to run, e.g. in a container on a NAS, with BRIDGE_UI_PORT and
    BRIDGE_UI_PASSWORD. Status in plain words, Garmin sign-in with MFA (a waiting
    bridge goes on within a minute – no container terminal needed any more), settings,
    gear and chart plans with a confirm button, today's training advice, the log.
    Standard library only, no JavaScript; CSRF tokens, Host and Origin checks, strict
    CSP.
  • When the bridge needs you – Garmin's session ended, or something has been failing
    for a day – it tells you: a note in your Intervals calendar (once per episode,
    from a bridge running with --apply, never deleted by the bridge), and when set up an
    e-mail (through your own mailbox; the servers of Gmail, GMX, web.de, iCloud and
    others are built in) and/or a push message on your phone (the free ntfy app, no
    account; headlines only). setup and the web page set them up and send a test message;
    notify-test does too.
  • Update hint – once a day the health run asks pypi.org for the newest version
    and logs how to update (BRIDGE_UPDATE_CHECK=false turns it off).
  • Settings from ~/GarminBridge/.env (what setup writes) when there is no .env
    in the working folder: commands work from any terminal. Global --env-file PATH;
    relative paths in a settings file count from its folder.
  • BRIDGE_LOG_FILE – a log file (5 MB × 3, owner-readable only) that also catches a
    broken setting.
  • Unraid container template with the web page as WebUI (docs/UNRAID.md).
  • A Home Assistant add-on's /data/options.json is read when there is no settings file.
  • A data folder the container cannot write to is reported in words, with the fix.

Changed

  • Synology: a project file to paste (Container Manager → Project) instead of
    clicking a container together; Garmin sign-in on the web page (docs/SYNOLOGY.md).
  • compose.yaml keeps the bridge running (run – a dry run until you make it
    run --apply – restarting with the machine). Cron users schedule compose run as
    before.
  • Windows and Mac guides: three steps (Python, install, setup).

Guides: Windows · Mac · Synology · Unraid. Thanks to @darken for pointing at the rough edges of the NAS setup.

Install: pip install -U garmin-intervals-bridge (Windows: py -m pip install --upgrade garmin-intervals-bridge), then garmin-intervals-bridge setup (Windows: py -m garmin_intervals_bridge setup) – or the image ghcr.io/futureweb/garmin-intervals-bridge:0.8.0 / futurewebat/garmin-intervals-bridge:0.8.0 (Docker Hub).