Add-ons for openHAB
Go to file
Roie Geron 8258d9d722
[touchwand] - better handle unit update when currStatus key is null (#10520)
* notify listeners on status change using discovery 


Signed-off-by: Roie Geron <roie.geron@gmail.com>

* adapt bridge discovery name to new string broadcast

Signed-off-by: Roie Geron <roie.geron@gmail.com>

* check correctly if current status key is not null

Signed-off-by: Roie Geron <roie.geron@gmail.com>

* change log from warn to debug

Signed-off-by: Roie Geron <roie.geron@gmail.com>

* better handle when currStatus is null

also move logs from warn to debug

Signed-off-by: Roie Geron <roie.geron@gmail.com>

* remove nonNullByDefault annotation

as dto can be null 

Signed-off-by: Roie Geron <roie.geron@gmail.com>
2021-04-17 15:42:37 +02:00
.github Add issue template config (#9882) 2021-01-25 21:14:01 +01:00
bom [vdr] Initial contribution (#9947) 2021-04-11 20:02:00 +02:00
bundles [touchwand] - better handle unit update when currStatus key is null (#10520) 2021-04-17 15:42:37 +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 [vdr] Initial contribution (#9947) 2021-04-11 20:02:00 +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 Use SAT release version 0.11.1 (#10519) 2021-04-14 16:18:10 +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!