Finally got some free time so I went ahead and did a full revamp of Stash T-Code USB that I was fixing in the previous thread.
Cleaning it up, streamlining and adding features that I really liked from other players (Thank you Yoooi and Zersty your projects are awesome!)
As usual, use at your own risk.
I am a developer and I (mostly) read and test the code but it is vibecoded.
Stash-TCode 1.1: play funscripts from Stash on your OSR/SR6 over USB, a Stash plugin with heart-rate edging
A Stash plugin that drives TCode devices (OSR2, SR6 and similar) straight from Stash’s own player over USB. It plays single and multi-axis funscripts in sync with the video, and with a Bluetooth heart-rate monitor it can edge you automatically.
Features
- Connect to T-Code device over USB or Bluetooth: connect once, then it reconnects by itself on refresh or replug.
- Per-axis control: range, invert, home position and a speed limit (%/s), in a settings dialog that looks native to Stash.
- Linked axes: make an axis follow another, e.g. twist mirroring stroke (0–100% stroke = 0–100% twist), optionally overriding the axis’s own script.
- Auto motion: a smooth sine wave at your chosen frequency for any axis without a script, so even videos with no funscript get motion.
- Idle motion: a slow stroke whenever no video is playing, while you browse for the next scene or with the video paused. It gives way the moment a video plays.
- Heart-rate edging (any standard Bluetooth HR monitor: chest strap or a watch broadcasting HR):
- Strokes shorten as your heart rate approaches your edge. At the edge the stroker backs off until you recover, then ramps back in.
- Adaptive decay lowers the edge as edges add up over a long session.
- Climax markers: tag a Stash scene marker “Climax” and the limiter lets go around that point in the video. Not ready yet? Switch climax markers off and keep edging through them.
- Safety: if the monitor drops out or you take the strap off, the device stops.
- Stats overlay on the video: heart rate, edge, edge count and what the limiter is doing. The navbar button shows the device and monitor status and your live heart rate.
- Settings in your browser or in Stash: optionally save them to Stash so every browser uses them, private windows included.
Install
- In Stash, go to Settings → Plugins → Available Plugins → Add Source and add
https://dtt-git.github.io/stash-tcode/main/index.yml - Tick Stash-TCode, click Install and refresh the page.
- Click Connect in the navbar and pick your device.
Updates show up in Stash under Settings → Plugins → Check for updates.
Notes
- Use Chrome or Edge: Web Serial and Web Bluetooth are Chromium-only.
- Reaching Stash over plain HTTP by LAN IP or hostname? Add it to
chrome://flags/#unsafely-treat-insecure-origin-as-secure(Web Serial/Bluetooth need a secure origin).localhostand HTTPS work as they are. - Any address works: reverse proxy, different port, LAN name.
- Stash Interactive Tools is optional; you only need it for separate per-axis files (
.twist.funscriptetc.) and for picking between several scripts. - Tested on Stash v0.31.
Coming from the Tampermonkey userscript? It’s retired: 0.7.0 is its last version. Let Tampermonkey update it (a pop-up says it’s retired), then install the plugin and refresh. The userscript hands your settings to the plugin and stops running. Refresh once more, then delete the userscript. Don’t run the plugin next to an older userscript, or both will drive the device.
Heart-rate quick start
Device tab → Heart rate monitor → Connect. Then on the Heart Rate tab turn on Enable and set Edge to the heart rate that counts as an edge for you. The defaults (10 BPM approach band, 30% shortest stroke, 8 s rejoin) are a good starting point.
Credits
Based on Stash-TCode by Spunkle, with modifications by Steel. The heart-rate modulation is inspired by EdgeLoop by marshallmims and reimplemented here.
Source, docs and issues: GitHub - dtt-git/stash-tcode: Stash plugin: drive TCode devices (OSR2/SR6) from Stash over USB Web Serial, with heart-rate modulation · GitHub (GPLv3)


