Add-On development tutorials

Hi everyone!
As part of my work at university, I am planning to develop an Add-On to Openhab, that is supposed to send data from smart home devices to our data aggregation service. I am currently getting started and am a little confused with where to begin, is there a guide for setting up a development environment for add-ons? Also, what category would fit best to such an add-on? Third-Party-Integration?

Cheers,
Lasse

?
A Google Search for " docs openhab development " gave the following link as first suggestion.
Didn’t you search?

http://docs.openhab.org/developers/development/bindings.html

1 Like

Thank you very much and sorry for not being able to google properly in this case :slight_smile:

Additionally i would suggest to read the corresponding eclipse smarthome tutorial too.
You can find it in the ESH Docs.

There you can also find an API Reference, which may help you with programming.

Hi everyone, I got carried away doing other stuff, and just got back to it. I tried following the tutorial page on binding development, but the script to create a binding skeleton failed when I ran it. A quick google search told me that I need to build the smarthome stuff first, so I went into the smarthome subdirectory and did ‘mvn install’ which took about 40 mins, but it is still failing. The error message I’m getting is

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project pom: The desired archetype does not exist (org.eclipse.smarthome.archetype:org.eclipse.smarthome.archetype.binding:0.9.0-SNAPSHOT) -> [Help 1]

Am I doing anything wrong? I just followed the instructions for setting up an IDE so far… Thank you for helping :slight_smile:

Lasse

I checked the Maven Repository and it seems that in the script some old version is used. I could fix the script by changing line 11:

I replaced

  -DarchetypeVersion=0.9.0-SNAPSHOT \

with

  -DarchetypeVersion=0.9.0 \

I am quite new to the world of open-source development and pull requests but i’ll create a bug so it can be changed.

EDIT: You can find the Bug here:

Turns out it’s already changed and I didn’t pull. Sorry :open_mouth: