I have a installatoin of OH2 beta4 which I installed via apt-get. It’s the openhab-online distribution. Now I would like to test a SNAPSHOT version of a binding. How can I update the already installed binding to a snapshot version. I tried:
Hopefully someone can help. If you figure this out this sounds like an excellent Tutorial and I’d encourage you or whom ever helps you to create a tutorial explaining how to do it.
Yes, thank you for the link. Unfortunately it looks like you are right and this does not have priority. Still, it needs to be possible already somehow. But I probably have to dig deeper in OSGI Karaf and the runtime to understand it properly. With OH1 that was pretty simple… Once I find out, I will post here, although I just spend little time on the topic right now.
Even if you are successful in getting this to work, at some point there may be changes to the framework and/or binding that cause the combination of beta framework and binding snapshot to stop functioning correctly.
It is possible to install any bundle - it just takes more effort and is error prone which is why I raised the issue on this.
To install a different bundle, probably the easiest way is to install the bundle from the UI (eg ZWave). Then to log on to the console and uninstall the bundle, and then to drop the updated bundle into the addons folder.
The reason to do it this way is it resolves any dependancies (eg for ZWave it resolves the serial library).
For those who struggle with the description. I did the following
Install z-wave binding via paper ui
go to karaf console and uninstall the binding via console
ssh openhab@localhost -p 8081
password is 'habopen’
list the installed bundles:
bundle:list
...
184 | Active | 80 | 2.0.0.b4 | openHAB Dashboard UI
185 | Resolved | 80 | 2.0.0.b4 | openHAB Paper UI Theme Fragment, Hosts: 180
186 | Active | 80 | 0.9.10.v20160429-1435 | reflections (wrap)
187 | Active | 80 | 1.5.8.v20160511-1038 | swagger-jersey2-jaxrs (wrap)
190 | Active | 80 | 0.9.0.b4 | HABmin User Interface
191 | Active | 80 | 2.0.0.b4 | HomeKit Integration
198 | Active | 80 | 2.0.0.b4 | ZWave Binding
199 | Active | 80 | 2.0.0.b4 | openHAB Serial Transport Bundle
...
search for the zwave binding. In my case it had id 198
uninstall the binding using this id
bundle:uninstall 198
exit the karat console with
Ctrl+D
Install newest snapshot
got to ‘/usr/share/openhab2/addons’ (if you installed with apt-get)
Download the bundle here. e.g.
cd /usr/share/openhab2/addons
sudo wget https://openhab.ci.cloudbees.com/job/openHAB2-Bundles/lastSuccessfulBuild/artifact/bindings/org.openhab.binding.zwave/target/org.openhab.binding.zwave-2.0.0-SNAPSHOT.jar
Doh! It was about 1am when I sent that, so took the guidance very literally! Thanks for pointing out my error. My goal is to install the latest development build of the z-wave binding to resolve an error with setting up associations.
Presumably, I need a .jar file to add this through Karaf but I can’t find a .jar of the latest development version. Sorry if I’m still being dense here! Any help would be appreciated.
It simply installs the OSGi bundles and then tries to activate them (resolving dependencies etc). The system uses the Karaf container, so a search for this and OSGi principals should fill you in.