This repository contains the web user interfaces for the openHAB smart-home project, featuring approximately 5 different extensions located in the bundles folder.
Key Resources:
- Developer documentation: https://www.openhab.org/docs/developer/
- Core concepts: https://www.openhab.org/docs/concepts/
- Core repository: https://github.com/openhab/openhab-core
repo root folder
├── bundles/
│ ├── org.openhab.ui # Main UI (main user interface for openHAB)
│ ├── org.openhab.ui.basicui # Basic UI (sitemaps)
│ ├── org.openhab.ui.basicui # CometVisu Backend for openHAB (https://www.cometvisu.org/)
│ ├── org.openhab.ui.habot # HABot UI (chatbot)
│ ├── org.openhab.ui.habpanel # HABPanel UI (fixed-layout dashboard)
│ └── org.openhab.ui.iconset.classic # Classic Icon Set
├── CODEOWNERS # Maintainer assignments
└── ...
Important: This repository depends on the openhab-core repository, which defines the base system and APIs.
- Target: Java 21
- Use modern language features, but stay within Java 21 bounds
- Avoid preview features or experimental APIs
- Add meaningful code comments where helpful
- Avoid obvious comments (e.g.,
// constructor) - Use Javadoc for API/class/method documentation
- Follow guidelines at: https://www.openhab.org/docs/developer/guidelines.html
- Follow checklist at: https://github.com/openhab/openhab-addons/wiki/Review-Checklist
- Sort imports alphabetically
- Group imports logically (standard library, third-party, openHAB)
- Use
mvn spotless:applyto fix formatting issues - POM sections should be sorted
When upgrading Maven dependencies:
-
Check version consistency across:
features.xmlfiles for hardcoded version numbers*.bndrunfiles for hardcoded version numbers
-
After updates:
- Run
mvn spotless:applyto fix formatting - Consider running full Maven build with
-DwithResolveroption
- Run
- I18N properties files for specific languages, e.g. foobar_de.properties, should be omitted.
- Reference documentation: https://www.openhab.org/docs/developer/utils/i18n.html#managing-translations
There might be AGENTS.md files in subfolders. Consider them when files from that UI are open in the editor:
- bundles/org.openhab.*/AGENTS.md
- Located at repository root
- Maps GitHub usernames to UI responsibilities
- Format:
path/to/UI @github-username
# Format code
mvn spotless:apply
# Run tests
mvn clean install
# Build and run tests for a single specific user interface
mvn clean install -pl org.openhab.ui.uinameAfter building, the directory target inside org.openhab.ui.uiname contains several test reports.
- target/code_analysis/report.html for results of the static code analysis
- target/site/jacoco/index.html contains code coverage (only if available for a specific binding)
- Dependency Management: Always check
features.xmland*.bndrunfiles when updating dependencies - Import Order: Unsorted imports will fail style checks
- Java Version: Stay within Java 21 - newer features will break CI/CD
- Documentation: https://www.openhab.org/docs/developer/
- Community Forum: https://community.openhab.org/
- GitHub Issues: Use for bug reports and feature requests
- Code Reviews: Required for all contributions
| Task | Command |
|---|---|
| Format code | mvn spotless:apply |
| Full build | mvn clean install |
| Build with resolver | mvn clean install -DwithResolver |
| Build a specific UI | mvn clean install -pl org.openhab.ui[.name] |