Make clients uniquely identifiable in a stable way
Have a question or an idea? Please search it on our forum to make sure it was not yet asked. If you cannot find what you had in mind, please submit it here.
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- [x] I am running the latest version
- [x] I checked the documentation and found no answer
- [x] I checked to make sure that this issue has not already been filed
Problem Description
When interfacing with the AdGuard Home API, you can actually automate a lot of things, which is great! However, there is currently no way to identify a client uniquely in a stable fashion.
Instead, at this point, the API (and thus also AdGuard itself) it uses the client name to identify the client. However, that identifier is subjective to changes (as a name can change).
While not directly a problem when looking from the AdGuard Home web interface (well, it could be, if 2 web client sessions are active, when one renames a client while another tries to delete it), it does become a problem for external applications trying to track or monitor those clients.
For example, if we would automate this using Home Assistant, renaming a client makes Home Assistant loose track of a client (as it cannot know it was renamed). From an external perspective, the client was removed and a new one added.
Proposed Solution
I want to propose to decouple identification of a client within AdGuard Home from user input. For example, by adding a UUID to each client that sticks with it for its lifetime and cannot be changed by updating the client to ensure its stability.
This will allow to track clients, regardless of its name, IDs, or anything else; throughout its lifetime.
Alternatives Considered
I really do not see an alternative for external consumers of the API. There is no stable identifier present 🤷
Additional Information
Being able to identify a client in a stable way, would unlock a major upgrade for the Home Assistant platform and integration. Allow our user base to automate capabilities of clients.
For example: automate to block access to social networks for the devices of the kids during homework hours. Or limit the time they are allowed to access certain services.
Even one step further, is that we could create automation based on client accessing certain domains or services (e.g., make alerts for it, or limit time usage).