A modern, mobile-optimized web interface for controlling Denon/Marantz AV receivers over telnet. Generated completely with Claude Code, with a reasonable amount of human direction but no manual code written.
Perfect for running on a Raspberry Pi to provide smartphone control of your AV receiver.
- 📱 Mobile-First Design - Optimized touch targets (56px), responsive layout
- 🔒 Secure - Command validation, CORS configuration, input sanitization
- 🚀 Modern Python - Type hints, Python 3.13+ compatible, no deprecated dependencies
- 🎯 Easy Configuration - Environment variables, .env file support, sensible defaults
- 🔄 Reliable - Automatic retry with exponential backoff, better error handling
- 📊 Visual Feedback - Loading states, command history, real-time status
- 🧪 Well-Tested - Comprehensive test suite with pytest
- ⚡ Async Version Available - Real-time state tracking, WebSocket support, better performance
# Install dependencies
pip install -r requirements.txt
# Optional: Configure your receiver
cp .env.example .env
# Edit .env with your receiver's IP and port
# Run the server
python app.py
# Open in browser
# http://localhost:5000# Install async dependencies
pip install -r requirements/async.txt
# Run the async server
python async_app.py
# Open in browser
# http://localhost:5000See ASYNC_VERSION.md for full async documentation.
For complete Raspberry Pi setup with auto-start on boot and auto-restart on failure, see the comprehensive guide:
# Clone and setup
cd ~
git clone https://github.com/lorton/AVRDisco-Web.git
cd AVRDisco-Web
python3 -m venv venv
source venv/bin/activate
pip install -r requirements/async.txt
# Configure
cp .env.example .env
nano .env # Set your receiver's IP
# Install as service (auto-start + auto-restart)
sudo cp avrdisco.service /etc/systemd/system/
sudo systemctl enable avrdisco
sudo systemctl start avrdisco
# Access from any device: http://<raspberry-pi-ip>:5000Service Commands:
sudo systemctl status avrdisco # Check status
sudo systemctl restart avrdisco # Restart service
sudo journalctl -u avrdisco -f # View live logsConfigure via environment variables, .env file, or command-line arguments:
AVR_HOST- AV Receiver IP address (default: 192.168.1.100)AVR_PORT- Telnet port (default: 60128 for Denon/Marantz)HOST- Web server host (default: localhost)PORT- Web server port (default: 5000)CORS_ORIGINS- Allowed CORS origins (default: http://localhost:5000)LOG_LEVEL- Logging level: DEBUG/INFO/WARNING/ERROR (default: INFO)DEBUG- Enable debug mode (prints commands without sending)
See .env.example for all options.
- CLAUDE.md - Comprehensive project documentation
- IMPROVEMENTS.md - Detailed changelog of all improvements
- IMPLEMENTATION_SUMMARY.md - Quick overview of what was implemented
This project has been significantly enhanced from the original Claude Code generation:
✅ Python 3.13+ Compatible - Replaced deprecated telnetlib ✅ Type Hints - Full type annotations throughout ✅ Security - Command validation, CORS configuration ✅ Better UX - Loading states, command history, improved mobile design ✅ Reliability - Retry logic with exponential backoff ✅ Modern Config - .env file support, modular requirements
See IMPROVEMENTS.md for complete list.
# Install development dependencies
pip install -r requirements/dev.txt
# Run tests
pytest -v
# Type checking
mypy app.py avr_controller.py
# Code formatting
black .
# Linting
flake8 .Tested with Denon/Marantz receivers using telnet control protocol. Common models:
- Denon AVR series (AVR-X3400H, AVR-X4500H, etc.)
- Marantz SR/AV series
Check your receiver manual for telnet control port (usually 23 or 60128).
MIT License
Originally generated by Claude Code, enhanced with modern Python practices and comprehensive improvements.