How to Manually install of bindings on pi?

OK I have searched everywhere on this forum and I can’t seem to find what I’m looking for so I will post the question in hopes someone can help me.

I have a raspberry pi running openHAB 2 and I ssh into it from a window computer. I have set the whole thing up fine but I have found a binding for a broad link controller that I would like to add to the system.

My issue is I have no idea how to add a binding that is not on the market place. I am fairly new to openHAB and would appreciate very clear instructions including the proper scripts to use. I’m sure this is a simply problem but very frustrating for me.
Thank you very much for any help you can give.

Hi @Tphenix, what binding is it? If it’s one that is usually included with openHAB, it’s just a simple case of using paper-ui or adding the name of the binding to ${OPENHAB_CONF}/services/addons.cfg. For the apt installation, this is “/etc/openhab2/services/addons.cfg”.

However, if it’s a .jar or .kar file, then you need to place it in ${OPENHAB_HOME}/addons, or in the apt package’s case: /usr/share/openhab2/addons

Hope this helps.

1 Like

It’s a binding that is not included. So it needs to be added in through puTTy.

So if I am ssh through puTTy on my windows machine into my pi. And I have the binding downloaded to my downloads folder on my windows machine. what are the commands that I need to put into the pi to get the file from my windows machine to the correct folder on the pi?
Thank you

1 Like

It usually wouldn’t be through SSH, you’d need a program like “winscp” to transfer over files from Windows to the RPi.

Alternatively if you have the direct download link to the .jar file. You can download it to the folder by using the following commands using your puTTY terminal:

cd /usr/share/openhab2/addons
sudo wget <download-location>
sudo chown openhab:openhab <filename>
2 Likes

Thanks so much for the quick replies. This is already better info than I could find anywhere else.

So the download-location Is just the web address where the file is located.

The file name is the exact name of the file being downloaded

Is that correct?

The binding I’m trying to use is here

Yes, but it needs to be a direct download link so:

cd /usr/share/openhab2/addons
wget -O org.openhab.binding.broadlink-2.2.0-BETA2.jar https://www.dropbox.com/s/go5p8zd19ylcoj2/org.openhab.binding.broadlink-2.2.0-BETA2.jar?dl=1
sudo chown openhab:openhab org.openhab.binding.broadlink-2.2.0-BETA2.jar

The binding should install itself when it’s in that folder.

Thanks Ben!

that seemed to install it but its not showing up in the paper UI.
is there a string i can enter into the pi through ssh to see that it installed in the correct place?
Should I have to do anything else to get a binding to work?

If you used openhabian image on your Pi it will have samba/ network shares setup that you can use to drag and drop any jar into the add ons folder.

Place JAR file into your openhab2-addons folder.
Edit the file \openhab2-conf\services\addons.cfg
Un-comment and add the binding to this line as follows
binding = broadlink, anymore bindings here
Restart Openhab2

That sounds like a great option too. Going forward that might be easier. Thanks for the help!!! I’m sure they have a good tutorial on getting samba ups and running on this forum somewhere :smile:

https://docs.openhab.org/installation/linux.html#network-sharing

It is very easy as it is already done by default or the openhabian conf tool does it for you as a simple menu item. When u ssh into openhabian the command to start the tool is displayed in the welcome message.

Hey matt
I got my openHab-share folder up and running. My windows pc finds it on my network and I inserted the Jar file into the openhab2-addons folder.

I’m a little confused on the next part of the instructions.
I opened the openhab2-conf\services\addons.cfg file in notepad ++ but I don’t see anything in there about bindings. also am i suppose to write in “binding = broadlink” exactly or use the file name “binding = org.openhab.binding.broadlink-2.2.0-BETA2.jar”
if you could clarify what you wrote i would greatly appriciate it.

Yes as the binding uses all lowercase usually, I cant not be 100% sure as I don’t use that binding but that is how I have gotten a few jar files working now when they refused to work by doing a simple copy to the addon folder that other people claim works for them. You should find the cfg file is full of text and the line should be in there already with a comment at the start to disable it. Do a CTRL+F search to find it as the surrounding lines give an explaination.

Also learn about the karaf console as you can login and use that to see why the binding will not start as it may be a permissions issue.

Your not the only one to be annoyed with the documentation, I totally agree but don’t attempt to update it myself as I really have no idea if how I do things is the ‘correct’ way. So usually the best way is to do searches on this forum and after 30mins skim reading 30 posts I usually find what I need.

When you find what works for you, please reply to help others that are searching looking :slight_smile:

@matt1
Thank you! I will.