My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
IDESetup  
How to set up a development environment for openHAB
Updated Dec 8, 2011 by kai.openhab

Introduction

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.

Setup Instructions

Here are step-by-step instructions on how to get there:

  1. Download and install the Mercurial binaries for your platform.
  2. Download and install the Yoxos Installer.
  3. Download and execute the file openHAB.yoxos. This will install you an Eclipse IDE with all required features to develop for openHAB.
  4. Create a new workspace and configure the path to your "hg" executable in Preferences->Team->Mercurial.
  5. Choose File->Import->Mercurial->Clone Existing Mercurial Repository and enter https://openhab.googlecode.com/hg/ as the repository URL.
  6. After the import is done, you have to select the target platform by selecting Preferences->Plug-in Development->Target Platform->openHAB from the main menu.
  7. 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 open the folder "workflows". For each of the contained files, select "Run As->MWE2 Workflow" from the context menu.
  8. 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.
  9. 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).

Comment by divitama...@gmail.com, Dec 9, 2011

during the execution of point 7 I have this error: "please put bundle org.eclipse.emf.mw2.launch on your classpath" what can i do?

Comment by project member kai.openhab, Dec 9, 2011

This should normally be the case. Did you wait for step 6 to completely finish (this might take a while)? Please check if you have org.eclipse.emf.mw2.launch_2.2.0 listed in the Plug-in Dependencies of the project. If not, check for errors in your MANIFEST.MF (which lists this bundle as a requirement). If the problem persists, please use the forum for further discussions - thanks!

Comment by comment....@gmail.com, Feb 24, 2012

I can't download the file openHAB.yoxos, how to download it;

Comment by project member kai.openhab, Feb 25, 2012

What's the problem, the link is ok, I just checked it. Did you right click and use "save as..."?


Sign in to add a comment
Powered by Google Project Hosting