openhab / org.openhab.ui.habmin

HABmin - a graphical user interface for openHAB 2
231 stars 92 forks source link

Little documentation for developers #195

Closed thhart closed 7 years ago

thhart commented 7 years ago

Hi, since HABmin2 is not integrated into the openhab dev distro, it would be nice to have some small information how to get it into. How can it be integrated?

thhart commented 7 years ago

I have found this documentation: https://github.com/cdjackson/HABmin2/blob/master/CONTRIBUTING.md#openhab-2-bundle

However it does not work:

  1. The plugin has to be activated in the "Run configurations..." - ok
  2. The UI is shown in the OpenHab startup page - ok
  3. Clicking on it fails: http://localhost:8080/habmin/index.html - error
HTTP ERROR 404
Problem accessing /habmin/index.html. Reason:
ProxyServlet: /habmin/index.html
Powered by Jetty://

Console gives no error output by the way.

cdjackson commented 7 years ago

What sort of developer information are you looking for?

If you just want to install it as a user, then simply copy the JAR into the addons folder.

thhart commented 7 years ago

Hi, please see my second post, I have found your documentation after my first post, so this documentation is probably already sufficient, however something else is necessary obviously since it does not work within the dev environment. And no, I am not a user.

cdjackson commented 7 years ago

There shouldn't be anything else necessary. You should just import the project into the development environment.

When you say it "doesn't work" - maybe you can provide an explanation of what doesn't work - it would make it easier for me to provide guidance!

cdjackson commented 7 years ago

I've now consolidated this so that everything can be imported easily into Eclipse, or the IDE of your choice, and compiled with maven.

thhart commented 7 years ago

Hi Chris, thanks for diving into, I checked out again and indeed the Habmin seems to start. But unfortunately it holds with just the message "Loading..." on the starting page. In the JavaScript error console I have following output, it looks like some resources or paths not initialized correctly:

`23:37:00.309 Error: [$injector:modulerr] Failed to instantiate module HABmin due to: [$injector:modulerr] Failed to instantiate module HABmin.chart due to: [$injector:modulerr] Failed to instantiate module angular-growl due to: [$injector:nomod] Module 'angular-growl' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.5.8/$injector/nomod?p0=angular-growl minErr/<@http://localhost:8080/habmin/vendor/angular/angular.js:68:12 module/<@http://localhost:8080/habmin/vendor/angular/angular.js:2082:17 ensure@http://localhost:8080/habmin/vendor/angular/angular.js:2006:38 module@http://localhost:8080/habmin/vendor/angular/angular.js:2080:14 loadModules/<@http://localhost:8080/habmin/vendor/angular/angular.js:4617:22 forEach@http://localhost:8080/habmin/vendor/angular/angular.js:321:11 loadModules@http://localhost:8080/habmin/vendor/angular/angular.js:4601:5 loadMod minErr/<() angular.js:68 loadModules/<() angular.js:4640 forEach() angular.js:321 loadModules() angular.js:4601 createInjector() angular.js:4523 bootstrap/doBootstrap() angular.js:1758 bootstrap() angular.js:1779

index.html:367 jQuery.Callbacks/fire() jquery.js:3187 jQuery.Callbacks/self.fireWith() jquery.js:3317 .ready() jquery.js:3536 completed() jquery.js:3552 1 angular.js:68:12 `