Openhab for "kids" or "guests"

I would like to grant access to my kids/guests on a simplified sitemap, e.g. “guest.sitemap”.
As they using android app only, no special user access via browser is needed.

Is there an easy way to do this within the android app?

no passwords, etc. needed. Just a simple access to the “guest.sitemap” from the app. (without being able to see other sitemaps)

ps: 4.0.1

This depends on how “secure” you want this to be.

The android app has a setting (under the server part of the settings menu) that allows you to choose what you want the default sitemap to be. In that app that will be the sitemap that appears when the app first opens.

This option, however, does not in anyway prevent the user from opening up menus and finding other sitemaps if they are determined to do so.

As there is no real access control in OH at the moment, that is the best you can do with one instance of OH running.

If you want to prevent your users from accessing anything else, then all you can do is run a second instance of OH, connect the relevant items between the two using something like the remote openHAB binding and have the app connect to that second reduced OH instance to display only that single sitemap (I did something like this for a little while when my son wanted to be able to experiment with some blockly rules for his room and I didn’t want him bricking the rest of the house).

2 Likes

thank you for quick reply.
I will try the first solution and advice my kids not to open any other menu.

I would just not tell them
In the absence of an actual method to authorize access, just say nothing.

Otherwise kids and guests will feel compelled to explore what is forbidden.

1 Like

In the MainUI there is a setting in the “Pages”, named visible to.

In the below example I have set a settings page visible to admins. So if you are not logged in the openhab app, you don’t see the page in your menu

config:
  label: Подесувања
  layoutType: responsive
  order: "20"
  sidebar: true
  visibleTo:
  - role:administrator
1 Like

That applies to MainUI pages only. To my knowledge, sitemaps still do not have this feature.

I wondered if one put the private ones in a folder under sitemaps if it would be possible to specify that directory that would not show to people who did not know to specifically name it. But sadly I do not see how to do that if it’s even possible.

1 Like

I know there are people who have achieved similar setups by using nginx as an access control mechanism, see e.g here if this solution would work for you.

1 Like

I’m wondering if we could have an additional parameter for the sitemap for a “pin” or password and the user must enter it before being allowed to open it.

@lolodomo wdyt

1 Like

Why you don’t use the browser? Make a direct link to the URL of the sitemap?

On my Samung Device I can install a “Soft-Application” using this button.
So you will have a App-Icon on the phone thats leading you directly to the openhab sitemap.
From there it is no way to “break out”.

2 Likes

thanks, I´ll try this.

This exactly what I did with a sitemap to give access to a few actions, like opening the gate.
OH is behind Nginx configured with Vouch proxy to provide Oauth2 and protect my publicly exposed OH instance.