Giter Site home page Giter Site logo

streamdeck's Introduction

streamdeck

Go Report Card Go Reference MIT licensed

streamdeck buttons streamdeck slide show

streamdeck is a library for interfacing with the Elgato/Corsair Stream Deck

This library is written in the programing language Go.

Note

This project is a golang API for the Elgato/Corsair Stream Deck. This library unleashes the power of the StreamDeck. It allows you to completely customize the content of the device, without the need of the OEM's software.

License

streamdeck is published under the permissive MIT license.

Dependencies

There are a few go libraries which are needed at compile time. streamdeck does not have any runtime dependencies.

CGO

Compiling this library requires unfortunately a C compiler since the underlying HID library requires cgo for enumerating the HID devices.

Supported Operating Systems

The library should work on Linux, MacOS and Windows (>=7).

streamdeck works well on SoC boards like the Raspberry / Orange / Banana Pis.

Linux Device rules

On Linux you might have to create an udev rule, to access the streamdeck.

sudo vim /etc/udev/rules.d/99-streamdeck.rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", MODE="0664", GROUP="plugdev"

After saving the udev rule, unplug and plug the streamdeck again into the USB port. For the rule above, your user must be a member of the plugdev group.

Make sure that your streamdeck is correctly recognized by executing:

$ go run examples/enumerate/enumerate.go
Found 1 Elgato Stream Deck(s):
	SerialNumber:        AL12H1A07123

Documentation

The auto generated documentation can be found at godoc.org

Examples

Please checkout the dedicated repository streamdeck-examples for examples.

My personal library of streamdeck elements / buttons can be found in the streamdeck-buttons repository.

Credits

This project would not have been possible without the work of Alex Van Camp. In particular his notes of the StreamDeck's protocol were very helpful. Alex has provided a reference implementation in Javascript / Node.js.

streamdeck's People

Contributors

dh1tw avatar exussum12 avatar jonatino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

streamdeck's Issues

Does not work with new model: 20GAA9902

Does not work with the current model of the 15 key Stream Deck. I have tried changing the ProductID which makes the hardware detectable but none of the examples run. When I try to run them they just hang indefinitely.

udev rules to work without sudo?

I'm trying to get this to work on linux without sudo but it's failing to open the device.

hidapi: failed to open device

I created a /etc/udev/rules.d/51-usb-streamdeck.conf with the following:

SUBSYSTEM=="usb", ATTR{idVendor}=="0fd9", ATTR{idProduct}=="0060", GROUP="plugdev", TAG+="uaccess"

I've added my user to the plugdev group but it still fails to open the device.

Does anyone have a working config?

Some info on HID packets

I started using this library but I made some modifications.

First, I switched to karalabe/hid so I could use: SendFeatureReport() and GetFeatureReport()

Second, the packet to control the brightness is as follows:

0x03, 0x08, perc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
0x69, 0x92, 0x2a, 0xf8, 0x02, 0x00, 0x00,

Where perc is some int between 0 - 100.

My device is a 15 key Streamdeck and the FW is 1.02.005

To get the firmware using GetFeatureReport set the report ID to: 0x05
To get the SN the report ID is: 0x07

This was discovered by running the Elgato stream deck software along side Wireshark and USBpcap on Windows 10.

I have been using the following sources as reference (along with this library):

And these references seem to be for older firmware's, hence my reason for opening this issue which is more of an FYI.

Perhaps if I have time I can submit a PR, however as I only have the 15 key deck I do not know if this applies to the others.

"No stream deck device found" (Windows 10)

When i'm using the lib i always have the following error, even if the stream deck is plugged in :

2021/08/27 13:10:59 no stream deck device found
panic: no stream deck device found

goroutine 1 [running]:
log.Panic(0xc0001bdac8, 0x1, 0x1)
C:/Program Files/Go/src/log/log.go:354 +0xb7
github.com/dh1tw/streamdeck-examples/cmd.icons(0x313d20, 0x819a70, 0x0, 0x0)
C:/Users/schomz/go/src/github.com/dh1tw/streamdeck-examples/cmd/icons.go:32 +0xdc
github.com/spf13/cobra.(*Command).execute(0x313d20, 0x819a70, 0x0, 0x0, 0x313d20, 0x819a70)
C:/Users/schomz/go/src/github.com/spf13/cobra/command.go:860 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x314720, 0xc00003e000, 0x200000003, 0xc00003e000)
C:/Users/schomz/go/src/github.com/spf13/cobra/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
C:/Users/schomz/go/src/github.com/spf13/cobra/command.go:902
github.com/dh1tw/streamdeck-examples/cmd.Execute()
C:/Users/schomz/go/src/github.com/dh1tw/streamdeck-examples/cmd/root.go:22 +0x38
main.main()
C:/Users/schomz/go/src/github.com/dh1tw/streamdeck-examples/main.go:6 +0x27

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.