Skip to content

Commit

Permalink
#1301 Add basic Stream Deck docs
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Nov 4, 2024
1 parent ea1fb44 commit 93c5d58
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/helgobox/modules/ROOT/pages/installation.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ sudo apt-get install -y libxdo-dev
sudo zypper install xdotool
----

IMPORTANT: If you want to use ReaLearn with the Stream Deck on Linux, xref:realearn::sources/stream-deck.adoc#linux[more setup] is necessary.

== Installing Helgobox

Please choose:
Expand Down
1 change: 1 addition & 0 deletions doc/realearn/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
*** xref:sources/midi/display.adoc[]
*** xref:sources/midi/specific-program-change.adoc[]
** xref:sources/osc.adoc[]
** xref:sources/stream-deck.adoc[]
** xref:sources/keyboard.adoc[]
** xref:sources/reaper.adoc[]
*** xref:sources/reaper/midi-device-changes.adoc[]
Expand Down
67 changes: 67 additions & 0 deletions doc/realearn/modules/ROOT/pages/sources/stream-deck.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
= Source "Stream Deck"

With this source, you can leverage your Stream Deck with ReaLearn, for example the link:https://www.elgato.com/en/en/p/stream-deck-mk2-black[Elgato Stream Deck MK.2]. This includes reacting to buttons and sending xref:key-concepts.adoc#feedback[] to the button displays.

== Supported devices

The following StreamDeck devices are currently supported:

* Original
* Original v2
* Mini
* Revised Mini
* XL
* MK.2

[[linux]]
== Enabling Stream Deck support on Linux

If you use Stream Deck on Linux, you also need to explicitly allow normal users access to the device, otherwise ReaLearn won't be able to connect to it.

=== 1. Find the Vendor and Product ID

Plug in the Stream Deck and identify its vendor and product IDs:

[source,bash]
----
lsusb
----

Look for a line similar to:

`Bus 001 Device 002: ID 0fd9:006d Elgato Systems GmbH`

In this example, `0fd9` is the vendor ID, and `006d` is the product ID (these may vary).

=== 2. Create a udev Rule

Create a new udev rule file in `/etc/udev/rules.d/`:

[source,bash]
----
sudo nano /etc/udev/rules.d/99-streamdeck.rules
----

Add the following rule, replacing `0fd9` and `006d` with the correct vendor and product IDs if necessary:

[source]
----
SUBSYSTEM=="usb", ATTR{idVendor}=="0fd9", ATTR{idProduct}=="006d", MODE="0660", GROUP="plugdev"
KERNEL=="hidraw*", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", MODE="0660", GROUP="plugdev"
----

This rule sets permissions to `0660`, allowing the device owner and users in the `plugdev` group access to the device with the specified vendor and product IDs.

=== 3. Reload udev Rules

Reload the udev rules to apply changes:

[source,bash]
----
sudo udevadm control --reload-rules
----

=== 4. Unplug and Replug the Device

Unplug the Stream Deck and plug it back in to apply the new rule.
Alternatively, you can execute `sudo udevadm trigger`.
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,28 @@ Can deal with bundles:::: By default, ReaLearn aggregates multiple OSC messages
Some devices (e.g. from Behringer) can't deal with OSC bundles.
Untick the checkbox in this case and ReaLearn will send single OSC messages.

Stream Deck: <None>::
Disables Stream Deck control.

Stream Deck: _Some device_::
When selected, this ReaLearn instance will _additionally_ listen to button presses of the chosen Stream Deck device. See xref:sources/stream-deck.adoc[] for details.
+
Unlike MIDI or OSC, choosing a Stream Deck device automatically enables feedback to the Stream Deck buttons, so you won't find a Stream Deck entry in the <<output>>.

_Unavailable Stream Deck devices_::
This submenu contains supported Stream Deck devices that are currently not connected.

[[computer-keyboard]] Computer keyboard::
This is a checkbox.
If enabled, this ReaLearn instance will additionally listen to key press and release events.

If enabled, this ReaLearn instance will _additionally_ listen to key press and release events.

[#output]
== Output menu

Here you can choose to which xref:key-concepts.adoc#output-port[] ReaLearn should send MIDI/OSC xref:key-concepts.adoc#feedback[].

<None>::
This means, no feedback will be sent at all.
This means, ReaLearn won't send any feedback to MIDI or OSC devices.
This is the default.

[[fx-output]] MIDI: <FX output>::
Expand Down
2 changes: 1 addition & 1 deletion main/src/domain/stream_deck_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ELGATO_VENDOR_ID: u16 = 0x0fd9;

const SUPPORTED_DEVICES: &[StreamDeckDevice] = &[
StreamDeckDevice::new(ELGATO_VENDOR_ID, pids::ORIGINAL, "Original"),
StreamDeckDevice::new(ELGATO_VENDOR_ID, pids::ORIGINAL_V2, "Original V2"),
StreamDeckDevice::new(ELGATO_VENDOR_ID, pids::ORIGINAL_V2, "Original v2"),
StreamDeckDevice::new(ELGATO_VENDOR_ID, pids::MINI, "Mini"),
StreamDeckDevice::new(ELGATO_VENDOR_ID, pids::XL, "XL"),
StreamDeckDevice::new(ELGATO_VENDOR_ID, pids::MK2, "MK2"),
Expand Down

0 comments on commit 93c5d58

Please sign in to comment.