Development
Creating the correct repo structure
git clone https://github.com/openhab/openhab-addonscd openhab-addons/bundles./create_openhab_binding_skeleton.sh OpenLicht "René Schöne" rschoene- Paste source files from this repo into the folder
openhab-addons/bundles/org.openhab.binding.openlicht
Open Project in IntelliJ
When opened IntelliJ use File -> New -> Project from Existing Sources and select the pom.xml from the root folder openhab-addons.
Building
- Use Maven in the right sidebar if installed (Search for
openHAB Add-ons :: Bundles :: OpenLicht Binding). - To create a jar run
Lifecycle->package(Always good toLifecycle->cleanbefore doing this).
Debugging/Running
- Start OH3 runtime (
start_debug.shfor debugging,start.shfor production). - Go to OSGI-Console of OH and call
feature:install openhab-transport-mqtt(if not done yet in current OH installation). - Paste the jar file from
openhab-addons/bundles/org.openhab.binding.openlicht/target/in addons folder of OH runtime (namedaddons).
Hint
If any error occur try executing mvn spotless:apply to resolve them.
For any further information use this guide and for IntelliJ related things look here