Refactor project into two standalone components
Split monorepo into separate units for future independent repositories: - media-server/: Standalone FastAPI server with own README, requirements, config example, and CLAUDE.md - haos-integration/: HACS-ready Home Assistant integration with hacs.json, own README, and CLAUDE.md Both components now have their own .gitignore files and can be easily extracted into separate repositories. Also adds custom icon support for scripts configuration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
97
README.md
97
README.md
@@ -1,33 +1,35 @@
|
||||
# Remote Media Player for Home Assistant
|
||||
# Remote Media Player
|
||||
|
||||
Control your PC's media playback from Home Assistant.
|
||||
|
||||
This monorepo contains two separate components designed to be split into independent repositories:
|
||||
|
||||
## Components
|
||||
|
||||
| Component | Description | Documentation |
|
||||
|-----------|-------------|---------------|
|
||||
| [Media Server](media_server/) | REST API server for your PC | [README](media_server/README.md) |
|
||||
| [HAOS Integration](custom_components/remote_media_player/) | Home Assistant custom component | [README](custom_components/remote_media_player/README.md) |
|
||||
| Component | Description | Future Repository |
|
||||
|-----------|-------------|-------------------|
|
||||
| [Media Server](media-server/) | REST API server for your PC | `media-server` |
|
||||
| [HAOS Integration](haos-integration/) | HACS-ready Home Assistant integration | `haos-remote-media-player` |
|
||||
|
||||
## Overview
|
||||
|
||||
```
|
||||
┌─────────────────────┐ HTTP/REST ┌─────────────────────┐
|
||||
│ Home Assistant │◄─────────────────────────►│ Your PC │
|
||||
│ │ (Token Auth) │ │
|
||||
│ ┌───────────────┐ │ │ ┌───────────────┐ │
|
||||
│ │ Media Player │ │ │ │ Media Server │ │
|
||||
│ │ Entity │ │ │ │ (FastAPI) │ │
|
||||
│ └───────────────┘ │ │ └───────┬───────┘ │
|
||||
│ │ │ │ │
|
||||
└─────────────────────┘ │ ┌───────▼───────┐ │
|
||||
│ │ Media Control │ │
|
||||
│ │ - Windows │ │
|
||||
│ │ - Linux │ │
|
||||
│ │ - macOS │ │
|
||||
│ │ - Android │ │
|
||||
│ └───────────────┘ │
|
||||
└─────────────────────┘
|
||||
┌─────────────────────┐ HTTP/WebSocket ┌─────────────────────┐
|
||||
│ Home Assistant │◄────────────────────────►│ Your PC │
|
||||
│ │ (Token Auth) │ │
|
||||
│ ┌───────────────┐ │ │ ┌───────────────┐ │
|
||||
│ │ Media Player │ │ │ │ Media Server │ │
|
||||
│ │ Entity │ │ │ │ (FastAPI) │ │
|
||||
│ └───────────────┘ │ │ └───────┬───────┘ │
|
||||
│ ┌───────────────┐ │ │ │ │
|
||||
│ │ Script Button │ │ │ ┌───────▼───────┐ │
|
||||
│ │ Entities │ │ │ │ Media Control │ │
|
||||
│ └───────────────┘ │ │ │ - Windows │ │
|
||||
│ │ │ │ - Linux │ │
|
||||
└─────────────────────┘ │ │ - macOS │ │
|
||||
│ │ - Android │ │
|
||||
│ └───────────────┘ │
|
||||
└─────────────────────┘
|
||||
```
|
||||
|
||||
## Features
|
||||
@@ -37,56 +39,49 @@ Control your PC's media playback from Home Assistant.
|
||||
- Volume control and mute
|
||||
- Seek within tracks
|
||||
- Display current track info (title, artist, album, artwork)
|
||||
- Real-time updates via WebSocket
|
||||
- Script buttons (shutdown, restart, lock, sleep, hibernate, custom)
|
||||
- Secure token-based authentication
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
| Platform | Media Control | Volume Control | Status |
|
||||
|----------|---------------|----------------|--------|
|
||||
| Windows | WinRT Media Transport | pycaw | Fully tested |
|
||||
| Linux | MPRIS D-Bus | PulseAudio/PipeWire | Not tested |
|
||||
| macOS | AppleScript | System volume | Not tested |
|
||||
| Android | Termux:API | Termux volume | Not tested |
|
||||
|
||||
> **Note:** Windows is the primary supported platform. Linux, macOS, and Android implementations exist but have not been thoroughly tested and may have limited functionality.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Set up the Server (on your PC)
|
||||
### 1. Set up the Media Server (on your PC)
|
||||
|
||||
```bash
|
||||
cd media_server
|
||||
cd media-server
|
||||
pip install -r requirements.txt
|
||||
python -m media_server.main --generate-config
|
||||
python -m media_server.main
|
||||
```
|
||||
|
||||
See [Media Server README](media_server/README.md) for detailed instructions.
|
||||
See [Media Server README](media-server/README.md) for detailed instructions.
|
||||
|
||||
### 2. Set up Home Assistant Integration
|
||||
|
||||
1. Copy `custom_components/remote_media_player/` to your HA config
|
||||
2. Restart Home Assistant
|
||||
3. Add integration via UI with your server's IP and token
|
||||
Copy `haos-integration/custom_components/remote_media_player/` to your HA config folder, or install via HACS.
|
||||
|
||||
See [Integration README](custom_components/remote_media_player/README.md) for detailed instructions.
|
||||
See [HAOS Integration README](haos-integration/README.md) for detailed instructions.
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
haos-integration-media-player/
|
||||
├── media_server/ # Server component
|
||||
│ ├── main.py # Entry point
|
||||
│ ├── routes/ # API endpoints
|
||||
│ ├── services/ # Platform media controllers
|
||||
│ └── service/ # Service installers
|
||||
/
|
||||
├── media-server/ # Standalone Media Server
|
||||
│ ├── README.md # Server documentation
|
||||
│ ├── requirements.txt # Python dependencies
|
||||
│ ├── config.example.yaml # Example configuration
|
||||
│ └── media_server/ # Python package
|
||||
│ ├── main.py # Entry point
|
||||
│ ├── routes/ # API endpoints
|
||||
│ ├── services/ # Platform media controllers
|
||||
│ └── service/ # Service installers
|
||||
│
|
||||
├── custom_components/
|
||||
│ └── remote_media_player/ # HAOS Integration
|
||||
│ ├── media_player.py # Media player entity
|
||||
│ └── config_flow.py # UI configuration
|
||||
├── haos-integration/ # HACS-ready HA Integration
|
||||
│ ├── README.md # Integration documentation
|
||||
│ ├── hacs.json # HACS configuration
|
||||
│ └── custom_components/
|
||||
│ └── remote_media_player/ # Integration code
|
||||
│
|
||||
└── README.md
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Reference in New Issue
Block a user