home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.32k stars 642 forks source link

Prevent access to main application - android comanion app but leverage "externals" #1198

Open sanderlv opened 3 years ago

sanderlv commented 3 years ago

Since every update more and more sensors and functionality are being added to the android Companion app. I am at the point of using the app more and more as a "meter" (sensors). And the ability of very simply using the TTS element as a reporting tool and also the usage of widgets makes me wonder the following.

Since I see the following elements as "externals" from the main application, thus being able to control and meter elements WITHOUT the need to open the mains app, e.g.:

I would like to be able to LOCK/PREVENT the opening of the mains application. Currently this is not possible due to the fact it complains about not having android lock security enable and this is not what I am after at all (to password protect android).

I would like to have a SEPARATE LOCK (password?) option on the app to circumvent it from being opened by the USER of the android device (e.g. kids). In my case my children who have an android device which I would like to be installed with the app but PREVENT them from CONTROLLING everything and thus the need to open the app. But I would like to leverage the use of the "externals":

I was also the "WTH" starter for RBAC in homeasssitant, but that's not there and custom header has been deprecated so that is not an option.

Like other apps able to "password protect" access to the app, I would like the homeassitant companion app to be preventable from opening but be able to use the "externals" of the app:

Describe alternatives you've considered, if any Enabling password protection on android. But this is not an option since that password would also enable opening of the app. And since this is a kids table I do not want any passwords enabled in android.

dshokouhi commented 3 years ago

If the goal is to block access to the frontend on a per account basis maybe HA needs a new user account option to handle this?

sanderlv commented 3 years ago

That is not the goal. Not account basis but on app basis, regardless of the account in homeassistant.

sanderlv commented 3 years ago

Is this something being looked at/has a chance to get in release?

dshokouhi commented 3 years ago

@sanderlv this is an open source project, you need to have more patience. Your request is also barely 1 month old. Given the issue was not closed you should just wait until someone has time to work on it. Open source projects involves volunteer so we work on what we want and when we want. You are more than welcome to take this on if you want.

sanderlv commented 3 years ago

Just asking... No is also an answer :-). Following the conference and as a paid nabu casa user I thought I might be able to ask for 1 feature 1 time?

stale[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

dshokouhi commented 3 years ago

So about this request, we need to launch the app to something. Would launching to settings be good here? Adding in separate password protection is going to take more work as we would need to do password encryption and storing etc... Is the goal to stop access completely or would removing the ability to open to the dashboard suffice? They would still be able to modify settings including getting to the home page but thats going to be an explicit action.

jandeschuttere commented 3 years ago

Adding the reference to redacted for clarity: issue 1055 but as described below, incorrectly for those like me that search via keyword "biometric". I've got exactly the same question as the referred issue, happy to see that it's being (considered to be) taken up!

dshokouhi commented 3 years ago

Adding the reference to #1055 for those like me that search via keyword "biometric". I've got exactly the same question as the referred issue, happy to see that it's being (considered to be) taken up!

1055 was for biometric use on the widgets, this issue is about disabling access to the webview activity and having a locking mechanism separate from the biometrics on the device. So they are not the same request. The other issue was closed due to no responses.

jandeschuttere commented 3 years ago

Apologies, I digested this issue incorrectly as a way to add a separate access layer for widgets which could be protected as well. I'll create a new issue I suppose with the same question.

rcdailey commented 1 year ago

Would it make sense to distribute the "sensor" functionality of the companion app as a separate APK? Basically an app with no/minimal interface that implements the monitoring functionality. Users of course still always have the original companion app as an option. However, this new app would handle the use case I'm specifically interested in, which is being able to pull information from my son's android phone without him getting access to the actual HASS dashboard and other functionality.

dshokouhi commented 1 year ago

Would it make sense to distribute the \"sensor\" functionality of the companion app as a separate APK?

This request is for the official app and not any other app. Maybe try tasker if you don't want the official app.

rcdailey commented 1 year ago

I didn't say I don't want the official app. I'm just sharing a thought. I don't see how Tasker addresses the issue.

dshokouhi commented 1 year ago

Found a good library that seems to allow us to do what we need

https://github.com/raheemadamboev/pin-lock-compose

bratanon commented 10 months ago

Any progress with the pin-lock-lib?

I also have the requirement of being able to lock my kids out of the app and just use the location tracker.