IDE Setup - I'm lost

Folks,

I am trying to create my first binding - I want to change the Train Times rule that I have and turn it into a binding.

I’ve followed the process here: https://www.openhab.org/v2.3/docs/developer/development/ide.html

But am left with a blank IDE. I’ve closed it, reopened it and select the c:\Users\Crispin\OpenHab-master folder as my workspace but still, it’s not showing me anything.

Did I miss a step? I’ve not used Eclipse or Java before, only VS studio etc.

Thanks
C

Just a wild guess but I think you missed one or more selections. Remove your install and start over and be sure to follow all steps.

Setup of the IDE have changed a little bit since 2.3 release. Please follow latest docs on Eclipse setup: https://www.openhab.org/docs/developer/ide/eclipse.html
There is also a section about VSC.

Please be aware that process itself is long, so you need to leave it for a while so all downloads are completed. Also once IDE is launched you will notice that there is still something going on. This is due the fact that there is a source checkout and then import to development environment. IDE will be restarted once or twice before you will get everything in place.
In your case it seems that process did not complete or failed due to some mysterious reason.

Unfortunately you are looking at the outdated documentation. Use:

Thanks folks.

Going through it again. I suspect (one of) the problems was closing the ide to soon. I’ve gone through it again and now can see it’s trying to download everything.

Being on holiday with slow internet access, it might be a while :frowning:

So far, so good :slight_smile:

1 Like

What are you planning to do? It seems you have ticked all checkboxes, which means it will take a long time to download everything, and a long time for eclipse to build everything and I doubt you need it :man_facepalming: did you read the documentation?
It’s probably still running and if so I suggest to kill eclipse, reinstall and only select openHAB Development and clone the repo you need (openHAB-addons I presume) and import only the project you need.

yup :smiley:

I wanted to see if I could change my train-times widget / rule into a National Rail binding to be more useful.

Did I tick all the boxes? Yup. I knew it would be too much but did not think it would take this long.

I’ll restart it all and see how it goes.

ok, making some progress.

I have everything set up now, only pulled in the addons and core (it would not start the build process without bringing core in)
However, I get this in the IDE


I tried a clean and build and it remains as-is.

I created my own binding using the cmd file provided. That downloaded a shedload of stuff and finished with a success message.
I can now see the following

I now try the next step, mvn build, and get the following error


Related to the failed build above?

I’ve cleared everything down and tried again, making sure I (think I have) followed the documentaion
I still get this

Fresh out of ideas. The hint to read at the bottom of that message did not help me at all.
I don’t know maven, java or any of this so really learning as I go. Wish it were simpler :slight_smile:

Looks like your binding is missing in the bundle/pom.xml.
Did you create your binding with the skeleton script? And are you on Windows? Because that might explain why it’s missing.

Yes and yes.

Hi there,

@CDriver, same happened to me the 1st time I’ve created a binding with the skeleton script from a Windows 10 machine. Adding <module>org.openhab.binding.mybinding</module> to openhab-addons/bundles/pom.xml worked for me.

@hilbrand, I had to reinstall Eclipse IDE from scratch, followed again the updated doc and selected both projects - Development and Add-ons. Conversely from the 1st time now, after the build phase, I always end up with an empty OH Add-ons folder:

image

Any suggestion ?
Thanks :slight_smile:

1 Like

Thanks,

Alas, I think it’s more than that.
I’m seeing this

I’m going to remove it all again and give it another last-ditch try. :slight_smile:

It’s related to this:

Thanks Hilbrand,

That unfortunately adds more confusion to my already struggling head. Reading through the comments just adds to my confusion.

I just wanted to try and create a binding and try contribute in a small way to the awesome job you guys are doing. I wanted to create the UK National Rail binding and add to the persistence - countSince (I found the code, looks straight forward enough)

Having spent a good number of hours reading documentation chasing my tail only to find out it’s wrong documentation again another thing and again another thing, is a bit depressing to say the least.

I don’t know how I can help any more. Following the documentation, as a noob, I cannot help in pointing out what is right and what is wrong.

Thanks though for your help. I’ll keep an eye on things and try again when it looks like it might be a smoother ride. :smiley:

1 Like

@CDriver

If you are familiar with VS studio - you may want to give the VSCode environment a shot. A ton easier to setup than eclipse. I’ve been using it constantly for about 6ish months now and it’s pretty good…

Tim

Facing the same issue (on Windows 10). Different versions of Eclipse. Multiple retries with clearing .p2 and .m2 .
Did you find a solution for the empty OH Add-Ons folder?
@hilbrand Is there a solution?

Not sure if anyone is still struggling with this, but I discovered that the addons did download even though the folder was showing empty in Eclipse.
My solution was to Import the folder from my harddrive and it appears to be working (only limited testing carried out!!!)
I hope this helps.

Mick

A word of warning I don’t appear to be able to upload any of the changes I have done to the binding I was working on.
Not sure if this is because I imported the folder manually or is unrelated.