OpenMacroBoard / StreamDeckSharp

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

Switch profiles on Streamdeck #40

Closed Grimtron closed 2 years ago

Grimtron commented 3 years ago

Perhaps I am missing a method or perhaps it is not possible with the Streamdeck API, but is there a function to switch to an existing PROFILE after the device has been opened, i.e. something like this?

var device = StreamDeck.OpenDevice(someDevice.DevicePath); device.SwitchProfile("MyProfile");

?

wischi-chr commented 3 years ago

Hi @Grimtron

This library is a very low level wrapper around the stream deck as a HID (human interface device). So if you want to directly interact with the stream deck you can use this library for example to play full screen videos on the stream deck.

At this level the stream deck (the hardware and the HID driver itself) don't have a concept of profiles. For that reason you can't use this library to switch profiles. You could theoretically (but that probably would take quite some time) write your own "StreamDeckApp" with this library and implement profiles (I don't recommend that, but it's certainly possible).

I'm not sure (because I've not used it myself) but you can probably do that with the official SDK from Elgato (keep in mind that this project doesn't use the official SDK).

The official SDK uses web requests for its plugin architecture. You can find more details here: https://developer.elgato.com/documentation/stream-deck/sdk/overview/

There is also a .net library by @BarRaider (https://github.com/BarRaider/streamdeck-tools) that wraps the official SDK so you should probably check that out too. Maybe they know if it's possible to switch profiles with the official SDK.