This repository was archived by the owner on May 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
This repository was archived by the owner on May 17, 2021. It is now read-only.
MPD binding notification #2847
Copy link
Copy link
Closed
Labels
Description
In my openhab installation mpd binding updates info about track and artist played only once at system start, then nothing more even if a play/pause or previous/next is triggered on sitemap.
Mpd server is on another (virtual) machine and the others clients (linux, android) in the network update info regularly on track changing.
item config is pretty straightforward as it is essentially copy/pasted from documentation of the MPD binding bundle:
String CurrentTrack "Current track [%s]" { mpd="TITLE:avserver:tracktitle" }
String CurrentArtist "Current artist [%s]" { mpd="ARTIST:avserver:trackartist" }
String ConcatInfo "Now playing [%s]"
Switch Mpd_avserver_StartStop "Start/Stop" (Audio) { mpd="ON:avserver:play, OFF:avserver:stop" }
Switch Mpd_avserver_NextPrev "Track control" (Audio) { mpd="ON:avserver:next, OFF:avserver:prev" }
Dimmer Mpd_avserver_VolumeControl "Volume [%d%%]" (Audio) { mpd="INCREASE:avserver:volume_increase, DECREASE:avserver:volume_decrease, PERCENT:avserver:volume" }
rule config:
rule "concat"
when
Item CurrentTrack received update or
Item CurrentArtist received update
then
ConcatInfo.postUpdate(CurrentTrack.state.toString + " / " + CurrentArtist.state.toString)
end
sitemap config:
Text label="Musica" icon="media_player1"
{
Text item=CurrentTrack
Text item=CurrentArtist
Text item=ConcatInfo
Switch item=Mpd_avserver_StartStop mappings=[OFF="Pause", ON="Play"]
Switch item=Mpd_avserver_NextPrev mappings=[OFF="Previous", ON="Next"]
Slider item=Mpd_avserver_VolumeControl
}
some log:
tail -f /var/log/openhab/openhab.log | grep mpd
2015-07-04 16:19:59.433 [DEBUG] [o.o.b.mpd.internal.MpdActivator] - MPD binding has been started.
2015-07-04 16:19:59.451 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - MPD binding connecting to players
2015-07-04 16:19:59.719 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - MPD binding connecting to players
2015-07-04 16:19:59.734 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - Connected to player 'avserver' with config MPD [host=192.168.100.244, port=6800, password=null]
2015-07-04 16:19:59.737 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - Scheduled a daily MPD Reconnect of all MPDs
2015-07-04 16:19:59.744 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - Current song avserver: Best Progressive House Mix 2013 Vol. #2 Meets progvisions
2015-07-04 16:19:59.754 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - Updated title: CurrentTrack Best Progressive House Mix 2013 Vol. #2 Meets progvisions
2015-07-04 16:19:59.756 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - Updated artist: CurrentArtist, VA
2015-07-04 16:20:02.281 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - Volume on avserver changed to 100
2015-07-04 16:22:05.955 [INFO ] [o.o.binding.mpd.internal.MpdBinding] - executed commandLine 'stop' for player 'avserver'
2015-07-04 16:22:06.327 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - Play state of 'avserver' changed
2015-07-04 16:22:08.839 [DEBUG] [o.o.binding.mpd.internal.MpdBinding] - Volume on avserver changed to -1
2015-07-04 16:22:11.585 [INFO ] [o.o.binding.mpd.internal.MpdBinding] - executed commandLine 'play' for player 'avserver'
2015-07-04 16:22:19.536 [INFO ] [o.o.binding.mpd.internal.MpdBinding] - executed commandLine 'next' for player 'avserver'
2015-07-04 16:22:25.610 [INFO ] [o.o.binding.mpd.internal.MpdBinding] - executed commandLine 'prev' for player 'avserver'