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)
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).
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.
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.
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.
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”.
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.