Skip to content

lorton/AVRDisco-Web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AVRDisco-Web

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.

Features

  • 📱 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

Quick Start

Standard Version (Synchronous)

# 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

Async Version (Recommended - with Real-time State Tracking)

# Install async dependencies
pip install -r requirements/async.txt

# Run the async server
python async_app.py

# Open in browser
# http://localhost:5000

See ASYNC_VERSION.md for full async documentation.

Installation on Raspberry Pi

For complete Raspberry Pi setup with auto-start on boot and auto-restart on failure, see the comprehensive guide:

📖 RASPBERRY_PI_SETUP.md

Quick Install with Systemd Service

# 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>:5000

Service Commands:

sudo systemctl status avrdisco   # Check status
sudo systemctl restart avrdisco  # Restart service
sudo journalctl -u avrdisco -f   # View live logs

Configuration

Configure 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.

Documentation

Recent Improvements

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.

Development

# 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 .

Supported Receivers

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).

License

MIT License

Credits

Originally generated by Claude Code, enhanced with modern Python practices and comprehensive improvements.

About

A claude-code generated interface to old Denon receivers. Intended to run on a raspberry pi on the network with the amp and serve a web page to mobile browsers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors