Skip to content

blackxt600/SkylonRemoteApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Elliptical Server - Kettler Elliptical Bike Control Server

HTTP server in Rust to control a Kettler elliptical bike via Bluetooth with a modern web interface.

๐Ÿ“‹ Table of Contents

โœจ Features

Backend

  • ๐Ÿฆ€ Rust server with Actix-web
  • ๐Ÿ”ต Bluetooth communication with Kettler elliptical bikes (RFCOMM)
  • ๐Ÿ“ก REST API for remote control
  • โšก Real-time data updates

Web Interface

  • ๐ŸŽจ Modern dark glassmorphism design with 3-column layout
  • ๐Ÿ“ฑ Optimized for 11" tablet in landscape mode (99vh container)
  • โฑ Timer with auto-start/pause based on RPM
  • ๐Ÿ“Š Visual progress histogram with real-time tracking
  • ๐ŸŽฏ 10 modes: Flat (manual), 8 training programs + Game mode
  • ๐ŸŽฎ Space Runner game - RPM-controlled with obstacles and collectibles
  • ๐ŸŽฒ Custom program editor with random generator
  • ๐Ÿ”ง Difficulty control in 5W increments
  • ๐Ÿ–ฅ Fullscreen mode
  • ๐Ÿ“ˆ Real-time display: RPM, Power, Connection Status
  • ๐ŸŽฏ Enlarged playback controls for better touch interaction

๐Ÿš€ Installation

Prerequisites

# Rust (latest stable version)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Bluetooth
sudo apt-get install bluez libbluetooth-dev

Compilation

For Production (Raspberry Pi with Bluetooth)

# Clone the project
git clone https://github.com/blackxt600/SkylonRemoteApp.git
cd SkylonRemoteApp

# Build
cargo build --release

# Run
cargo run --release

For Development (macOS/Linux without Bluetooth)

# Build in mock mode (simulates bike data)
cargo build --release --no-default-features --features mock

# Run in mock mode
cargo run --release --no-default-features --features mock

The mock mode simulates realistic bike data (RPM, speed, power) without requiring Bluetooth hardware. Perfect for frontend development! See MOCK_MODE.md for details.

The server will be accessible at http://0.0.0.0:8080

๐Ÿ“ฑ Usage

  1. Bluetooth Connection: Pair your Kettler bike to /dev/rfcomm0
  2. Start the server: cargo run
  3. Open the interface: Navigate to http://localhost:8080
  4. Fullscreen mode: Click the โ›ถ button in the top right

Control Modes

Flat Mode (Manual)

  • Direct power control with +/- buttons in center panel
  • Visual histogram with uniform bar heights
  • All bars update simultaneously when power changes
  • Range: 25-400W

Program Mode

  • Select one of the 8 training programs
  • Adjust difficulty: -100W to +100W in 5W increments
  • Timer automatically starts/pauses based on your activity (RPM)
  • Visual histogram shows program progression

Custom Mode

  • Create personalized 30-minute programs
  • Edit individual interval power (25-400W)
  • Random generator with warm-up sequence (25-30-35W)
  • Persistent storage in browser

Game Mode

  • Space Runner: RPM-controlled arcade game
  • Avoid asteroids, collect stars
  • Progressive difficulty
  • Real-time score and distance tracking

๐Ÿ‹๏ธ Training Programs

Each program lasts 30 minutes with power adjustment per minute:

Program Description Intensity
Plat Manual mode with flat histogram โšก
Escalier Stepped power progression โšกโšก
Vallรฉe Gentle variations โšกโšกโšก
Collines Two distinct hills โšกโšกโšกโšก
Montagne Two peaks โšกโšกโšกโšก
Col Alpin Progressive climb โšกโšกโšกโšกโšก
Intervalle Intense intervals โšกโšกโšกโšกโšก
Pyramide Symmetrical climb and descent โšกโšกโšกโšก
Sur mesure Customizable program with editor Custom
Jeu Space Runner game mode Fun! ๐ŸŽฎ

๐Ÿ”Œ API

GET /status

Get the current bike status

Response:

{
  "connected": true,
  "rpm": 65,
  "power": 120,
  "speed": 0.0
}

POST /power/{level}

Set the target power (25-400W)

Example:

curl -X POST http://localhost:8080/power/120

๐Ÿ›  Development

Project Structure

SkylonRemoteApp/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.rs              # HTTP server
โ”‚   โ”œโ”€โ”€ bike_controller.rs   # Bluetooth controller
โ”‚   โ”œโ”€โ”€ training_program.rs  # Training program structures
โ”‚   โ””โ”€โ”€ main-example.rs      # CLI example
โ”œโ”€โ”€ static/
โ”‚   โ”œโ”€โ”€ index.html           # Web interface
โ”‚   โ””โ”€โ”€ programs.html        # Program manager
โ”œโ”€โ”€ autostart/               # Systemd autostart config
โ”œโ”€โ”€ Cargo.toml               # Rust dependencies
โ”œโ”€โ”€ CHANGELOG.md             # Version history
โ””โ”€โ”€ VERSION                  # Current version

Main Dependencies

  • actix-web - Web framework
  • tokio - Async runtime
  • kdri - Kettler Bluetooth library
  • serde - JSON serialization
  • anyhow - Error handling

๐Ÿ“ฆ Versioning

This project uses Semantic Versioning (MAJOR.MINOR.PATCH).

How to Version

1. Update the version

# Modify the VERSION file
echo "1.1.0" > VERSION

2. Update CHANGELOG.md

## [1.1.0] - 2025-01-27

### Added
- New feature X

### Changed
- Improvement to Y

### Fixed
- Bug Z

3. Commit and tag

# Commit changes
git add -A
git commit -m "Release v1.1.0 - Description of changes"

# Create tag
git tag -a v1.1.0 -m "Version 1.1.0"

# Push (if remote repository)
git push origin main --tags

Versioning Convention

  • MAJOR (1.x.x): Incompatible API changes
  • MINOR (x.1.x): New backward-compatible features
  • PATCH (x.x.1): Backward-compatible bug fixes

Examples

# Bug fix
1.0.0 โ†’ 1.0.1

# New feature
1.0.1 โ†’ 1.1.0

# Breaking change
1.1.0 โ†’ 2.0.0

View History

# List versions
git tag -l

# Version details
git show v1.0.0

# Log with tags
git log --oneline --decorate

# Differences between versions
git diff v1.0.0 v1.1.0

๐Ÿ™ Credits

This project would not have been possible without the incredible work shared in the kdri repository by @kaegi. The kdri library (Kettler Device Rust Interface) provides the essential Bluetooth communication protocol implementation for Kettler fitness devices.

Thank you for making this library open source! ๐ŸŽ‰

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿค Contribution & Open Source Philosophy

This repository is shared "as-is" for the community to take, improve, and make their own!

This project was built to solve a specific need and is now released to the world. The original author will not provide bug fixes or ongoing maintenance. Instead, this code is offered as a foundation for you to build upon, learn from, and adapt to your needs.

Open source is about empowermentโ€”taking something that works and making it better, fixing what's broken, and sharing improvements with others who face similar challenges. This project exists because of the incredible work shared by others (like the kdri library), and now it's your turn to carry the torch forward.

This Is YOUR Project Now

  • ๐Ÿ”ง Fix bugs: Found an issue? Fix it and share your solution with others
  • ๐Ÿš€ Add features: Need something new? Build it and submit a pull request
  • ๐Ÿ“š Improve docs: Make the documentation better, clearer, more complete
  • ๐ŸŒ Port to new devices: Make it work with other Kettler models or fitness equipment
  • ๐ŸŽจ Redesign the UI: Create a better interface that fits your needs
  • ๐Ÿ”ฌ Experiment freely: Try new approaches, test wild ideas, break things and learn

How to Take Ownership

  • Fork this repository - Make it yours, customize it, improve it
  • Share your improvements - Open pull requests so others can benefit
  • Create your own version - Build something completely different based on this code
  • Help each other - Answer questions, review PRs, collaborate with other contributors
  • Become a maintainer - If you're passionate about this project, consider maintaining your own fork

No Promises, Just Possibilities

โš ๏ธ Important: There is no guarantee of support, bug fixes, or updates from the original author. This is community-driven from now on. If you need something fixed or improved, you have the power to make it happen.

This isn't just an invitation to contributeโ€”it's a transfer of ownership to the community.

The code is here. The tools are available. The possibilities are endless. What will YOU build with it? ๐Ÿš€

๐Ÿ“ž Support

For questions or issues, see:


Current Version: 2.0.0 Date: 2025-11-23

About

Web App for Kettler Crosstrainer using kdri library

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •