Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
elgato-streamdeck
Library for interacting with Elgato Stream Decks through hidapi. Heavily based on python-elgato-streamdeck and partially on streamdeck library for rust.
This library was made as a better designed alternative to streamdeck library for Rust. I just took code from both of the libraries and made it more so pleasant to use.
udev rules for Linux
If you're using systemd on your system, you might have to install udev rules to allow connecting to Stream Decks from userspace.
You can do that by using following command to copy included into repo 40-streamdeck.rules
file into udev/rules.d/
cp 40-streamdeck.rules /etc/udev/rules.d/
And then reloading udev rules
sudo udevadm control --reload-rules
Unplugging and plugging back in the device should also help
You should also create group called "plugdev" and add yourself to it, so you get access to the devices. You also need to restart the user session to let user group changes to kick in
Example
// Create instance of HidApi
let hid = new_hidapi;
// List devices and unsafely take first one
let = list_devices.remove;
// Connect to the device
let mut device = connect
.expect;
// Print out some info from the device
println!;
// Set device brightness
device.set_brightness.unwrap;
// Use image-rs to load an image
let image = open.unwrap;
// Write it to the device
device.set_button_image.unwrap;
// Flush
if device.updated
Status
- Convenient to use API for looking up devices, connecting to them and interacting with them
- Reading buttons with async
Supported Devices
Support of the devices is the same as from libraries above, I personally tested Original v2 and Plus. I'll just keep updating this library to match upstream libraries.
But as it stands, this library should support following devices:
- Stream Deck Original
- Stream Deck Original V2
- Stream Deck XL
- Stream Deck XL V2
- Stream Deck Mini
- Stream Deck Mini Mk2
- Stream Deck Mk2
- Stream Deck Pedal
- Stream Deck Plus (thanks to node-elgato-stream-deck)
- Stream Deck Neo (thanks to @ejiektpobehuk, @AkechiShiro and node-elgato-stream-deck)
- Ajazz AKP153 (thanks to @ZCube)