Feed live timing from your LMU server
A small program running on the machine that hosts your LMU dedicated server reads the game's own shared memory and sends a snapshot to SRC every few seconds — position, laps, last/best lap, gap to leader and pit status, shown live on /live.
--once to test → then run it for real. Watch it at Live timing.1What it does
Le Mans Ultimate publishes live session data (who's racing, their position, laps, sector and lap times, gaps, pit status) into a block of Windows shared memory while a session is running — this is Studio 397's own plugin interface, the same data source dashboard and overlay tools use. The bridge script reads that memory and posts a snapshot to SRC every few seconds, which the /live board polls and displays.
This is entirely separate from result files — it only works while a session is actually live, and it never touches the result itself.
2What you need
- The bridge must run on the same machine that actually runs the LMU dedicated server process. Shared memory is local to that machine — it cannot be read over FTP, over the network, or from a different PC. If your server is hosted by a third party you don't have a login/console on, this won't be possible there.
- Windows 10/11 and Python 3.10+ on that machine (no extra Python packages needed).
- The LMU.3.8.SharedMemoryMapPlugin.dll plugin installed and enabled on the dedicated server (see next section).
- Staff access on SRC, to generate the server's token under Admin → Servers.
3Installing the plugin
The bridge only reads shared memory — something else has to be writing it. That's the job of LMU.3.8.SharedMemoryMapPlugin.dll, a server plugin, not part of the bridge itself.
- Drop the plugin DLL into the dedicated server's plugin folder (typically the Bin64/Plugins folder inside the server install).
- Enable it in the server's plugin config, if it isn't picked up automatically — check whatever install notes shipped with the DLL you were given.
- Restart the dedicated server so it loads the plugin.
4Get the server token
The token is how the bridge proves a snapshot belongs to a particular server. It's tied to that server, not to you personally.
- Open Admin → Servers and click into your LMU server.
- Scroll to Live timing bridge and press Generate token.
- Download
src-live-bridge.pyfrom the same card, and copy it (or the run command, which already has the token and address filled in) onto the server machine.
5Test it first
Before leaving it running unattended, confirm the bridge can actually read the game. While a session is live on that server, open a command prompt on the same machine and run:
python src-live-bridge.py --onceThis prints one snapshot as JSON and exits — no upload happens. Check it looks sane: real driver names, plausible lap times (seconds, not zero or absurdly large), and the right track name. If it instead says “No live session found”, see Troubleshooting below before moving on.
6Run it live
Once the test output looks right, run it for real:
python src-live-bridge.py --token "YOUR_TOKEN" --endpoint "https://your-site/api/ingest/live"It uploads a snapshot every 3 seconds while a session is live, and prints a one-line status (track, car count, session clock, upload result) so you can see it's working. Leave the window open for the duration of the session — closing it stops the feed.
7Reading the board
Open /live — any event tied to this server shows an Open board link once a live session exists. The board shows position, driver, car, class, laps, last lap, best lap, gap to leader and a PIT tag, refreshing every few seconds. A red “signal lost” notice appears if no snapshot has arrived in the last 20 seconds — check the bridge window is still running.
8Start it automatically (optional)
If the server machine restarts or the session is unattended, use Windows Task Scheduler so you don't have to start it by hand every time:
- Press Start, type Task Scheduler, open it.
- Create Task… (not “Basic Task”). Name it “SRC live timing bridge”.
- On Triggers: New → whatever fits your server (at log on, or on a schedule around your race sessions).
- On Actions: New → Program:
python.exe. In Add arguments, putsrc-live-bridge.py --token "…" --endpoint "…", and set Start in to the folder the script is saved in.
9Troubleshooting
“No live session found” with the game clearly running
- Confirm the plugin DLL is actually installed and enabled on this server (section 3) — the bridge can't invent data the plugin doesn't publish.
- Confirm you're on the exact machine running the dedicated server process, not a different PC on the same network.
- If the server runs as a Windows Service rather than an interactive session, the shared memory may live in a different session namespace and not be visible to a script run from your own logged-in desktop — run the bridge from the same session the service runs in.
“This bridge must run on Windows.”
The reader uses Windows-only APIs (named shared memory). It can't run on Linux or inside WSL.
“unknown token”
The token was regenerated since you copied the command. Go back to Admin → Servers, copy the current one, and update wherever you saved the run command (including any Task Scheduler job).
Board shows “signal lost”
No snapshot arrived in 20+ seconds — check the bridge window is still open and its status line still shows upload: ok. An HTTP error there means the token or address is wrong; a connection error means the machine can't reach the site (check its internet connection / firewall).
Driver names or lap times look garbled or clearly wrong
Send an admin the --once output — that's a reader bug, not a setup problem, and can be fixed from a real sample.
