Files
media-player-mixed/README.md

77 lines
3.4 KiB
Markdown

# Remote Media Player
Control your PC's media playback from Home Assistant.
This repository contains two independent components as git submodules:
## Components
| Submodule | Description | Repository |
|-----------|-------------|------------|
| [media-server](media-server/) | REST API server for your PC | [media-player-server](https://git.dolgolyov-family.by/alexei.dolgolyov/media-player-server) |
| [haos-integration](haos-integration/) | HACS-ready Home Assistant integration | [haos-hacs-integration-media-player](https://git.dolgolyov-family.by/alexei.dolgolyov/haos-hacs-integration-media-player) |
## Cloning
```bash
# Clone with submodules
git clone --recurse-submodules https://git.dolgolyov-family.by/alexei.dolgolyov/media-player-mixed.git
# Or if already cloned, initialize submodules
git submodule update --init --recursive
```
## Overview
```
┌─────────────────────┐ HTTP/WebSocket ┌─────────────────────┐
│ Home Assistant │◄────────────────────────►│ Your PC │
│ │ (Token Auth) │ │
│ ┌───────────────┐ │ │ ┌───────────────┐ │
│ │ Media Player │ │ │ │ Media Server │ │
│ │ Entity │ │ │ │ (FastAPI) │ │
│ └───────────────┘ │ │ └───────┬───────┘ │
│ ┌───────────────┐ │ │ │ │
│ │ Script Button │ │ │ ┌───────▼───────┐ │
│ │ Entities │ │ │ │ Media Control │ │
│ └───────────────┘ │ │ │ - Windows │ │
│ │ │ │ - Linux │ │
└─────────────────────┘ │ │ - macOS │ │
│ │ - Android │ │
│ └───────────────┘ │
└─────────────────────┘
```
## Features
- Play/Pause/Stop media
- Next/Previous track
- 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
## Quick Start
### 1. Set up the Media Server (on your PC)
```bash
cd media-server
pip install . # or pip install .[windows] on Windows
python -m media_server.main
```
See [Media Server README](media-server/README.md) for detailed instructions.
### 2. Set up Home Assistant Integration
Copy `haos-integration/custom_components/remote_media_player/` to your HA config folder, or install via HACS.
See [HAOS Integration README](haos-integration/README.md) for detailed instructions.
## License
MIT License