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

Connect via device path #24

Open
glance- opened this issue May 2, 2023 · 1 comment
Open

Connect via device path #24

glance- opened this issue May 2, 2023 · 1 comment

Comments

@glance-
Copy link

glance- commented May 2, 2023

To support multiple simultaneously connected streamdeck devices, I'd like to use udev rules which starts a per device application which uses this library.

Currently we instantiate the systemd service per pid, but I'd like to switch that over to per device instances. This way we can use systemd.resource-control to allow that process just a certain access profile.

To simplify this I'd love to see a StreamDeck connect_with_device method, which either takes a HidDevice or perferably just a path to the usb device, and then just checks which kind of streamdeck this is based on the pid it sees from the HidDevice.

We could do this dance in the application but I'd love to see this feature in the library.

@ryankurte
Copy link
Owner

howdy, there's already an API for connecting to a specific device by passing the vid/pid/serial, but it would be nice to have a similar approach using HidApi::open_path / would be happy to accept a PR!

(as an aside, you might like to consider a single/long running daemon with support for multiple devices and unix socket RPC calls you can invoke on udev events to prompt a connection, easier to scan and connect devices at application start and you're going to have to associate profiles and devices anyway. i haven't sorted out the scanning here yet, but, something like this)

AleksanderZdunek added a commit to AleksanderZdunek/rust-streamdeck that referenced this issue May 26, 2023
It basically works.

For upstream issue ryankurte#24.
AleksanderZdunek added a commit to AleksanderZdunek/rust-streamdeck that referenced this issue May 17, 2024
It basically works.

For upstream issue ryankurte#24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants