openhab / openhab-docs

This repository contains the documentation for openHAB.
https://www.openhab.org/docs/
Other
272 stars 688 forks source link

Improve the developer insturctions for new contributors: Setting up the development environment #2010

Open masipila opened 1 year ago

masipila commented 1 year ago

Hi,

Background and context I'm about to start my first add-on contribution to improve the existing aWATTar Binding, see the plan here: https://community.openhab.org/t/awattar-binding-beta-and-discussion/110497/76?u=masipila

What I have done so far

My confusion and purpose of this issue I'm overwhelmed by the fact that there are dozens and dozens of different repositories, including one for core and one for add-ons.

I know that I need to fork the openhab-addons and work in a feature branch, but I did not find any simple guidelines how I can actually start the development so that I would have a working devevelopment instance of openHab together with the forked codebase of openhab/openhab-addons. I mean instructions like

It's worth mentioning that my previous programming experience on the last 15 years or so is mainly from the PHP world and it's been a good while (read: 20 years) since I last wrote Java. That's the main reason why certain things that are most probably very obvious and go with saying for Java programmers are not obvious to me so I would appreciate some guidance AND propose that we add that guidance to the Developer Guide as well.

I'm familiar with Docker if that's the common practice amon openHab contributors.

Cheers, Markus

openhab-bot commented 1 year ago

This issue has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/awattar-binding-beta-and-discussion/110497/88

Wolfgang1966 commented 1 year ago

Hi, as far as I remember this is what I did to start working on a binding:

I'm sure this list is not complete, but maybe it helps as a starting point.

DougCulnane-Ded commented 1 year ago

Good advice from @Wolfgang1966

Using Docker to run openhab for development is a useful trick. You can copy your built target/*.jar to the addons folder to deploy it for testing.

https://www.openhab.org/docs/installation/docker.html

wborn commented 1 year ago

I have read https://www.openhab.org/docs/developer/ and installed Maven, JDK 11 and Eclipse

Did you install Eclipse yourself or did you follow the instructions?

https://www.openhab.org/docs/developer/ide/eclipse.html

After following these instructions the code is cloned to your computer. It also has instructions on how to import add-on code and test your changes.