๐ŸŽฏ OCD Trainer

Gamified dart practice on your own autodarts rig โ€” auto-scoring, many game modes,
central leaderboards + Elo, stats & heatmaps, and at the same time training a fully open dart detection engine.

๐ŸŽฎ all game modes & rules โ€” X01, Cricket, Clock, World, Bermuda, and every drill at a glance.

Runs on (the installer auto-detects yours โ€” nothing to pick):

Raspberry Pi OS Bookworm / Trixie ยท arm64 Ubuntu 24.04 LTS ยท amd64

What you need

The trainer takes over the cameras, so it pauses the autodarts service while it runs. It's a separate practice mode, not a replacement for autodarts โ€” stop the trainer and autodarts comes back.

What your rig sends home

You're lending your board to a research project, not signing up for surveillance. Straight answer on what leaves your Pi. Uploading is on by default (your rig enrolls itself on first start); opting out is one line โ€” comment out DT_CENTRAL_URL in /etc/dart-trainer/config.env and your rig runs fully local. Full detail, including the data-protection notice and your rights: ๐Ÿ“Š statistics & your data.

whatwhy it exists
Throws โ€” the 3 camera frames, the model's guess, your correction this is the training data. It's the whole point.
Calibration โ€” the solved geometry + its fit quality so a throw can be re-warped with the calibration that was live when it was captured
Health (every 10 min) โ€” version, model, calibration quality, camera angles, fps, free disk, errors so "is your rig OK?" is answerable without anyone logging into your Pi
Decision log โ€” the detection loop's own record (dart held / ignored / takeout / errors) the only thing that can explain "detection is broken" on a rig nobody can SSH into
Feedback โ€” only when you press the button your text, your rig's state, and a picture of the screen only if you tick the box
Not sent: anything from outside the app โ€” no microphone, no other windows, no files. The screenshot is a render of the trainer page itself. Telemetry is also best-effort: it's dropped rather than queued if it fails, so it can never slow down or block your game.

1 ยท Install

Tablet app: OCD Board for Android โ€” finds the Pi on your Wi-Fi, opens the board fullscreen and switches it between Trainer, Autodarts and Off.

One line (adds the dart-room APT repo and installs the trainer):

curl -sSL https://dart-room.com/trainer/install.sh | sudo bash

Prefer to do it by hand? Add the repo, then install:

# codename (bookworm/trixie/noble) + arch (arm64/amd64) are auto-detected
curl -fsSL https://dart-room.com/apt/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/dart-room.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/dart-room.gpg] https://dart-room.com/apt $(. /etc/os-release; echo $VERSION_CODENAME) main" \
  | sudo tee /etc/apt/sources.list.d/dart-room.list
sudo apt update && sudo apt install dart-trainer
No internet on the Pi? dart-trainer-offline carries the trainer itself, but it still needs dart-trainer-deps and dart-trainer-voice-ljspeech from this repo plus a few Debian Python libraries (python3-opencv, -numpy, -scipy, -mnemonic, -segno, -cryptography). Download all of them with their dependencies on a machine with the same OS version, copy them over and sudo apt install ./*.deb. Raspberry Pi (arm64) only. Direct download (fill in the version from what's new and your codename): https://dart-room.com/apt/pool/main/d/dart-trainer-offline/dart-trainer-offline_<version>-1+<codename>_arm64.deb โ€” or, on any machine that has the repo configured, apt-get download dart-trainer-offline.

2 ยท Configure your rig

The defaults are fine for a standard 3-camera autodarts rig โ€” you can skip straight to step 3 and play right away (auto-scoring is on, a unique rig id is assigned automatically, and you set your name on the tablet). Only edit the file below if you want to turn off uploads or set a friendly rig/player name.
sudo nano /etc/dart-trainer/config.env      # then: sudo systemctl restart dart-trainer

Every setting, with its default and a comment, is in /usr/lib/dart-trainer/config.env.template (refreshed on every upgrade; your file is never touched). Rigs installed before 0.7.29 still read the old /opt/dart-trainer/env first โ€” the new file wins key by key.

settingwhat it is
DT_DEVICESyour 3 cameras, e.g. 0:/dev/video0,1:/dev/video2,2:/dev/video4 (check with v4l2-ctl --list-devices)
DT_PLAYERyour default name (you can change it on the tablet)
DT_RIG_IDauto by default (a unique id derived from the machine) โ€” leave it, or set a friendly name e.g. toms-rig. Keeps every rig cleanly separate in the data.
DT_PORTweb port (default 8788)
DT_CENTRAL_URLthe central dataset (https://dart-room.com/dataset). Comment it out to run fully local.
DT_CENTRAL_TOKENnormally empty โ€” the rig enrolls itself. Only for a hand-provisioned token, and only here: never on the command line / in DT_EXTRA, where every process can read it.
DT_HUB_URLhttps://dart-room.com โ€” online play (needs the dart-room-bridge add-on, see step 7). DT_DART_ROOM=0 switches it off.
DT_EXTRAauto-scoring: --model-weights /opt/dart-trainer/data/tipnet.onnx. The package ships the current stable model, so it scores from the first dart; newer models arrive over the air. Clear this line for manual-tap mode (no model).

Central needs no token from you โ€” the rig enrolls itself on first start (new rigs stay quarantined from training until trusted). To run fully local instead, comment out DT_CENTRAL_URL โ€” see statistics & your data.

Your token is yours alone. It's minted for your rig: it can upload your throws and read the leaderboards and the model โ€” and that's all. It cannot read anyone else's data (no other rig's frames, no feedback, no screenshots), it cannot post as another rig, and it can be revoked on its own without touching anybody else's. Keep it out of screenshots and pastebins; if it leaks, say so and we'll mint you a new one in ten seconds. The file is chmod 600 for the same reason.

3 ยท Start & open the scoreboard

dart-trainer            # starts it (pauses autodarts to use the cameras)

On your tablet/phone on the same network, open http://<your-pi-ip>:8788. Steps 4โ€“5 below are one-time buttons inside that web UI.

4 ยท Calibrate the board (one-time, per rig)

A self-service button now. Auto-scoring needs the mapping from your three cameras to the board โ€” found by automatic board detection (the rings & wires in each image). No checkerboard, no manual alignment.
Coming from autodarts? You'll calibrate far less here.
In autodarts, re-calibrating and re-orienting is a constant chore. On this system it is one-time setup, not a routine: calibrate once after installing (or if you bump a camera or rotate the board), confirm orientation, and you're done. Our reference rig played daily for a full week with zero re-calibration and zero re-orientation โ€” the geometry simply doesn't drift the way you're used to. If your scores land where the darts land, don't touch it. The tablet warns you in red on the rare day the board actually shifts; until then, leave Calibrate and Orientation alone.

5 ยท Confirm orientation (after every calibration)

Which spoke is the 20? It's proposed automatically โ€” a vision model reads the board's numbers โ€” and you just confirm.
โš  This is the one step people skip โ€” and it silently costs you every score. Calibrating resets the orientation to an automatic guess, and the guess is not reliable. Until you confirm it, the geometry is perfect but the board is scored a whole sector off โ€” a T20 lands as a 5 and nothing looks broken. So: rotate the board (or press Calibrate) โ†’ Calibrate โ†’ CONFIRM ORIENTATION. The tablet nags you in red until you do.

6 ยท Play

17 game modes

X01 (301/501/โ€ฆ) ยท 501 Head-to-Head (Elo) ยท Cricket ยท Count-Up ยท Around the Clock ยท Around the World (doubles) ยท Bob's 27 ยท Shanghai ยท High Score 3 ยท Treble 20 ยท Treble 20 ยท until ยท Group Builder ยท JDC Challenge ยท Checkout 121 ยท Finishing 50 ยท Checkout Routes ยท Bermuda Triangle (Halve-It). Rules for each: game modes.

7 ยท Play online (dart-room.com) โ€” optional

Online 501 against a friend's board, with the match page, recap and board photos on dart-room.com, is an add-on: dart-room-bridge. A normal install brings it along; if Settings has no dart-room.com section, install it:

sudo apt update && sudo apt install dart-room-bridge     # needs dart-trainer โ‰ฅ 0.10.18
sudo systemctl restart dart-trainer

Easiest, with the Android app: install the dart-room app on a phone or tablet on the board's Wi-Fi, set its App mode to Match or Both, sign in on dart-room.com there, then menu โ†’ Link a board. It finds the board and links it to your account โ€” nothing to copy. The board has to be in Trainer mode. Without the app:

  1. On dart-room.com โ†’ Account: sign in and press Generate pair code. It shows a short code (XXXX-XXXX).
  2. On the tablet: โš™ Settings โ†’ dart-room.com. Type the code into the code field and tap Pair.
  3. Stay on Account โ€” a Confirm button appears once the board has the code. Press it, copy the pair token, paste it into the pair token field on the tablet, tap Finish. The token stays on Account until the board has it.
  4. Done: โš™ Settings โ†’ Outside control now says Controlled by: dart-room.com. From then on you start a match on the site and the board joins by itself โ€” no codes at the oche.

Outside control. A board is controlled by at most one outside app at a time, and Settings shows which one, since when, with Unlink. Unlink at the board also releases it on dart-room.com. While a board is not linked, any app on your network may link it without a tap at the board โ€” the same trust as the rest of the board on your LAN. Developers: the board announces itself as _opendarts._tcp and answers GET http://<board>:8788/api/control/v1/hello โ€” the start of the open control API.

Pairing is one-time per board. The website cannot reach your Pi directly (HTTPS โ†’ LAN), which is why, without the app, the two codes travel through you. Confirm within 15 minutes of the board taking the code, or pair again. No terminal needed; if the section is missing from Settings, the dart-room-bridge add-on is not installed or not running. If a code is refused the section tells you why: That code isnโ€™t right (check it on the site), Code expired โ€” generate a new one, or This board is already linked to another account.

Updating

New SD card, or Bookworm โ†’ Trixie

The board has no export file for its own data. Games that already reached dart-room.com come back with a player's 12-word ID. Calibration, the player list, colours, and throws still waiting to upload come back only if you still have the old card. Three cases, easiest first.

On a version that includes Settings โ†’ Backup, games, highscores, the player list, groups, and calibration can also be written to a folder on the Pi every day and imported from that folder. The folder stays on the board. The trainer runs as the user opendarts, so a folder you made yourself (a USB stick mount, for example) needs to be handed over first:

sudo chown opendarts:opendarts /mnt/usb/trainer-backups

Moving with a key backup (0.9.145 and newer, easiest)

The daily backup never carries the board's key or the players' keys. For a move, tick Export now also takes this board's key and the player keys, type a key password (at least 8 characters), and tap Export now. That writes a โ€ฆ-keys.tar file, readable only by the trainer. The keys inside it are encrypted with your password; the games are not. Copy the file to the new card's backup folder and hand it to the trainer (it is 0600, so a copy made with sudo cp belongs to root until you do):

sudo cp trainer-backup-*-keys.tar /mnt/usb/trainer-backups/
sudo chown opendarts:opendarts /mnt/usb/trainer-backups/trainer-backup-*-keys.tar

Then open Settings โ†’ Backup there, type the same password, and tap Import. Then restart the trainer: it uploads under the old board's name again, keeps its dart-room.com pairing, and every player has their ID back. Nothing to edit in config.env, unless you had set DT_RIG_ID to a different name on the new card; the board then tells you which name to set.

Anyone holding a key backup can upload as your board and sign as your players, and a player key cannot be changed afterwards. Keep it off shared drives and delete spare copies. After the move, do not put the old card back online: both cards would upload as the same board.

Same card, OS upgraded in place

The files are still on it. Re-run the installer: it detects the new codename and installs that package. /var/lib/dart-trainer and /etc/dart-trainer/config.env stay put. Calibrate again only if a camera or the board moved.

curl -sSL https://dart-room.com/trainer/install.sh | sudo bash

New image, old card still readable (no key backup)

Plug the old card in with a USB card reader and mount the large ext4 partition labeled rootfs (the small bootfs partition holds nothing from the trainer). The reader can sit in the new Pi (easiest: one copy step) or in a Linux PC (then the files travel to the Pi over the network). Install the trainer on the new Pi as in step 1 first. If the mount says the journal needs recovery, mount once without -o ro so it can replay, then remount read-only.

lsblk -f                                  # find the rootfs device, e.g. sda2
sudo mkdir -p /mnt/oldpi
sudo mount -o ro /dev/sdX2 /mnt/oldpi     # replace sdX2 with the rootfs device
# a desktop PC may already have mounted it, e.g. at /run/media/<you>/rootfs โ€” use that path instead

1. Find the old board's name. It is not always in config.env (it may have been set elsewhere, or derived from the machine id). The board's own games record it:

sudo python3 -c "import sqlite3; c=sqlite3.connect('file:/mnt/oldpi/var/lib/dart-trainer/stats.db?mode=ro', uri=True); print(c.execute('select rig_id, count(*) from games group by rig_id').fetchall())"

The name with the most games is the one. Its key is .central-token; that file must belong to it, or uploads come back rejected. If in doubt, send us the fingerprint (never the file): sudo sh -c 'tr -d "\n" < /mnt/oldpi/var/lib/dart-trainer/.central-token | sha256sum | cut -c1-12'

2a. Reader in the new Pi: copy the whole trainer directory, then hand it to the trainer's user.

sudo systemctl stop dart-trainer
sudo rsync -a /mnt/oldpi/var/lib/dart-trainer/ /var/lib/dart-trainer/
sudo chown -R opendarts:opendarts /var/lib/dart-trainer
sudo umount /mnt/oldpi

2b. Reader in a PC: pack the directory there, copy it to the Pi, unpack it on the Pi.

# on the PC
sudo tar -C /mnt/oldpi/var/lib/dart-trainer -cf ~/oldpi-trainer.tar .
sudo chown $USER ~/oldpi-trainer.tar
scp ~/oldpi-trainer.tar <you>@<pi-address>:/tmp/
# on the Pi
sudo systemctl stop dart-trainer
sudo tar -xf /tmp/oldpi-trainer.tar -C /var/lib/dart-trainer
sudo chown -R opendarts:opendarts /var/lib/dart-trainer
rm /tmp/oldpi-trainer.tar                 # and on the PC: rm ~/oldpi-trainer.tar

The chown is not optional: the files keep the old card's user number, which is a different user on the new card, and the key files are readable by their owner only. The tar holds the board's key and the players' keys: delete it once it is unpacked.

3. Set the name and start. Put the name from step 1 into /etc/dart-trainer/config.env as DT_RIG_ID=<name> and run sudo systemctl start dart-trainer. A new image has a new machine id, so without this line the board would come up under a new name the old key does not fit. A wrong name or key shows itself as a red central is REJECTING this rig line on the scoreboard; no red line after a few throws means the old board is back. Uploads queued under any other name are put aside on the board (0.9.147 and newer). Keep the old card offline from now on.

Old card is gone

Install as in step 1, calibrate, and confirm orientation. A fresh image enrolls itself as a new board, which is enough for the restore. For each player who still has their words: add the same name, open the key, tap I already have one (12/24 words), type the words or photograph the words QR, and confirm Restore your history from central onto this rig?

That writes the player's games and throws into a fresh local database. A name that never had a player ID has no self-service restore. The roster, colours, settings, and throws that never uploaded stay on the old card. A bounce comes back as an ordinary miss. The on-board leaderboard fills again as you play; scores already uploaded stay on the dart-room leaderboard.

Release channels โ€” main vs beta

The APT repo has two components. Fresh installs get main only (stable). That's what you want for everyday play.

channelwho it's forwhen it updates
maineveryone by default โ€” friends, production play only after a version has soaked and is promoted
betaopt-in โ€” people who want the newest detection fixes early every CI build lands here first (before main)

Opting into beta is one word on the sources line. You can leave anytime by dropping beta again and reinstalling the main package.

# 1) Edit the sources line โ€” add the word "beta" after "main"
#    (codename is usually "trixie" or "bookworm" โ€” leave yours as-is)
sudo nano /etc/apt/sources.list.d/dart-room.list
# before:  โ€ฆ https://dart-room.com/apt trixie main
# after:   โ€ฆ https://dart-room.com/apt trixie main beta

# 2) Upgrade to whatever is currently in beta
sudo apt update
sudo apt install -y --only-upgrade dart-trainer

# 3) Check the version (should match the beta package you wanted)
dpkg -l dart-trainer | tail -1
# or:  curl -s http://127.0.0.1:8788/status | head
Beta is opt-in. Leaving it out of your sources means you stay on the last promoted stable version and never get mid-soak builds by accident. The installer still only enables main โ€” beta is never forced.

Troubleshooting

game modes ยท statistics ยท where your data lives ยท dart-room.com ยท made for the crew ๐ŸŽฏ