[SOLVED] OpenHab2 and MPD

Hi guys,

I’ve recently installed OpenHab2, all went really well, so kudos for the good work.
My setup has a parallel system Loxone and it gets discovered fine (impressive).
I’m now finishing up the last touch-ups, one of them is to get my MPD systems online in OpenHab2.

I’ve seen there’s a binding for MPD in the list of bindings, but I cannot seem to be able to get it on my PaperUI list.

1.- Has anybody had this issue? And has managed to solve it? :wink: can share how?
2.- Is this a v1 binding only? then why is it listed in the OpenHab2 bindings?
3.- If it is a v1 binding only, what is the best way to get it working? Retrofit or port it to v2?


Have you enabled legacy bindings in PaperUI?

Well yes I have:
Configuration -> System -> Add-On Management -> Include Legacy 1.x bindings
Is this it? Or should I do something else?

PS: I actually see some 1.x in the list:

Modbus Binding

binding-modbus - 2.4.0

Modbus Binding (1.x)

binding-modbus1 - 1.13.0

MQTT Binding

binding-mqtt - 2.4.0

MQTT Binding (1.x)

binding-mqtt1 - 1.13.0

Not sure why its not listed in PaperUI unless it’s a Market place binding?

You can manually add the binding using the jar file found here.

EDIT: Just checked, it’s not a Market place binding and I don’t have it in my list of addons either. Looks like you may need to add the binding via the jar file or try installing via the console.

1 Like

Thanks! I will give it a try.

I have to check again where to drop these jars… and then should I expect to see it in that list as well as any other binding?

Jar files go in usr/share/openhab2/addons

After installing the jar file you will see it in the list of binding you have installed. You will not see it in the Addons > Bindings list (place you would normally go to install a binding via PaperUI).

OK, so can I assume it is installed? or should I use the console ui to install it?

After adding the jar file you should see it in PaperUI > Configuration > Bindings list with all the other binding you have installed. You may need to restart OH after adding the jar file.

sudo systemctl stop openhab2

sudo systemctl start openhab2

So I did stop/start the service (systemd setup here). And I go to Configuration -> Bindings but I do not see the MPD in the list.

I’ve checked under /var/log/openhab2/ and I cannot find any mention of any error/warning related to the jar or mpd… how can I increase the verbosity to find out what it did with the new addon?

First check the permissions with ls -al usr/share/openhab2/addons and make everything is correct. You can post the output if your not sure what the permissions should be.

Well these are the contents:
-rw-r–r-- 1 openhab openhab 106226 Jan 30 08:53 org.openhab.binding.mpd-1.14.0-SNAPSHOT.jar

For my jar files I have -rw-rw-r-- openhab openhabian. Use sudo openhabian-config then select Apply Improvements, Fix permissions that should handle any permission issues. If not you may have to do it manually.

OK, let met try (fix, restarting, rechecking).

Unfortunately the binding still missing. I have to point out (if it makes any difference) this is not a raspberry setup. I’m using a Linux PC (archlinux) and I’m using OpenHab2 version 2.4.0.

It make a difference how you installed OH. Was it manually or via apt-get?

I did install it using the package manager. For this particular package it is using a ‘recipe’ of sorts:
this is the metadata for the recipe:

Check the console and see if the binding is listed. sudo openhab-cli console then at the prompt, openhab> bundle:list

OK, some good news:

openhab> bundle:list | grep -i mpd
234 x Active x 80 x x openHAB MPD Binding

Yes, that is good news.:+1:

Now check if you have an mpd.cfg file in /etc/openhab2/services

Nope, not yet. Should I will look for a sample and drop it there (restart, et. al)… do I need also to edit addons.cfg?

The mpd.cfg file should be auto created by the binding. A restart of OH may be what you need if you haven’t done so already.

If your adding all your binding via files then yes add this binding to the addons.cfg and a restart may be needed. If all your other binding are installed via PaperUI then do not edit the addon.cfg file. I think you have to choose either PaperUI or files, for adding bindings, but not both.

@robml Edit: Something else you may need to check from the console is openhab runtime compat1x is installed. If not then install using this command:
feature:install openhab-runtime-compat1x