Skip to content
This repository has been archived by the owner on May 23, 2019. It is now read-only.

Make openHAB location configurable? #235

Closed
hypetsch opened this issue Oct 15, 2017 · 2 comments
Closed

Make openHAB location configurable? #235

hypetsch opened this issue Oct 15, 2017 · 2 comments

Comments

@hypetsch
Copy link
Contributor

Over the last days I had some time to play around a little bit with HABPanel. I tried to implement a new widget (PR #234) - to avoid having to recompile and deploy it for each step I

  • ran gulp watch in the web directory
  • hosted the web directory using npm http-server
  • and hacked the openhab.service.js in order to 'redirect' the REST calls to my openHAB instance by adding http://ip:port/ for all REST calls.
    To make it working, CORS has to be enabled in openHABs conf\services\runtime.cfg by adding org.eclipse.smarthome.cors:enable=true.

Doing so it is possible to run HABPanel outside of openHAB, which - I think - simplifies the development process - or is there another simple way to test changes?

What do you think: Is it worth adding an optional configuration setting for an external openHAB location (e.g. a base URL like http://ip:port) in the future or am I missing something?

As far as I understand the architecture of HABPanel (client-side only) it would then also be possible to host it outside of openHAB. This could also be a benefit?

@ghys
Copy link
Member

ghys commented Oct 15, 2017

HABPanel is mostly a web client so what I do - and suggest - is to clone the repository into your conf/html folder then it's accessible at http://youropenhabip:8080/static/org.openhab.ui.habpanel/web/index.html.
Then you won't need to recompile the OSGi bundle every time :)

@hypetsch
Copy link
Contributor Author

Thanks, of course. Sometimes one doesn't see the wood for the trees... :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants