Pit Wall
Lets friends use my sim rig and keep track of their progress.
- Built with
- Python, FastAPI, Postgres, SQLAlchemy, Keycloak passkeys, MinIO, ffmpeg, Home Assistant, Kubernetes, Gitea Actions
- Scan a QR code at the rig and get an account in seconds, with a passkey and no password.
- Drive.
- Your sessions show up in the portal: lap times, telemetry traces and a replay clip of every off-track moment.
Built in a weekend, mostly to see what Claude could do. It’s now a permanent part of the rig.
Sign-up at the rig
- The sim PC’s wallpaper shows a QR code that changes every 60 seconds and works for one account only, so a photo of the screen is useless a few minutes later.
- You give an email and the name you want on the timing screen, then register a passkey.
- Stock Keycloak can’t give a brand-new account a browser session without sending an email, so the portal creates the account with a one-time step that registers the passkey, then removes it. The account is passkey-only from then on.
From the car to the portal
- Live: a small service on the sim PC reads iRacing’s shared memory at 20 Hz and streams it to the portal. Any replica picks it up and fans it out to browsers, a live page and a TV view. A TV signs in by showing a QR code that a signed-in phone approves.
- After the session: once iRacing closes and its telemetry files have been quiet for two minutes, the PC uploads sessions, laps, incidents and clips in order, and picks up where it left off if interrupted. The telemetry files (284 channels) are read by a parser I wrote, not a library.
- Laps belong to whoever held the rig. iRacing records everything under the host’s account, so laps are matched to drivers by time overlap with their claim on the rig.
Incident clips
- When the driver gets out, Pit Wall switches motion off and puts up a “Saving your incident replays” screen.
- It replays each incident from 5.5 seconds before, in a chase camera, and records only the iRacing window with the GPU encoder, so no notifications or other apps ever end up in a clip.
- Black or frozen clips are thrown away. Each clip is streamed only to the driver it belongs to.
Controlling the rig
- Pit Wall never talks to the hardware directly. Everything goes through Home Assistant.
- The driver holding the rig can start and stop it from their phone, and change motion and bass shaker intensity, sound output and volume. Anyone signed in can stop motion.
- Tests fail the build if a route that could switch power or motion is ever added outside that path.
Under the hood
- FastAPI with async SQLAlchemy on Postgres, and clips in MinIO.
- Runs on my homelab Kubernetes cluster: two replicas, read-only filesystem, zero-downtime rollouts.
- Gitea Actions runs the tests on every push, and every merge to main builds an image tagged with its commit and rolls it out.
- About 9,400 lines of Python and 550 tests, built on 19 GB of my own iRacing telemetry.
- 56 commits across one weekend in September 2026, pairing with Claude and a local model agent.