Trainerjs
Trainer.js is a Typescript application that makes it possible to experience recorded or planned gpx tracks on your home trainer via WebUSB.
Install / Use
/learn @floschnell/TrainerjsREADME
trainer.js
trainer.js is a Typescript application that lets you experience recorded gpx tracks on your home trainer.

Features of the webapp are:
- loading and smoothing of a GPX route
- connecting to your bike trainer (via WebUSB)
- collecting metrics like power, speed, cadence and heart rate
- adjusting slope depending on your current position on the GPX route
- rendering your position into a 3d environment via CesiumJS
- exporting your stats as a GPX file, so you can share your efforts on Strava or elsewhere
Supported Trainers
Currently there's only one supported bike trainer, but adding others should be fairly easy. With you support, I hope, more trainers will be added soon!
- Tacx Bushido (t1980)
Adding a new trainer
Connecting your trainer to the Simulation requires a driver first. What is special about trainer.js is, that it already provides a basic ANT+ driver implementation that works via WebUSB. New drivers can build upon this functionality and will work out of the box. A user only needs to load the webpage and all USB control will be handled by bike.js.
WebUSB Driver
Checkout the basic ANT+ driver file for a very lightweight ANT+ driver. It yet handles the very basic message formats, that were needed for the Bushido (t1980).
The Bushido driver builds up on the ANT+ driver and adds only some proprietary messages and the special communication logic. It is capable of reading speed, distance, power, cadence and heart rate from the Bushido control unit. Furthermore, it lets you control the device's simulated slope. The Bushido communication protocol is closed source. However, there have been successful attempts in deciphering the different messages. You can find the documentation here.
Related Skills
node-connect
352.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
