Add-ons for openHAB
Go to file
Andrew Fiddian-Green 0b375dc28a
[velux] Fix synchronisation of handler initialization and disposal (#10449)
* [velux] break on socket timeout if interrupted flag set

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] pause initialize until pending dispose is done

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] synchronization key is IP address not ThingUID

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] reduce logging level

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] reduce logging level, improve user comprehensibility

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] access updateBindingState() externally via static method

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] tweak logging

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] defer refreshBindingInfo until after initialized / disposed

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] refactor method names to show the type of scheduler they run on

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] don't terminate thread early

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] restore calls to updateBindingState

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] logger cosmetics

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] reduce logging levels

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] change logger level

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] synch on ip address object instead of Future<>; make shutdown timeout explicit; disable HSM on shutdown

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] add lock modifier, remove duplicate synchronized, refactor HSM shutdown

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] shutdown code was not being called

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] don't convert InterruptedException to IOException

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>

* [velux] let shutdown explicity stop the polling loop

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2021-04-22 23:23:26 +02:00
.github Add issue template config (#9882) 2021-01-25 21:14:01 +01:00
bom [dali] Initial contribution (#10093) 2021-04-19 19:51:50 +02:00
bundles [velux] Fix synchronisation of handler initialization and disposal (#10449) 2021-04-22 23:23:26 +02:00
features [dynamodb] Dynamodb refactor (#9937) 2021-04-10 22:13:38 +02:00
itests [modbus] Gain-offset profile (QuantityType support) and writing of individual bits of holding registers (#9980) 2021-04-16 22:59:55 +02:00
licenses/epl-2.0 Codebase as of c53e4aed26 as an initial commit for the shrunk repo 2020-09-20 23:57:58 +02:00
src/etc Codebase as of c53e4aed26 as an initial commit for the shrunk repo 2020-09-20 23:57:58 +02:00
tools/static-code-analysis/checkstyle Use SAT release version 0.11.1 (#10519) 2021-04-14 16:18:10 +02:00
.gitattributes Fix .gitattributes (#10472) (#10504) 2021-04-11 16:36:39 +02:00
.gitignore Remove/ignore Eclipse project files (#8529) 2020-09-21 22:50:37 +02:00
CODEOWNERS [dali] Initial contribution (#10093) 2021-04-19 19:51:50 +02:00
CONTRIBUTING.md Codebase as of c53e4aed26 as an initial commit for the shrunk repo 2020-09-20 23:57:58 +02:00
LICENSE Codebase as of c53e4aed26 as an initial commit for the shrunk repo 2020-09-20 23:57:58 +02:00
logo.png Codebase as of c53e4aed26 as an initial commit for the shrunk repo 2020-09-20 23:57:58 +02:00
pom.xml Adapted url for Artifactory (#10548) 2021-04-20 21:33:02 +02:00
README.md Remove Travis CI configuration (#9343) 2020-12-12 15:39:36 +01:00

openHAB Add-ons

Build Status EPL-2.0 Bountysource

This repository contains the official set of add-ons that are implemented on top of openHAB Core APIs. Add-ons that got accepted in here will be maintained (e.g. adapted to new core APIs) by the openHAB Add-on maintainers.

To get started with binding development, follow our guidelines and tutorials over at https://www.openhab.org/docs/developer.

If you are interested in openHAB Core development, we invite you to come by on https://github.com/openhab/openhab-core.

Add-ons in other repositories

Some add-ons are not in this repository, but still part of the official openHAB distribution. An incomplete list of other repositories follows below:

Development / Repository Organization

openHAB add-ons are Java .jar files.

The openHAB build system is based on Maven. The official IDE (Integrated development environment) is Eclipse.

You find the following repository structure:

.
+-- bom       Maven buildsystem: Bill of materials
|   +-- openhab-addons  Lists all extensions for other repos to reference them
|   +-- ...             Other boms
|
+-- bundles   Official openHAB extensions
|   +-- org.openhab.binding.airquality
|   +-- org.openhab.binding.astro
|   +-- ...
|
+-- features  Part of the runtime dependency resolver ("Karaf features")
|
+-- itests    Integration tests. Those tests require parts of the framework to run.
|   +-- org.openhab.binding.astro.tests
|   +-- org.openhab.binding.avmfritz.tests
|   +-- ...
|
+-- src/etc   Auxilary buildsystem files: The license header for automatic checks for example
+-- tools     Static code analyser instructions
|
+-- CODEOWNERS  This file assigns people to directories so that they are informed if a pull-request
                would modify their add-ons.

Command line build

To build all add-ons from the command-line, type in:

mvn clean install

To improve build times you can add the following options to the command:

Option Description
-DskipChecks Skip the static analysis (Checkstyle, FindBugs)
-DskipTests Skip the execution of tests
-Dmaven.test.skip=true Skip the compilation and execution of tests
-Dfeatures.verify.skip=true Skip the Karaf feature verification
-Dspotless.check.skip=true Skip the Spotless code style checks
-o Work offline so Maven does not download any updates
-T 1C Build in parallel, using 1 thread per core

For example you can skip checks and tests during development with:

mvn clean install -DskipChecks -DskipTests

Adding these options improves the build time but could hide problems in your code. Parallel builds are also less easy to debug and the increased load may cause timing sensitive tests to fail.

To check if your code is following the code style run: mvn spotless:check To reformat your code so it conforms to the code style you can run: mvn spotless:apply

When your add-on also has an integration test in the itests directory, you may need to update the runbundles in the itest.bndrun file when the Maven dependencies change. Maven can resolve the integration test dependencies automatically by executing: mvn clean install -DwithResolver -DskipChecks

The build generates a .jar file per bundle in the respective bundle /target directory.

How to develop via an Integrated Development Environment (IDE)

We have assembled some step-by-step guides for different IDEs on our developer documentation website:

https://www.openhab.org/docs/developer/#setup-the-development-environment

Happy coding!