Closed GoogleCodeExporter closed 8 years ago
Have a look at http://code.google.com/p/openhab/wiki/HowToContribute
We currently do not have specific documentation on how to implement a binding -
for the moment the best way is therefore to have a look at how other bindings
work and learn from it. Feel free to ask questions in the forum.
Original comment by kai.openhab
on 19 Nov 2012 at 10:15
O.K.
I have prepared a linux VM with OpenJDK, Maven, Mercurial, Eclipse and
Eclipse's App for Maven & Mercurial integration.
I synced "default" branch of openhab by Eclipse Mercurial integration App, and
now, I can view openhab Maven structure contents.
What's the next step?
P.D. I attached Secant Cardio RS-232 ASCII protocol specs doc.
Original comment by malberto...@gmail.com
on 21 Nov 2012 at 8:58
Excuse me. My English is not the good enought.
I had a look at openhab code, and I didn't know how to start encoding binding.
Really... I didn't ever installed or run oponhub, so I don't sure to know how
it works and how it can be configured. I am still reading your wiki and trying
to understund it.
But at the day of today, I don't yet understand the project structure, and my
knowledge on Java and Maven is limited.
Could you help me?
Could an openhub project developer start writting the binding? So I will can
understand how it is written, and I will can replicate program structures and
complete and test it.
Thank you very much.
Original comment by malberto...@gmail.com
on 22 Nov 2012 at 7:36
Thomas is working on a Maven archetype, which creates a binding skeleton as a
starting point for a new binding. Furthermore we will work on a wiki page that
explains the main points about writing a binding. If you can wait for a few
more weeks, these things might help you to get a start.
Original comment by kai.openhab
on 24 Nov 2012 at 9:13
That is great!
Of course... I can wait.
Thank you very much.
Original comment by malberto...@gmail.com
on 26 Nov 2012 at 7:11
fyi: the maven archetype is available meanwhile. See
http://code.google.com/p/openhab/source/browse/bundles/archetype/org.openhab.arc
hetype.binding/README.txt for details who to use it.
Original comment by teichsta
on 30 Apr 2013 at 2:52
I can not build the maven archetype. The openHAB version in mercurial
repository is 1.3.0-SNAPSHOT, and maven metadata found is for 1.2.0-SNAPSHOT.
Original comment by malberto...@gmail.com
on 8 May 2013 at 9:20
[deleted comment]
[deleted comment]
Original comment by teichsta
on 21 May 2013 at 9:29
I can still not build binding.
I attached the binding by maven archetype generation error log file.
Original comment by malberto...@gmail.com
on 25 Jun 2013 at 7:56
i updated the version of the pom and removed the hardcoded bundle-version in
MANIFEST.MF could you try again?
you should also use an capitalised binding name, since this name is used to
generate the new classes. The get's lowercased where it's needed. The call
should look like this (after installing the artifact to your local mvn
repository).
mvn archetype:generate -B -DarchetypeGroupId=org.openhab.archetype
-DarchetypeArtifactId=org.openhab.archetype.binding
-DarchetypeVersion=1.3.0-SNAPSHOT -Dauthor="Manuel Alberto Guerrero Díaz"
-Dversion=1.3.0 -DartifactId=org.openhab.binding.cardio2e
-Dpackage=org.openhab.binding.cardio2e -Dbinding-name=Cardio2e -X -e
Hope this helps,
Thomas E.-E.
Original comment by teichsta
on 25 Jun 2013 at 6:39
Thanks for your answer.
I used an capitalised binding name, such you suggested.
Generation still fails.
I attached generation log.
Original comment by malberto...@gmail.com
on 26 Jun 2013 at 12:02
hm, that works me. Did you issue an "mvn clean install" in the directory:
<sources>/openhab/bundles/archetype/org.openhab.archetype.binding
Original comment by teichsta
on 26 Jun 2013 at 12:55
Sorry. Excuse me, but I still can not to build archetype.
I made "mvn clean install" as you suggested and tried again: ERROR.
I attached last error log.
Original comment by malberto...@gmail.com
on 10 Jul 2013 at 10:21
Please follow the following steps:
* go to your local openHAB clone and call 'hg pull -u'
* go to <sources>/openhab/bundles/archetype/org.openhab.archetype.binding and
call 'mvn clean install'
* go to <sources>/openhab/bundles/bindings and call 'mvn archetype:generate ...'
+ If that doesn't work please move your local repo (/home/openhab/.m2) to
.m2_old and start from the top
+ If that still doesn't work check out the sources again and start from the top
Original comment by teichsta
on 10 Jul 2013 at 12:43
[deleted comment]
Excuse me. I had a lot of job and can not do a new try before.
I exactly did wiki instructions in a clean new OpenSuSE 12.3 x64 virtual
machine with Oracle Java 1.7.0u40 JDK, lasted Yoxos 5.6 openHab Eclipse IDE and
lastest Maven 3.1.0 installed.
I cloned lastest project from new GIT 1.4.0-SNAPSHOT repository into
~/workspace/openhab.
I removed ~/m2 directory (not exist yet)
I executed "maven clean install" in
~/workspace/openhab/bundles/archetype/org.openhab.archetype.binding -> SUCESS
I executed "mvn archetype:generate -B -DarchetypeGroupId=org.openhab.archetype
-DarchetypeArtifactId=org.openhab.archetype.binding
-DarchetypeVersion=1.3.0-SNAPSHOT -Dauthor="Manuel Alberto Guerrero Díaz"
-Dversion=1.3.0 -DartifactId=org.openhab.binding.cardio2e
-Dpackage=org.openhab.binding.cardio2e -Dbinding-name=Cardio2e -X -e" in
~/workspace/openhab/bundles/binding -> FAILED
I surrender. Can not build archetype. And I cannot attach lastest mvn archetype
generate error log: Issue attachment storage quota exceeded.
Original comment by malberto...@gmail.com
on 8 Oct 2013 at 1:04
Try now with the very latest version on GitHub and version 1.4.0-SNAPSHOT - I
have just pulled a change to fix the archetypes:
https://github.com/openhab/openhab/pull/37
Original comment by kai.openhab
on 12 Oct 2013 at 7:39
Original comment by teichsta
on 5 Nov 2013 at 10:47
This issue has been migrated to Github. If this issue id is greater than103 its
id has been preserved on Github. You can open your issue by calling the URL
https://github.com/openhab/openhab/issues/<issueid>. Issues with ids less or
equal 103 new ids were created.
Original comment by teichsta
on 17 Nov 2013 at 8:08
see above!
Issue has been migrated to Github and should be discussed there.
Original comment by teichsta
on 21 Nov 2013 at 1:51
Original issue reported on code.google.com by
malberto...@gmail.com
on 19 Nov 2012 at 12:30