Missing dependency running the demo app in eclipse

Thank you for your time and patience. I can now step through the code in the debugger.

That was the easy part. Now I need to teach myself Java so i can possibly help on the project. Lets hope this won’t be be the last time I need to pester you.

1 Like

That’s awesome you got it working! :+1: :1st_place_medal:
No problem helping you out!
These posts and the PRs will surely also help others.
Learning Java might even be the easiest part. :wink:

I tried to import another addon and now the project tree has changed and it is not available to select in the repositories. :confused:

Which add-on did you try to add and did you also add it to the Demo App pom.xml like you did for the Astro binding? IIRC there are still a few add-ons that can’t be debugged this way because of dependency issues.

You are correct I did forget to add it to the pom.xml but looking at the project tree now I dont have the demo app and can’t see where the file is to edit. I will do some digging to see if i can find it.

I added the globalcache addon using the maven import and did not notice if the project when like this after the debug session or after adding the globalcache project.

Launching the Demo App with the globalcache add-on works for me!:

Did a fresh install of eclipse/openhab and the project tree is fixed and i also have a working global cache binding now. Had a busy weekend with work so have not had any time to play as yet.

Thanks again for all of the help.

1 Like

Should have some time this weekend to dive in some more so will be looking through the github issues but wanted to know if I should be looking at core or addons issues.

My preference is to just migrate code while i work my way through the whole BOM/POM and java frameworks.

It’s always nice to have an extra helping hand! :+1: I’d say working on issues in existing add-ons is the best way to start. That’s because there are many add-ons all using the same (better documented) interfaces with lots of examples and more contributors to help. That way you also learn how these add-ons work so you can implement your own one day. After a while you will probably also learn more about the inner workings of the core.

I am trying to add the network binding and after importing it as a maven project and adding it to the pom.xml I get en error when resolving.

Resolution failed. Capabilities satisfying the following requirements could not be found:
[<>]
⇒ osgi.identity: (osgi.identity=org.openhab.binding.network)
⇒ [org.openhab.binding.network version=2.5.4.202004101853]
⇒ osgi.wiring.package: (&(osgi.wiring.package=org.apache.commons.net.ftp)(&(version>=3.6.0)(!(version>=4.0.0))))

The network binding doesn’t work for me neither this way. Looks like that’s one of those add-ons that won’ t work because of dependency issues. Seems like it’s depending on commons-net 3.6 whereas the Demo App will use the version defined in the BOM (3.3). Those fr.bmartel artifacts also don’t seem to be OSGi bundles.

hijacking the thread a bit…
I can’t get my binding that is running in eclipse demo.app to remember my binding config details.
Every start of it ‘forgets’ the details for the binding config

Any suggestion what is missing that this is not saved?

Which of your many add-ons specifically? :wink:

$ cat CODEOWNERS |grep marcelrv
/bundles/org.openhab.binding.max/ @marcelrv
/bundles/org.openhab.binding.miio/ @marcelrv
/bundles/org.openhab.binding.ntp/ @marcelrv
/bundles/org.openhab.binding.windcentrale/ @marcelrv
/itests/org.openhab.binding.max.tests/ @marcelrv
/itests/org.openhab.binding.ntp.tests/ @marcelrv

:tada: :grin:
/bundles/org.openhab.binding.miio/
That has since the latest version cloud logon details in the binding config… Eclipse has a hard time remembering :wink:

In the regular runtime it works just fine… OH does not suffer from the same

It’s probably an issue for almost any configuration.

I did some testing and for me it keeps remembering them again with the changes in this PR:

1 Like

Gave up on eclipse and now have the network bundle loaded in VScode following the guide.

What wasn’t obvious in the doc’s was to have an openhab install up and running beforehand.

I added -DSkiptests and -DskipChecks to all mvn lines in the tasks.json as debug wouldn’t compile for release. There is already an open issue on null pointers which I will go through to try and fix so that I can get a release build working.

I am now stuck in that none of the breakpoints are getting hit trying NetworkBindingConfiguration.java. I have the network binding in paperui and have added a network thing that shows as online.

Sorry, I don’t know anything about Java development with VS Code so I can’t help with that. AFAIK most maintainers are using Eclipse.

great… in my tries to get it working, I already put the file in that location. Eclipse picked it up right away :tada:

1 Like

Nice! :slight_smile: I also like it’s now working exactly like with Karaf so you can easily find the configurations and swap them around.

I tried to import another addon and now the project tree has changed and it is not available to select in the repositories. :confused:

This has happened to me again after restarting my machine last night after having it work successfully for the last week. When I opened up the workspace it took forever to load and did a complete build.

I will do a fresh load but wanted to know if i can prevent it from happening again.