Note: mpd-control has been superseded by er-audio. This page is provided for reference in legacy installations.
HTTP REST API served on port 3001. All endpoints use the GET method.
Media directory: /home/er/media
Returns a JSON tree of all audio files in the media directory (up to 5 levels deep).
Supported formats: mp3, wav, flac, ogg, m4a.
Loads a single audio file. Does not auto-play — call /play separately.
Parameter:
| Name | Description |
|---|---|
| file | Relative path to the audio file within the media directory |
Starts or resumes playback.
Pauses playback.
Stops playback.
Returns the current volume level (no parameters).
Sets the volume to a percentage (0–100).
Parameter:
| Name | Range | Description |
|---|---|---|
| value | 0–100 | Volume percentage |
Returns current playback state as JSON.
Response:
{ "title": "background-music.mp3", "state": "playing", "volume": "75", "flags": "repeat: off random: off single: on consume: off" }
State values: “playing”, “paused”, “stopped”