Treadmill Console: Intervals and Video Tours

AndroidHardwareOpen SourceAI Agents
Kotlin Android USB HID JavaScript WebView Python OpenStreetMap ffmpeg Claude Code Open Source

Project Overview

Who

I built this for my own treadmill. It's a ProForm with a built-in Android touchscreen console.

What

A replacement app for the treadmill's console. It talks to the motor board over USB, so it sets speed and incline directly. It's based on STRIDE, an open-source console app written by someone else for a NordicTrack model.

I added interval programs. You build a program on the console from steps of speed, incline, and time, and the treadmill changes on its own at each step. Speed and incline are capped at 6 mph and 5 percent.

I also added video tours. A walking video plays at a pace that matches the belt, and the incline follows the real elevation of the route. There are four so far: the Pīpīwai Trail on Maui, the Bray to Greystones cliff walk in Ireland, central Düsseldorf, and Kyoto.

When

October 2026. I started with an interval runner on October 23, switched to STRIDE on October 25, and added tours the next day.

Where

The app runs on the console itself. The tour videos are built and served from a small server on my home network. Nothing is published to the internet.

Why

I wanted workouts that change speed and incline without me pressing buttons. My first try drove the stock app by tapping its sliders from another computer. It worked, but it was slow, and taps got dropped while the incline motor was moving.

STRIDE talks to the motor board directly, which is the better way to do it. But it needed Android 9, and this console runs Android 7, so I ported it.

Open Source

The app I built on, STRIDE, is someone else's open-source project. I split the fixes that would help other owners into separate changes and sent them back to the original project. All three are waiting for the author's review.

The interval programs and video tours stay in my own copy. The original app deliberately only suggests speed changes, so those aren't part of my pull requests.

How It Works

  • The Android 7 port lowers the minimum version, adds a fallback for one audio call that older Android doesn't have, and scales the app's fixed 1280x800 screens to fit the console's 1024x600 panel.
  • I fixed a units setting that did nothing in the original app. The main screen and the interval editor now follow it.
  • Each tour is built by a Python script. It takes the route from OpenStreetMap and the elevation from public terrain data, then scales the grades to about 3 percent on average with a 5 percent cap. Landmarks in the video are matched to points on the route so the video stays in sync.
  • A scheduled AI agent (Claude Code) looks for new tours once a week and adds up to two. It only uses videos with a Creative Commons Attribution license, checks the landmarks against frames from the video, and keeps a list of every video it used or rejected and why. Its first run added Kyoto and rejected six others.
  • The video credit shows on screen during the walk.
  • Before changing anything on the console, I saved its original state and wrote down how to roll back.

Still open: I haven't confirmed that the app starts on its own after the console is powered off and on. Tours only work in one of the app's five screen styles. The tours are silent because slowed-down audio sounded bad. The pull requests haven't been reviewed yet.

Stack & Tools

Console App
STRIDE (open source), Kotlin, Android 7
Motor Control
USB HID
Interface
HTML, JavaScript, WebView
Tour Builder
Python, ffmpeg
Route Data
OpenStreetMap, public elevation data
AI Agent
Claude Code, weekly
Scheduling
systemd timers
Source
GitHub, fork and pull requests