IDE Setup - I'm lost

Step 11… Eclipse IDE | openHAB

Can you be more specific? By upload, do you mean commit?

Hi Scott,

Thanks for the quick reply.

You are right in both fronts:-
I used step 11 to manually import the folder.
And I did mean commit and not upload!

Just looking through All the settings to check everything else looks ok.

Mick

After committing and pushing, do you see the changes in your repo in GH? What is not working?

Did you make a fork? If you don’t know what I mean you probably didn’t.

I did create a fork in GH, cloned a copy to my laptop then imported it into Eclipse…

For some reason even though I created a fork about a week ago (or so I thought), when I go into GH it appears to be a stale copy of one I worked on a couple of years ago! Could that be the cause?

I have tried to fork again in GH but nothing appears to happen (ps I’m working via their website).
As the copy in my GH repository appears stale and all the changes I had previously made were committed, should I try deleting that one and starting from scratch?

It should not be needed to delete the repo. I’m guessing you made your new changes based on the openHAB main repo. Did you also made your local new changes on the master branch? And if so did you try to force push the changes to your GitHub repo?

Many Thanks for your help and advice.

I think it is now working, the problem was the path to my repository didn’t import correctly.
It looks like I have managed to get it working.
The following pull request [Seneye] Bug fix for using Pond or Home sensors. #7797 should now be visible.

@MickUrsell I have exactly the same situation now. I have a binding I want to test and I’ve got Eclipse installed, I have the distro and the addons from GitHub but the OH Add-ons folder is empty. You said you solved by importing the folder from the file system. Exactly which directory level did you point to when importing? …\openhab-master\git\openhab-addons?

No, you choose just the directory for the binding you want to import. For example:

Select File/Import
The select Maven/Existing Maven Projects
Then click “Browse” and choose the binding directory such as: git/openhab-addons/bundles/org.openhab.binding.alarmdecoder

IMHO this is just one more new annoyance in a dev environment setup process that is already too complex and fragile. It should work, though.

1 Like

Thanks. However, now I’m getting “Non-resolvable parent POM”. Whatever the hell that means. Sigh.

I may come back to it next week.

Is that on your own branch or on the main repo?

Hi
The main repo, I didn’t create a branch. All I wanted to do was resolve all the dependencies and check my add-on for errors.

I don’t understand what your are doing. You need to be more specific about what you’re actually doing otherwise I don’t know how to help you. It sounds like you imported your binding in eclipse from your own branch or just copies the binding in the new main branch. In either cases the version in your binding pom.xml must match with the version of the pom in the upper directories or if it’s a SNAPSHOT version it must be up-to-date with the current SNAPSHOT version.

I just followed the instructions here, which clones the Git projects.

That’s it. I don’t have a branch.

OK, so the two POMs have to match. I’ll have a look at it. By the looks of it, it’s the 3.0.0-SNAPSHOT that I’ve cloned.

When you clone you get everything, all branches. To switch to an existing branch, on the command line: git checkout <branchname>

Maybe I’m being imprecise with my terminology. I don’t get the impression that I have all the branches on my hard drive. What I have seems to be 3.0.0-SNAPSHOT.

Well 3.0.0-SNAPSHOT is built nightly from the main branch. So if you pull down openhab-addons and do a “git checkout main”, you should have the code for the bindings as they are in the current snapshot. Then you would typically create a local development branch by doing something like “git checkout -b mynewbinding” and work on that branch. But what did you do after that? I assume you added a subdirectory for a new binding under the bundles directory? In that case, did you also edit the bundles/pom.xml file? Or are you working on an already existing binding?

The binding is new, for the Awair sensor, but based on the Foobot binding, since it’s so similar.

I didn’t have the binding folder under bundles. I added it to the bundles pom.xml file and also made sure the version in the pom.xml binding was aligned. Then I added my binding folder under OH Add-ons following your instructions, and this time… success.

I’ll create a branch later. For the moment I’m happy to have the environment set up and be able to fix the most obvious errors in the code.

Many thanks! No doubt I’ll be back later with more questions.