home-assistant.io/source/_components/media_player.mpd.markdown

1.8 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release
layout title description date sidebar comments sharing footer logo ha_category ha_release
page Music Player Daemon (MPD) Instructions how to integrate Music Player Daemon into Home Assistant. 2016-09-30 23:06 true false true true mpd.png Media Player pre 0.7

The mpd platform allows you to control a Music Player Daemon from Home Assistant. Unfortunatly you will not be able to manipulate the playlist (add or delete songs) or add transitions between the songs.

Even though no playlist manipulation is possible, it is possible to use the play_media service to load an existing saved playlist as part of an automation or scene.

To add MPD to your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
media_player:
  platform: mpd
  host: IP_ADDRESS
  port: 6600
  location: bedroom
  password: PASSWORD

Configuration variables:

  • host (Required): IP address of the Host where Music Player Daemon is running.
  • port (Optional): Port of the Music Player Daemon. Defaults to 6600.
  • location (Optional): Location of your Music Player Daemon. Defaults to "MPD".
  • password (Optional): Password for your Music Player Daemon.

Example script to load a saved playlist called "DeckMusic" and set the volume:

relaxdeck:
    sequence:
    - service: media_player.play_media
      data:
        entity_id: media_player.main
        media_content_type: playlist
        media_content_id: DeckMusic

    - service: media_player.volume_set
      data:
        entity_id: media_player.main
        volume_level: 0.60

This platform works with Music Player Daemon and mopidy with Mopidy-MPD as used by Pi MusicBox.