This performs a selective merge of the current docs into the "stable" branch that will hold the default docs for the 3.0.2 release (until they're replaced with the current ones once 3.1 is released). * Backport bindings docs that looked applicable to 3.0 * Revert UI components changes not in stable Signed-off-by: Yannick Schaus <github@schaus.net> Co-authored-by: openHAB Build Server <infrastructure@openhab.org> Co-authored-by: stefan-hoehn <stefan.hoehn@aoe.com> Co-authored-by: jimtng <2554958+jimtng@users.noreply.github.com> Co-authored-by: Matt <lawrence.matt@gmail.com> Co-authored-by: Jerome Luckenbach <github@luckenba.ch> Co-authored-by: Kai Kreuzer <kai@openhab.org> Co-authored-by: Felix Schneider <45742226+Trysupe@users.noreply.github.com> Co-authored-by: Hilbrand Bouwkamp <hilbrand@h72.nl> Co-authored-by: J-N-K <J-N-K@users.noreply.github.com> Co-authored-by: Eiko Wagenknecht <eiko.wagenknecht@web.de> Co-authored-by: Alexander Behring <github.com@alexander-behring.eu> Co-authored-by: Matthew Skinner <matt@pcmus.com> Co-authored-by: Christoph Weitkamp <github@christophweitkamp.de> Co-authored-by: Patrick Fink <mail@pfink.de> Co-authored-by: Gifford47 <49484063+Gifford47@users.noreply.github.com> Co-authored-by: Seganku <seganku@users.noreply.github.com> Co-authored-by: digitlength <62958838+digitlength@users.noreply.github.com> Co-authored-by: Ross Kennedy <rossko@culzean.clara.co.uk> Co-authored-by: Fabian Wolter <github@fabian-wolter.de> Co-authored-by: Arjan Mels <43108771+arjanmels@users.noreply.github.com> Co-authored-by: Jonathan Gilbert <github.10.jgilbert@xoxy.net> Co-authored-by: Richard Koshak <rkoshak@users.noreply.github.com> Co-authored-by: Wolfgang Schueschen <76775650+WolfgangSn@users.noreply.github.com> Co-authored-by: Gareth Western <gareth@garethwestern.com> Co-authored-by: Bob A <bobadair@users.noreply.github.com> Co-authored-by: Sami Salonen <ssalonen@gmail.com> Co-authored-by: Peter Schraffl <p.schraffl@gmx.at> Co-authored-by: Georgios Moutsos <50378548+jossuar@users.noreply.github.com> Co-authored-by: Markus Storm <markus.storm@gmx.net> Co-authored-by: JensHoRi <47488279+JensHoRi@users.noreply.github.com> Co-authored-by: Felix <24674809+fex01@users.noreply.github.com> Co-authored-by: Koen Schockaert <54985218+QbusKoen@users.noreply.github.com> Co-authored-by: Ethan Dye <mrtops03@gmail.com> Co-authored-by: Senne Croughs <38940112+sencro@users.noreply.github.com> Co-authored-by: Ben Clark <ben@benjyc.uk> Co-authored-by: Sam Spencer <43712250+samsp99@users.noreply.github.com> Co-authored-by: chingon007 <76529461+chingon007@users.noreply.github.com> Co-authored-by: Wouter Born <github@maindrain.net> Co-authored-by: mueller-ma <mueller-ma@users.noreply.github.com> Co-authored-by: aurelio1 <aurelio@caliaro.net> Co-authored-by: Bernd Weymann <bernd.weymann@gmail.com> Co-authored-by: Martin Hogg <hoggm2@hotmail.co.uk> |
||
---|---|---|
.. | ||
readme.md |
readme.md
id | label | title | type | description | since | install |
---|---|---|---|---|---|---|
mpd | MPD | MPD - Bindings | binding | [Music Player Daemon (MPD)](https://www.musicpd.org/) is a flexible, powerful, server-side application for playing music. Through plugins and libraries it can play a variety of sound files while being controlled by its network protocol. | 3x | auto |
{% include base.html %}
MPD Binding
Music Player Daemon (MPD) is a flexible, powerful, server-side application for playing music. Through plugins and libraries it can play a variety of sound files while being controlled by its network protocol.
With the openHAB MPD binding you can control Music Player Daemons.
Supported Things
This binding supports one ThingType: mpd
Discovery
If zeroconf is enabled in the Music Player Daemon, it is discovered. Each Music Player daemon requires a unique zeroconf_name for correct discovery.
Thing Configuration
The ThingType mpd requires the following configuration parameters:
Parameter Label | Parameter ID | Description | Required |
---|---|---|---|
IP Address | ipAddress | Host name or IP address of the Music Player Daemon | yes |
Port | port | Port number on which the Music Player Daemon is listening. Default: 6600 | yes |
Password | password | Password to access the Music Player Daemon | no |
Channels
The following channels are currently available:
Channel Type ID | Item Type | Description |
---|---|---|
control | Player | Start/Pause/Next/Previous |
volume | Dimmer | Volume in percent |
stop | Switch | Stop playback |
currentalbum | String | Current album |
currentartist | String | Current artist |
currentname | String | Current name |
currentsong | Number | Current song |
currentsongid | Number | Current song id |
currenttitle | String | Current title |
currenttrack | Number | Current track |
Full Example
Thing
mpd:mpd:music [ ipAddress="192.168.1.2", port=6600 ]
Items
Switch morning_music "Morning music"
Player mpd_music_player "Player" { channel = "mpd:mpd:music:control" }
Dimmer mpd_music_volume "Volume [%d %%]" { channel = "mpd:mpd:music:volume" }
Switch mpd_music_stop "Stop" { channel = "mpd:mpd:music:stop" }
String mpd_music_album "Album [%s]" { channel = "mpd:mpd:music:currentalbum" }
String mpd_music_artist "Artist [%s]" { channel = "mpd:mpd:music:currentartist" }
String mpd_music_name "Name [%s]" { channel = "mpd:mpd:music:currentname" }
Number mpd_music_song "Song [%d]" { channel = "mpd:mpd:music:currentsong" }
Number mpd_music_song_id "Song Id [%d]" { channel = "mpd:mpd:music:currentsongid" }
String mpd_music_title "Title [%s]" { channel = "mpd:mpd:music:currenttitle" }
Number mpd_music_track "Track [%d]" { channel = "mpd:mpd:music:currenttrack" }
Sitemap
Frame label="Music" {
Default item=mpd_music_player
Slider item=mpd_music_volume
Switch item=mpd_music_stop
Text item=mpd_music_album
Text item=mpd_music_artist
Text item=mpd_music_name
Text item=mpd_music_song
Text item=mpd_music_song_id
Text item=mpd_music_title
Text item=mpd_music_track
}
Rule
rule "turn on morning music"
when
Item morning_music changed to ON
then
val actions = getActions("mpd","mpd:mpd:music")
if(actions === null) {
logWarn("myLog", "actions is null")
return
}
actions.sendCommand("clear")
actions.sendCommand("load", "MorningMusic");
actions.sendCommand("shuffle");
actions.sendCommand("play");
end