GithubHelp home page GithubHelp logo

amenophis / elgato-streamdeck Goto Github PK

View Code? Open in Web Editor NEW

This project forked from streamduck-org/elgato-streamdeck

0.0 1.0 0.0 84 KB

Library for interacting with Elgato Stream Decks

License: Mozilla Public License 2.0

Rust 100.00%

elgato-streamdeck's Introduction

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.

Example

// Create instance of HidApi
let hid = new_hidapi();

// List devices and unsafely take first one
let (kind, serial) = StreamDeck::list_devices(&hid).remove(0);

// Connect to the device
let mut device = StreamDeck::connect(&hid, kind, &serial)
    .expect("Failed to connect");

// Print out some info from the device
println!(
    "Connected to '{}' with version '{}'",
    device.serial_number().unwrap(),
    device.firmware_version().unwrap()
);

// Set device brightness
device.set_brightness(35).unwrap();

// Use image-rs to load an image
let image = open("no-place-like-localhost.jpg").unwrap();

// Write it to the device
device.set_button_image(7, image).unwrap();

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 only personally tested Original v2. 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

elgato-streamdeck's People

Contributors

thejebforge avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.