Show Basic UI instead of welcome when going to openhabian:8080

I’ve just installed a fresh version of openHAB 2.4.0 and I’d like to tweak the configuration a bit.
Currently to access BASIC UI user must enter the whole URL, for example http://openhabianpi:8080/basicui/app
is it possible to change the start page? So when the user types http://openhabianpi:8080 instead of the welcome page I would like to get BASIC UI page.

I can’t find anything in docs about that and I started to wonder if this is even possible.
If this is possible please guide me on how to do that.

The easiest way would be to bookmark http://openhabianpi:8080/basic/app. That way you will be sent directly to BasicUI.

@H102 I’m aware of this as a possible solution, but I am wondering if this kind of configuration is possible.
I’m uninstalling all other UI’s and I need just the BASIC UI.
I’ve successfully changed port to 80, what is left is the default homepage.

Cannot be done short of setting up a reverse proxy. The URL for Basic UI is /basic/app. You cannot change that. The Dashboard UI is at the default location. Even if you uninstalled the Dashboard (which I’m not sure you can) all that would do is give you a 404 error.

That’s a shame :frowning:
I’m not sure about the technology the openHAB UI’s are created with, but for example, apache has .htaccess files in which You can do 301 redirect. Maybe this kind of workaround if possible?

BTW this would be an awesome feature to have :sparkles:

I wonder if you could place an HTTP redirect in the dashboard file? Can’t remember if the config file allows for HTML code?

I don’t have access to my install at the moment…just thinking out-loud - this may or not be possible.

Squid

If I’ll have access to that HTML I’ll just add a piece of JavaScript that does the redirect.

As I mentioned this would be an awesome feature to have - ability to define the default UI that shows when You open openhabian:8080 in browser.

I think you need to touch this file at this part:

Cheers,
Łukasz

Hi Łukasz,
Thanks for the hint :wink:
Is the same thing configurable via openhabian/ssh?
I’d like to avoid making changes in source and compiling anything.
If this is doable via SSH then where should I look for that file?

Sorry for all the questions, I’m still very new to openhab.

Yes, file is located under /var/lib/openhab2/etc/jetty.xml /srv/openhab2-sys/runtime/etc/jetty.xml (openhabian setup confirmed in answer) - its a bit different in contents but has same function.

Yes, you can ssh into your machine and edit file manually or copy it via scp. No compilation needed, its a configuration update.

Good luck!

Łukasz thanks again!
I’ll try that tomorrow :slight_smile:

1 Like

Please post if it works!

It wasn’t /var/lib/openhab2/etc/jetty.xml

I’ve searched for all jetty.xml files on my PI and I found 4:

/var/lib/openhab2/etc/jetty.xml
/usr/share/openhab2/runtime/etc/jetty.xml
/srv/openhab2-userdata/etc/jetty.xml
/srv/openhab2-sys/runtime/etc/jetty.xml

the one I had to edit was /srv/openhab2-sys/runtime/etc/jetty.xml after changing value from /start/index to /basicui/app and rebooting I’ve got the behavior I want :slight_smile:

Now when I navigate my browser to openhabianpi (I’ve also changed the port from 8080 to 80) I’m automatically navigated to Basic UI.
I can, of course, go to start page by going to openhabianpi/start/index.

Łukasz thank You for help!

4 Likes

Glad it worked. I didn’t search for all jetty.xml files, wasn’t actually aware that there are so many copies of it. Well done Tomasz!

Yes, well done, indeed.:+1:

I’ve bookmarked your post, so I can direct others here, in the event they would like to do the same. Thank you for the contribution to OH and the community.:grinning:

1 Like

This is the first one, I hope to do more :slight_smile:
Now I’m struggling with setting up Eclipse to develop two bindings.
Currently this is a terrible and painful process for newbies like me.
Thank You guys for help!

I’ll repeat David’s common response. You have bad timing. There is a whole mess of changes in work involving the build system that is making the setup of Eclipse challenging. Once it’s done it should be much easier for new users.

I recommend posting a new thread under Development > IDE (after reviewing the other posts there of course) to get some help. Don’t try to solve this on your own right now. It’s too much of a moving target.

Thanks for this.

I’ve just swapped mine to /habpanel/index.html#/view/Welcome

            <New class="org.eclipse.jetty.rewrite.handler.RedirectRegexRule">                            <Set name="regex">/$</Set>
                    <Set name="replacement">/habpanel/index.html#/view/Welcome</Set>
            </New>

But I did have to edit /var/lib/openhab2/etc/jetty.xml

To land a user at an exact page :slight_smile: (more WAF points)

Then at the bottom of the my own HabPanel welcome page, I’ve put navigation buttons to access the other UI options.