Hi, I’m trying to know if I ever wanted to develop a binding for a previous OpenHAB version like OpenHAB 4.0.2, do I need to checkout to a certain branch or commit on the addons repo?
Currently I have the latest commit which should be for OpenHAB 4.3.2
I tried building my jar file for the binding which is 4.3.2, but I have 4.0.2 so I modified the version in the jar name and pasted the jar inside the addons folder, but I still can’t see the binding on openhab
Update: I found on github repo a branch called 4.0.x, but it’s a stale branch, if I ever decided to create and build an addon on that version, I suppose it should be fine if my addon was developed and finished on that version to be available specifically for that version? or later versions too?
Add-ons should be developed against the main branch of the openhab-addons repo.
Only pull requests against the main branch will be accepted.
You can (try to) backport the add-on from the main branch to the 4.0.x branch, it should work but I cannot guarantee that — there might be changes in the openHAB core APIs.
By backporting it is meant to cherry-pick the commits to the 4.0.x branch, simply compiling on main and renaming the JAR will NOT work as the JAR is still compiled against main (currently 4.3.0 SNAPSHOT).
in that case, is there a way to deploy a 4.3.0 jar to OpenHAB version 4.0.2? I tried modifying the name so it matches the version but still I don’t see it. I did try to checkout to branch 4.0.x, but when I build the binding jar, it gives an error
No, there were several Karaf ugrade between 4.0.2 and the 4.3.0 SNAPSHOTs, which makes the JAR most of the time incompatible to older openHAB versions.
If I were you I would consider upgrading to openHAB 4.2.2, then the JAR should work.
There were not too many breaking changes from 4.0.2 to 4.1.0 and to 4.2.0 …