Problem connecting using mpd binding

I have a “pi musicbox” that I want to control from openhab.
Pi musicbox is based on mopidy.

Mpd bindning gives the following error

2016-01-08 21:04:11.848 [INFO ] [inding.mpd.internal.MpdBinding] - reconnect player kitchen

Configuration file

mpd:kitchen.host=192.168.1.3
mpd:kitchen.port=6600
mpd:kitchen.password=

Connecting from openhab host to mpd

nas:~$ netcat 192.168.1.3 6600
OK MPD 0.17.0
Sp mpd can be connected to from openhab

openhab is 1.7.0
mpd 1.7.1

I can not figure out why it does not work.

Did you ever solve this problem? I have the same problem.

No I didn´t.
Have even tried it with openhab 1.8.0.
But fetching artist and title from pi musicbox (running a mpd server) works.
I use the same rule as described in the openhab wiki.
openhab wiki

And connecting to pi musicbox from my android phone using mpdroid works whitout any problems.

Sad I can not get the bindning to work as described in the wiki.

Ideas …
It seems like the mpd bindning is a wrapper for https://github.com/finnyb/javampd .

The bindning is using version 4.1 of javampd .

It should be easy to point to a newer javampd and rebuild and test the bindning.
Latest version of javampd is https://github.com/finnyb/javampd/releases/tag/release/v5.0.3
I have not done that before.

Any progress on this?

I got mine working fine. I did need to restart OH 1.8 to get it going:

items:

/* MPD Start */

Switch Mpd_main_StartStop       "Start/Stop"    		{ mpd="ON:volumio:play, OFF:volumio:stop" }
Switch Mpd_main_NextPrev        "Track control" 		{ mpd="ON:volumio:next, OFF:volumio:prev" } 
Dimmer Mpd_main_VolumeControl 	"Volume [%d%%]" 		{ mpd="INCREASE:volumio:volume_increase, DECREASE:volumio:volume_decrease, PERCENT:volumio:volume" }
String CurrentTrack    			"Current track [%s]" 	{ mpd="TITLE:bad:tracktitle" }
String CurrentArtist    		"Current artist [%s]" 	{ mpd="ARTIST:bad:trackartist" }
String ConcatInfo       		"Now playing [%s]"

/* MPD End */

Sitemap:

Frame label=“Music” {
Text item=CurrentTrack
Text item=CurrentArtist
Text item=ConcatInfo
Switch item=Mpd_main_StartStop mappings=[OFF=“Stop”, ON=“Start”]
Slider item=Mpd_main_VolumeControl
Switch item=Mpd_main_NextPrev mappings=[OFF=“Previous”, ON=“Next”]

}


CFG:

``` mpd:volumio.host=192.168.0.160
mpd:volumio.port=6600

works for me. A restart of openhab solved it.

Hi all,
I have the same problem with connecting (getting Current Track works, sending mpc commands from the command line works, but sending commands from openhab don’t).

I’m always getting the same error when sending something via openhab (e.g. play)

12:47:29.597 [INFO ] [inding.mpd.internal.MpdBinding:738 ] - reconnect player volumio

openhab and mpd running on 1.8.3

which version of volumio is you using?

I was trying with Volumio 2, RC2 HOTFIX (2016-07-01) on an RPI 3.

Ahh…so do I.
It works for me with openhab 1.8.3. There was some issues in the beginning.
Remember that I had to restart openhab to get it to work.

my openhab config

################################ MPD Binding ##########################################
#
# Host and port of the first MPD to control 
mpd:kitchen.host=192.168.1.3
mpd:kitchen.port=6600

addon = org.openhab.binding.mpd-1.9.0-SNAPSHOT.jar

Hi Kristoffer,
I’m using OH 1.8.3 on a RaspberryPi Zero with a 3.5" LCD touch display and I get this on startup:

2016-09-25 10:48:45.383 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item CurrentTrack for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.392 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item CurrentTrack for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.397 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item CurrentTrack for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.404 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item CurrentArtist for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.412 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item CurrentArtist for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.418 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item CurrentArtist for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.426 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item ConcatInfo for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.439 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item ConcatInfo for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.444 [ERROR] [o.u.i.items.ItemUIRegistryImpl] - Cannot retrieve item ConcatInfo for widget org.openhab.model.sitemap.Text
2016-09-25 10:48:45.477 [WARN ] [.o.u.w.i.render.SwitchRenderer] - Cannot determine item type of 'Mpd_radio_StartStop'
org.openhab.core.items.ItemNotFoundException: Item 'Mpd_radio_StartStop' could not be found in the item registry
        at org.openhab.core.internal.items.ItemRegistryImpl.getItem(ItemRegistryImpl.java:80) ~[na:na]
        at org.openhab.ui.internal.items.ItemUIRegistryImpl.getItem(ItemUIRegistryImpl.java:554) ~[na:na]

... (more repetitive errors for the other items I skip pasting)

My items file includes this

Switch Mpd_radio_StartStop "Start/Stop" <video> (All) { mpd="ON:radio:play, OFF:radio:stop" }

and sitemap includes this

Switch item=Mpd_radio_StartStop mappings=[OFF="Pause", ON="Play"]

and .cfg file

################################ MPD Binding ##########################################
#
# Host and port of the first MPD to control
mpd:radio.host=10.10.10.200
mpd:radio.port=6600

# mpd:radio.password=

I have tried with the password defined as empty or commented out all together. I have restarted OH and RasPi a few times just to be sure.
MPD is on a separate machine.
[Its an internet wifi router with OpenWrt firmware, controllable by smartphones or PC and it works fine for a few years.]
Are you suggesting I should use org.openhab.binding.mpd-1.9.0-SNAPSHOT.jar to get it working? Where do I get this version?

Any suggestion would be appreciated :slight_smile:

Found org.openhab.binding.mpd-1.9.0-SNAPSHOT.jar but still, no luck. Looking fwd to your input…