Track piano practice sessions via USB-MIDI, with a real-time web interface (Flask + Socket.IO).
This is designed to run on a Raspberry Pi as a “kiosk” appliance:
pianologruns as asystemdservice- Chromium runs fullscreen (
--kiosk) and displays the web UI - Optional nginx reverse proxy serves the UI at
/pianolog
pianolog/– Python package (core app code)templates/– Flask HTML templatesstatic/– Frontend assets (CSS/JS)scripts/– Raspberry Pi / system scripts (systemd, nginx, kiosk)tools/– Local utilities and test scriptsdocs/– Setup and usage docs
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtRun the tracker directly:
source venv/bin/activate
python main.py --prompt-each-sessionOr start the web-friendly wrapper script:
./scripts/start_with_web.shWeb UI:
- Local:
http://localhost:5000 - If nginx reverse-proxy is configured:
http://raspberrypi.local/pianolog
The legacy UI is still the default at /. A React pilot app now lives in frontend/ and is served at /react after you build it.
Install frontend deps:
cd frontend
npm installRun React in development mode (with API and Socket.IO proxy to Flask on :5000):
npm run devBuild React assets for Flask to serve:
npm run buildThen open:
- Legacy UI:
http://localhost:5000/ - React pilot UI:
http://localhost:5000/react
Edit pianolog/config.py:
USERS– MIDI note → user name mapping (used for initial migration into the DB)MIDI_DEVICE_KEYWORD– device name match (for auto-connect)ACTIVITY_THRESHOLD,ACTIVITY_WINDOW,MIN_PRACTICE_DURATION,SESSION_TIMEOUTWEB_PORT
- Install/update systemd service:
./scripts/install_service.sh - Uninstall systemd service:
./scripts/uninstall_service.sh - Set up nginx reverse proxy:
./scripts/setup_nginx.sh - Kiosk browser:
./scripts/start_kiosk.sh - Restart kiosk browser:
./scripts/restart_kiosk.sh - USB autoreset udev rules:
./scripts/setup_usb_autoreset.sh
- SQLite DB:
practice_sessions.db(in the repo working directory by default) - Log file:
practice_tracker.log
Start with:
docs/QUICKSTART_WEB.mddocs/SETUP_WEB.mddocs/USAGE.mddocs/WEB_INTERFACE.md
Coming soon...