Skip to content

[Feature] Automatic camera switching when multiple IR cameras are available #77

Description

@rampa3

Description

I think it would be useful for Visage to be able to handle automatically switching IR camera used for authentication based on user's preference, if multiple devices are available.

Motivation

Such functionality would be useful for laptop computers docked with lid closed, with standalone IR camera connected to the system.

Proposed solution

I would imagine the implementation being a simple list of devices to prefer if available over the one set as a fallback (would mostly be the laptop's built in one for case of a docked laptop), when Visage gets called for authentication.

Alternatives considered

Using a simple udev rule to make a "virtual camera device", which picks up first found real device and creates symlink for it. This solution was described here, as a solution for Howdy users back in 2020: boltgolt/howdy#345 (comment)

Such implementation does work, but is easy to break if a standalone camera gets plugged in while the system is running. This happens when udev assigns different than expected number on device file for its IR stream. The wrong number in device file name issue could be mitigated by more advanced udev rule, but the symlink solution also breaks application of known hardware quirks by Visage itself, requiring usage of linux-enable-ir-emitter to handle device quirks instead.

Automating service editing and re-launch in similar way to automated editing of Howdy's configuration in boltgolt/howdy#515 (comment) could maybe also be possible, but I did not tested such solution yet.

Additional context

This functionality was previously being requested multiple times by Howdy users:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions