Open masipila opened 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
Hi, as far as I remember this is what I did to start working on a binding:
cd bundles/org.openhab.binding.awattar
mvn clean package
. This will take a while on the first run every day, as it downloads a lot of things. Subsequent runs on the same day are much faster. If you have multiple versions of java on your machine, be sure to set JAVA_HOME correctly, otherwise the build will fail.target
, which is now created, you find the jar file with the binding.addons
of the just unpacked openHAB distributionuserdata/logs
mvn spotless:apply
before compiling to ensure that the coding styleguide is met.-s
, maybe this can be configured in git somewhere), otherwise the automated PR check will fail and your PR will not be merged.I'm sure this list is not complete, but maybe it helps as a starting point.
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.
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.
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