Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » newbie needs help starting binding(What do I do after installing ESH development environment?)
newbie needs help starting binding [message #1746565] Tue, 01 November 2016 01:33 Go to next message
Nathan L. is currently offline Nathan L.Friend
Messages: 7
Registered: November 2016
Junior Member
I am new to Eclipse SmartHome and have very little experience with Eclipse IDE.

I would like to develop a binding for a heat pump system using the serial binding as a baseline.

I followed the Setting Up a Development Environment from
https://www.eclipse.org/smarthome/documentation/development/ide.html
but am rather at a loss as to what to do next.


The last step indicates:

Your workspace should now fully compile and you can start the runtime by launching the "SmartHome Runtime" launch configuration:

which it appears to be doing in the Eclipse IDE, but now what? I was hoping there was a tutorial that would walk me through looking at, or developing a binding.

The Binding "Tutorial" at

https://www.eclipse.org/smarthome/documentation/development/bindings/how-to.html

explains some sample code and explains theory of the binding, but doesn't talk about the logistics of what I actually do to get started.

For instance,

1) What do I do in the Eclipse IDE if I want to look at the Yahoo Weather Binding (or the Serial Binding for that matter)

2) How do I build the binding and where are the built binding files so I can copy it into a running ESH?

3) How can I debug a binding in the Eclipse IDE?
Re: newbie needs help starting binding [message #1746703 is a reply to message #1746565] Thu, 03 November 2016 13:23 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 662
Registered: December 2011
Senior Member
Hi Nathan,

Welcome and sorry for the late reply!

The Eclipse SmartHome IDE setup is mainly required if you want to work on the source code of ESH itself. If you "only" want to implement bindings, the better choice for you might be the openHAB 2 IDE (see http://docs.openhab.org/developers/development/ide.html), which is less complex.

Specifically in your case, you do not have any other option, since the transport.io.serial binding (which you will require) does not exist in ESH due to licensing reasons, but only in openHAB. Also for other more general development issues, you might find some help in the openHAB developer guide at http://docs.openhab.org/developers/development/bindings.html.

Hope this helps you to get started.

Best regards,
Kai
Re: newbie needs help starting binding [message #1746791 is a reply to message #1746703] Fri, 04 November 2016 15:57 Go to previous messageGo to next message
Nathan L. is currently offline Nathan L.Friend
Messages: 7
Registered: November 2016
Junior Member
Thanks Kai!

In the Eclipse IDE Package Explorer, I have found

OpenHab 1 Add Ons -> org.openhab.binding.serial, but I don't see transport.io.serial binding in OpenHab 1 Add Ons or OpenHab 2 Add Ons. In fact, I don't see anything else related to serial. Did I not install something, or am I looking in the wrong place?

Re: newbie needs help starting binding [message #1746793 is a reply to message #1746791] Fri, 04 November 2016 16:01 Go to previous messageGo to next message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 662
Registered: December 2011
Senior Member
It's not necessarily in the workspace, it is in your target platform. Just check that you can select it there in your launch configuration. Have a look at a few other openhab2 bindings that use serial connection, which should compile nicely as well (check https://github.com/openhab/openhab2-addons/search?utf8=%E2%9C%93&q=gnu.io&type=Code).
Re: newbie needs help starting binding [message #1746886 is a reply to message #1746793] Mon, 07 November 2016 10:04 Go to previous messageGo to next message
Abin Mathew Abraham is currently offline Abin Mathew AbrahamFriend
Messages: 11
Registered: August 2016
Junior Member
Check out the following links:-
Concepts of Eclipse Smarthome:- https://www.eclipse.org/smarthome/documentation/index.html
IDE setup for binding development:- https://www.youtube.com/watch?v=o2QjCGdZl7s
Introduction to bindig development:- https://www.youtube.com/watch?v=30nhm0yIcvA
Re: newbie needs help starting binding [message #1746941 is a reply to message #1746886] Mon, 07 November 2016 21:42 Go to previous messageGo to next message
Nathan L. is currently offline Nathan L.Friend
Messages: 7
Registered: November 2016
Junior Member
Thanks Kai, Abin!

I have been trying to emulate the Introduction to binding development video, but when I get to the running of the OpenHab Paper UI, the binding does not show up.

In trying to diagnose, I notice that the binding does not show up in the pom.xml after the ./create_openhab_binding_skeleton.sh <binding name> command.

Any ideas why the binding does not appear?

-Nate
Re: newbie needs help starting binding [message #1746968 is a reply to message #1746941] Tue, 08 November 2016 07:48 Go to previous messageGo to next message
Abin Mathew Abraham is currently offline Abin Mathew AbrahamFriend
Messages: 11
Registered: August 2016
Junior Member
Hi Nathan,

In your debug configuration, under the Plugin Tab, have you checked whether your binding is selected?

Regards,
Abin
Re: newbie needs help starting binding [message #1746979 is a reply to message #1746968] Tue, 08 November 2016 10:34 Go to previous messageGo to next message
Nathan L. is currently offline Nathan L.Friend
Messages: 7
Registered: November 2016
Junior Member
Abin,

Yes, I did do that. I am suspecting it may stem from something earlier since it didn't show up in the pom.xml.

-Nate
Re: newbie needs help starting binding [message #1747052 is a reply to message #1746979] Tue, 08 November 2016 22:15 Go to previous messageGo to next message
Nathan L. is currently offline Nathan L.Friend
Messages: 7
Registered: November 2016
Junior Member
What is the mechanism that controls which bindings show up in the Paper UI->Configuration->Bindings page?

Currently, I am only seeing the following in the Paper UI->Configuration->Bindings page:

1) hue Binding
2) NTP Binding
3) YahooWeather Binding

-Nate
Re: newbie needs help starting binding [message #1747055 is a reply to message #1747052] Wed, 09 November 2016 01:54 Go to previous message
Nathan L. is currently offline Nathan L.Friend
Messages: 7
Registered: November 2016
Junior Member
SOLUTION: I figured out why my new binding was not showing up when I ran Eclipse in debug mode. I had previously installed openhab at /opt/openhab and that configuration was apparently causing havoc when I ran the Eclipse openhab in debug mode.

I zipped the /opt/openhab folder and removed /opt/openhab and now my new binding shows up!
Previous Topic:list of channels
Next Topic:Installing ESH on MAC Sierra (10.12.1)
Goto Forum:
  


Current Time: Mon Nov 19 20:35:08 GMT 2018

Powered by FUDForum. Page generated in 0.02214 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top