-
Notifications
You must be signed in to change notification settings - Fork 0
IDE Setup
How to set up a development environment for openHAB
If you are a developer and not a pure user yourself, you might want to setup your Eclipse IDE, so that you can debug and develop openHAB bundles yourself.
Here are step-by-step instructions on how to get there:
- Create a local clone of the openHAB repository by running "git clone https://github.com/openhab/openhab" in a suitable folder.
- Download and install the Yoxos Installer.
- Download and execute the file openHAB.yoxos. This will install you an Eclipse IDE with all required features to develop for openHAB. Alternatively, you can install all required plugins on top of an existing Eclipse 4.2.2 installation using this update site or download a full distribution from Yoxos, if you register an account there.
- Create a new workspace.
- Choose File->Import->General->Existing Projects into Workspace, enter your clone repository directory as the root directory and press "Finish".
- After the import is done, you have to select the target platform by selecting Window->Preferences->Plug-in Development->Target Platform->openHAB from the main menu. Ignore compilation problems at this step.
- Now you need to run code generation for a few parts of openHAB. To do so, go to the project org.openhab.model.codegen and run the prepared launch files. For each .launch file, select "Run As->x Generate abc Model" from the context menu. Please follow the order given by the numbers. On the very first code generation, you are asked in the console to download an ANTLR file, answer with "y" and press enter on the console.
- All your project in the workspace should now correctly compile without errors. If you still see error markers, try a "clean" on the concerned projects.
- To launch openHAB from within your IDE, go to Run->Run Configurations->Eclipse Application->openHAB Runtime (resp. openHAB Designer).
To produce a binary zip yourself from your code, you can simply call mvn clean install
from the repository root and you will find the results in the folder distribution/target (you will of course need a Maven 3.0 installation as a prerequisite). Set MAVEN_OPTS
to -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
in order to avoid memory problems during the build process.
To run a single test you have to use following command: mvn -o org.eclipse.tycho:tycho-surefire-plugin:0.18.1:test
which activates the tycho-surefire-specific goal for OSGI unit test using the fragment bundle xxxx.test on xxxx bundle. The maven -o (offline) option accelerates the project dependency resolution by 10-20x since it lets maven search it's local repository. Normally, snapshot-enabled projects are using external repositories to find latest built packages.
Installation
Community
- Support
- News Archive
- Presentations
- How to Contribute
- IDE Setup
- How to Implement a Binding
- How to Implement an Actions
- User Interfaces
- Classic UI
- iOS Client
- Android Client
- GreenT UI
- CometVisu
- Bindings
- Asterisk Binding
- Bluetooth Binding
- Comfo Air Binding
- CUPS Binding
- digitalSTROM Binding
- DMX512 Binding
- EnOcean Binding
- Epson Projector Binding
- Exec Binding
- Fritz!Box Binding
- Fritz AHA Binding
- Heatmiser Binding
- Homematic Binding
- HTTP Binding
- IHC / ELKO Binding
- Insteon Hub Binding
- KNX Binding
- Koubachi Binding
- MAX!Cube-Binding
- MiLight Binding
- Modbus TCP Binding
- MPD Binding
- MQTT Binding
- Network Health Binding
- Nibe Heatpump Binding
- Nikobus Binding
- Novelan/Luxtronic Heatpump Binding
- NTP Binding
- One-Wire Binding
- Onkyo AV Receiver Binding
- OpenSprinkler Binding
- OSGi Configuration Admin Binding
- Philips Hue Binding
- Piface Binding
- Pioneer-AVR-Binding
- Plugwise Binding
- PLCBus Binding
- Pulseaudio Binding
- RFXCOM Binding
- Samsung TV Binding
- Serial Binding
- Snmp Binding
- Squeezebox Binding
- System Info Binding
- Somfy URTSI II Binding
- Sonos Binding
- TCP/UDP Binding
- TinkerForge Binding
- VDR Binding
- Wake-on-LAN Binding
- Z-Wave Binding
- Persistence
- db4o Persistence
- rrd4j Persistence
- Sql Persistence
- Sen.Se Persistence
- Cosm Persistence
- Logging Persistence
- Exec Persistence
- Automation
- Scripts
- Rules
- Actions
- Misc
- REST-API
- Security
- Google Calendar Support
- Twitter Action
- Service Discovery
- Dropbox Bundle
Samples
- Item definitions
- Sitemap definitions
- Binding configurations
- Rules
- REST Examples
- Tips & Tricks
- FAQ
- XSLT Transforms
- Scripts
- Integration with other applications
- Syntax highlighting for external editors
- Update-Scripts
- Samples-Comfo-Air-Binding
Release Notes