Openhab-android: Serve PaperUI / NGRE in the App

Created on 11 Dec 2020  Â·  12Comments  Â·  Source: openhab/openhab-android

Is your feature request related to a problem? Please describe.

Hi ! I have to say the app works very well. But I have to use a browser instead of the app when I want to use the NGRE from the paperui. I know there might be very strong reasons behind the decision to not serve paperui in the app. But I think it should be optional to serve a paperui in the app if user wants. Would be really useful and would eliminate switching to a browser. This would make the app a one stop solution. By default serve sitemaps but if user wants to access NGRE or papre ui for that matter, selecting that from the options should be possible in the app only.

Describe the solution you'd like

Well my core requirement is to be able to access NGRE from the app. Either the whole paperui or just Rules page from the paperui would be great.

Describe alternatives you've considered

I tried to add webview directly linking to the rules page into the basicui sitemap. But it has its own limitations which render it useless.

  1. The app does not show scroll down options while adding a rule which renders it useless
  2. When on remote connection, the webview does not serve the page.

Additional context

..

enhancement

All 12 comments

From what I gathered from core developers so far is that Paper UI is considered an 'administration' UI, while the app is aimed at users (basically a BasicUI replacement with more bells and whistles). This is why Paper UI isn't referenced in the app.

Yes thats perfect the way it is. But I think it would make it more user friendly to add the option in the app only so that when the user wants to administer, that can also be done from within the app itself. I would not have cared about this until now but I have been using the NGRE lately and miss it in the App. There should be a way to access just the NGRE from the app if not the whole Paperui.

With OH3 we get a view of the main ui. Similarly it would be of great use to show the paper ui for OH2 also.

When people asked if it's possible to add Frontail (it's bundled with openhabian) to the app, I declined it, because it's something for the admin, but not for regular users.
However now it's possible to hide UIs in the side menu and from my side I'd be ok with adding PaperUI and Frontail, but hidden by default.

That would be awesome. Thanks.
In addition to a separate option to paper ui, can you also put an option for Rules page directly. The reason I am asking for this is because in everyday use a normal user might not need to play with the things, addons and other settings available in paperui, but, one might need to add rules or disable or enable rules(NGRE) on the go. Hence a separate link to the NGRE Rules page directly would be great.
So a user can hide or unhide the UIs and chose to show the whole papre ui or just the NGRE page for more convenience.

In addition to a separate option to paper ui, can you also put an option for Rules page directly

Given Rich's statements / concerns here I don't think that's a good idea.

Maybe you are right. But as far as my personal experience, i havent had non
working triggers in NGRE. NGRE might not be the best option to make complex
rules but most users just use simpler rules( like sending a command on some
particular event or time triggers ) most of the time, and NGRE works that out perfectly well.
Adding NGRE would be a great option for many of us. And ofcourse if someone
does not want it, it would be hidden by default, so no worries there.

On Mon, Dec 14, 2020, 12:25 AM maniac103 notifications@github.com wrote:

In addition to a separate option to paper ui, can you also put an option
for Rules page directly

Given Rich's statements / concerns here
https://community.openhab.org/t/any-way-to-access-ngre-in-the-android-app/109960/7
I don't think that's a good idea.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openhab/openhab-android/issues/2332#issuecomment-744051944,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR6CYS7JF3IBVRQZTRJ4HJLSUUEZVANCNFSM4UW3YUBQ
.

With Rich's statement I'm also against implementing it. Adding support might produce a lot of support queries for an (soon) outdated version of openHAB.

@mueller-ma Hi !
I understand and respect your decision on that.
I wish I knew android development to do the necessary changes and keep it as my fork.
You being the developer of the App, Can you please make a separate branch with the required changes so that I can have that fork. After that you can delete that branch.
I really want to get this feature for myself because I like the current form of OH2 and I don't think I would be upgrading to OH3 in near future.
Would you please help me on this??
I know you must already be very busy. Any help appreciated.

I recommend to use Android Studio. Then create an object for Paper UI in https://github.com/openhab/openhab-android/blob/master/mobile/src/main/java/org/openhab/habdroid/model/WebViewUi.kt and a drawer entry in https://github.com/openhab/openhab-android/blob/master/mobile/src/main/res/menu/left_drawer.xml.
You can copy the entries for HABPanel for that and then adapt it. Then have a look where the id of the OH3 UI from the drawer oh3_ui is used in code, duplicate that code and adapt it for Paper UI.

I'm planing to add Frontail some day and then you can see what's needed to add a new UI.

Thanks a lot. I ll try to follow your pointers and see if I can build it on
my own. As I would not be migrating to OH3, so maybe simply changing the
url of other ui like habpanel or main ui to paperui would be easiest for
me. I'll report back once I setup Android Studio and get the builds going
successful.

On Thu, Dec 17, 2020, 4:37 PM mueller-ma notifications@github.com wrote:

I recommend to use Android Studio. Then create an object for Paper UI in
https://github.com/openhab/openhab-android/blob/master/mobile/src/main/java/org/openhab/habdroid/model/WebViewUi.kt
and a drawer entry in
https://github.com/openhab/openhab-android/blob/master/mobile/src/main/res/menu/left_drawer.xml
.
You can copy the entries for HABPanel for that and then adapt it. Then
have a look where the id of the OH3 UI from the drawer oh3_ui is used in
code, duplicate that code and adapt it for Paper UI.

I'm planing to add Frontail some day and then you can see what's needed to
add a new UI.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/openhab/openhab-android/issues/2332#issuecomment-747372286,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR6CYS3FYQTL47LQATVUVBLSVHQ6HANCNFSM4UW3YUBQ
.

@mueller-ma Hi!
Followed your instructions and also took a look at the commit where oh3ui was added to the app and managed to show paperui in the app.
Is useful but now I can see why it was a bad idea in the first place.
During remote connection, its really hard to add rules in the NGRE as connection timeout happens soon. And yes Rich is right about NGRE being broken.
Hence I'd also be moving to OH3 asap.
Thanks a lot for all your hard work. Keep it up.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mueller-ma picture mueller-ma  Â·  4Comments

magd1978 picture magd1978  Â·  10Comments

ThomDietrich picture ThomDietrich  Â·  6Comments

CrazyIvan359 picture CrazyIvan359  Â·  13Comments

mueller-ma picture mueller-ma  Â·  3Comments