OpenMacroBoard / StreamDeckSharp

A simple .NET wrapper for Stream Deck
MIT License
356 stars 47 forks source link

API to get all HID devices/Property to get HID device name #6

Closed SaviorXTanren closed 6 years ago

SaviorXTanren commented 6 years ago

Hey, thanks for the great work on this library! Would love to suggest to features:

  1. An API like StreamDeck.GetAllDevices() that would return make a list of all Stream Deck devices with their device path.

  2. A property on IStreamDeck to get the device path for it.

This would help to give a lot of flexibility to discovering, connecting, and reconnecting stream deck devices. Thanks!

wischi-chr commented 6 years ago

Thanks for your feedback and ideas.

I added StreamDeck.EnumerateDevices() (02b85c5 - already on nuget as version 0.1.10) which allows you to get all StreamDeck devices (without opening them of course 😄). The new DeviceInfo class allows you to open the device (as IStreamDeck) and has a property .DevicePath

At top 2: I'm still not sure if I should add the device path to IStreamDeck because I want to keep it as simple as possible and there may be implementations in the future of a virtual stream deck (emulator to develop software for stream deck without the actual hardware) that may not have a device path.

Please let me know what you think. Thanks!

SaviorXTanren commented 6 years ago

Thanks for #1 and for #2, the reason why it would be nice to know the device path is to ensure you always connect to the same one. For the people that have 2 stream decks, they specifically want you to connect to the one they want. However, if there's a way to find all the devices, that works just as well.

As far as virtual stream deck is concerned, there is one implementation I've seen that is purely virtual for desktop; but there is also another one that myself and a friend have been working on. It's a smart phone based solution that directly interfaces with the stream bot that we write. Doesn't follow the same paradigm as the stream deck, but is conceptually the same thing.