A Ulanzi Studio plugin that turns one D200 key into a Counter-Strike 2 C4 timer. When the bomb is planted the key starts at 40 and counts down inside a shrinking ring.
CS2 starts it automatically through Game State Integration (GSI).
Interactive — watch the countdown ring in action
Use ← → arrows or click the dots below to navigate
The colour and label change as time runs out, telling you at a glance whether a defuse is still possible.
| Time Left | Ring | Label |
|---|---|---|
| > 10 s | ● Orange | BOMB |
| 6 – 10 s | ● Red | KIT ONLY — only a kit defuse (5 s) can still make it |
| ≤ 5 s | ● Red, flashing | TOO LATE |
| Round ends | ● Green / Red burst | DEFUSED / BOOM → then C4 / READY |
| Backend offline | ◌ Dashed grey | OFFLINE |
Pressing the key starts/stops a manual 40 s countdown (amber M badge). A real CS2 plant replaces it.
The data flows from Counter-Strike 2 through a lightweight Python server to the Ulanzi plugin and onto the physical key.
round.bomb = planted / defused / exploded to players, but not the countdown itselfexploded event arrives within 2.5 s, the bomb is assumed to have explodedidletimers.js so the hidden WebView doesn't slow them downA WS2812B / NeoPixel strip that reacts to the bomb in real time, driven by an ESP32 or Arduino Nano over USB serial.
| Event | Animation |
|---|---|
| Bomb beep | 🔴 Red flash — synced to the C4 beep cadence (accelerates as time runs out) |
| Armed glow | 🟠 Dim orange pulse between beeps |
| Defused | 🟢 Green sweep/chase across the strip |
| Exploded | ⚪ White flash → 🟠 expanding fireball → fade to dark |
| Idle | LEDs off |
Full details: parts list, wiring diagrams, WLED alternative → LED_SETUP.md
Click folders to explore the tree.
Copy gamestate_integration_bomb.cfg into your CS2 cfg folder:
Windows: C:\Program Files (x86)\Steam\steamapps\common\
Counter-Strike Global Offensive\game\csgo\cfg\
Restart CS2 — it only reads GSI files at startup. The file name must start with gamestate_integration_.
Python 3.8+. No packages needed.
python backend/bomb_timer.py # basic python backend/bomb_timer.py --voice # + spoken callouts
| Option | Default | Description |
|---|---|---|
--port | 3000 | GSI POST + GET /state |
--token | CS2BOMBTIMER | Must match .cfg; "" disables |
--bomb-time | 40 | C4 fuse length (seconds) |
--voice | off | pyttsx3 / macOS say / Win SAPI |
com.ulanzi.cs2bombtimer.ulanziPlugin folder to:%APPDATA%\Ulanzi\UlanziDeck\Plugins\Requires Ulanzi Studio 2.1.4+
python backend/bomb_timer.py python tools/mock_gsi.py # plant → BOOM at 0 python tools/mock_gsi.py --outcome defused --defuse-at 7 curl -X POST http://127.0.0.1:3000/manual/start # backend-side 40 s countdown curl -X POST http://127.0.0.1:3000/reset
Open tools/preview.html — its lower half polls /state the same way the plugin does.
python -m unittest discover -s tests # 24 Python tests node --test tests/bombLogic.test.js # 15 plugin logic tests
Click any field to see its description.
The plugin only needs status and time_remaining. It also accepts state, remaining, time_left, or countdown — so an existing script with different field names usually still works.
⚠️ CORS: Your backend must send Access-Control-Allow-Origin: * on /state. Without it the Ulanzi Studio WebView blocks requests and the key shows OFFLINE.
Simulator coverage: main service connects, add draws C4/READY, mock GSI round transitions through all phases, key press toggles manual countdown, killing backend shows OFFLINE, settings sync works.
Things to check on hardware:
run event)| Component | License |
|---|---|
| Plugin code | MIT |
Ulanzi SDK (libs/) | Apache-2.0 |