Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Multiple PIN codes #67

Open
kalhimeo opened this issue Dec 5, 2021 · 6 comments
Open

[FR] Multiple PIN codes #67

kalhimeo opened this issue Dec 5, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@kalhimeo
Copy link

kalhimeo commented Dec 5, 2021

Is your feature request related to a problem? Please describe.
Not related to a problem, just that at the moment we can only specify one unique pin code per card

Describe the solution you'd like
Change the code section to make it a list of strings instead of just a string

Describe alternatives you've considered
N.A.

Additional context
When multiple users are using the wall tablet, it's nice that that everyone can have his own PIN code (ie. to disable the alarm system).

Thank you very much for considering the feature request :-)

@Fusseldieb
Copy link

Fusseldieb commented Nov 8, 2023

A workaround is to create conditional entities based on the logged user.

Let's say you have three users. Create a card with three alarm entities (the same one three times). Then, using the YAML code editor, conditionally show only the one for the logged user. Do that for all three. Done that, I think you can just assign a pin to each one and done.
As a "bonus" you'll see that just the right pin for the right user works, as with an array all codes would be valid for all users (which increases the "risk*").

* Protecting something in the frontend isn't really a protection anyways. Someone with a little experience with JS can click right through, regardless of which pin you set.

@ildar170975 ildar170975 added the enhancement New feature or request label Jan 16, 2024
@kitty99hub
Copy link

kitty99hub commented Aug 24, 2024

Hi,
@Fusseldieb
However, this workaround does not necessarily lead to the desired solution!
If, for example, you want to record which person has entered a code on a wall tablet that accesses HA with a separate device login, this is not possible, because in this case, the individual people do not log in to the tablet with their personal login...
The workaround only works with personal devices such as a cell phone, but not on a wall tablet that is permanently logged in with the separate device login.
The desired multi-pin solution would be very helpful here.
I am also looking for a solution on how I can best integrate my Aqara U200 door lock into HA, but for various reasons I have not yet found the right one.
Multiple personal PINs would be great here :)
kind regards

@ildar170975
Copy link
Collaborator

ildar170975 commented Jan 31, 2025

@kalhimeo, some facts:

  1. Currently there is ONE pincode - and it is specified globally.
  2. The pincode is "hard-coded" - means "fixed in a card's code", i.e. a user can change it only by changing a yaml code (either inside an UI editor for a storage-mode dashboard OR directly in a yaml file for a yaml-mode dashboard).
  3. (for storage-mode dashboard) Changing a card's code in UI editor is not supposed to be done by ANY user - only an admin is supposed to do it (whether it is supported by UI role model or not - is another issue).
  4. (for yaml-mode dashboard) ANY user can change yaml files if they have an access & corresponding access rights; how to manage the access - is another issue.
  5. If there are several restriction-cards in UI - they are supposed to have same pincode. For storage-mode dashboard it is achieved by simple "copy/paste" - then maintaining same pincode becomes more difficult if you need to change it globally; using a decluttering card helps to keep a pincode in 1 place. For yaml-mode dashboard it is achieved either by yaml-anchor / !include / !secret or decluttering-card.

Assume we need to add multiple pincodes.
There are 2 ways:

  1. Pincodes are common for all users - i.e. both John & Jane can use "12345" or "00000".
  2. Pincodes are per-user - i.e. John can use "12345" but cannot use "00000" (which can only be used by Jane).

Since we do not have UI editor for restriction-card - for both ways we should:

  1. Either provide a list of allowed pincodes:
code: 
  - 12345
  - 00000
  1. Or provide a more complex structure:
code: 
  - user: aaaa1234567890
    code: 12345
  - user: 1234567890aaaa
    code: 00000

where an admin should specify valid user ids.

@kalhimeo
Copy link
Author

kalhimeo commented Feb 1, 2025

Thank you for coming back on this after all this time 👍

In my request i was thinking about option 1) , different codes not linked to a specific user (ie: in case of a wall tablet the logged in user doesn't change)

@ildar170975
Copy link
Collaborator

ildar170975 commented Feb 2, 2025

So, you are requesting a simple list of codes?
I.e. any user can use any code out of the list?
Could you describe a possible use-case?
The only thought I have is "John like 1234, Jane - 7777, and grandpa can use 0000 for simplicity".

@ildar170975 ildar170975 changed the title Multiple PIN codes [FR] Multiple PIN codes Feb 2, 2025
@kalhimeo
Copy link
Author

kalhimeo commented Feb 2, 2025

Yes that s exactly the use case, each family member uses his own code for convenience. Example: a button to disarm the alarm, protected by pin code. You could also create a new pin code for an external worker without sharing your own private code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants
@Fusseldieb @kalhimeo @ildar170975 @kitty99hub and others