I plan on developing and contributing a binding. Based on what I’ve learned of OpenHAB thus far, it seems the project is in the process of a major version transition.
That being said, which version should I target when creating a binding?
It depends. The core of OH 1 is basically at end of life. There will be no more bug fixes or changes to OH 1 core from this point forward. However, developers of existing bindings may continue to develop for and support the platform. On the other hand, OH 2 is still in beta, still undergoing major development, and it is not yet know when an official release will be made.
So, if you don’t want to wait I would say develop for OH 1 but test it with OH 2 (OH 2 has a compatibility layer that allows OH 1 bindings to work in OH 2. If you want to take advantage of some of the new features of OH 2 like automated binding installation, auto discovery, etc I’d say go straight to OH 2.
Also, I suspect that the bulk of OH users will transition to OH 2 when it is officially released so even if you do target OH 1, test it with OH 2 as you go to make sure it works there as well or you may lose a lot of users.