-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stream Deck XL only shows black empty keys. #25
Comments
I can confirm this behavior on multiple systems running Ubuntu and Arch, I couldn't get this library to work in any way sadly. |
Thanks for the very detailed report @BS-Tek! Strangely some users report that the 0.5.1 works on the XL (see #20) while you and @xorbital report that it doesn't work at all. I suspect that this comes down to the HIDAPI library backend I was using - it has the benefits of very easy installation across the three major platforms, but comes with the downside of being old, unmaintaned and apparently contains quite a few bugs and compatibility issues. I've just merged in my patch in aff0c2b that adds a new HID library backend. This one requires manual installation of a library DLL on Windows but is much more up to date -- can you please try it and report back if it fixes the issue for you please? Note that HID and HIDAPI libraries conflict with oneanother, so you'll have to remove one before installing the other. |
I've seen your patch and merged it locally a few days ago, that didn't do it either sadly. I've tried again, pulling the repo now and running
Running Manjaro with package hidapi and libusb installed, I removed the python hidapi package and installed hid |
After cloning version 0.6.0 I uninstalled HIDAPI and installed HID.
Running
On subsequent runs, the XL is detected and the following error is returned after a pause of about 5 seconds, it never returns from
It is necessary to unplug the XL to have the device opened again. Connecting the Stream Deck Original and running
Running
Running
Running
|
Ok, I've done a bit more digging tonight. Unfortunately all I have set up currently is an Ubuntu Bionic VM, which isn't a perfect way to test, but I'm time constrained today. I've recently decommissioned some RPi2 units and I have an old laptop I'll set up soon to do native testing again. I found and fixed a few bugs in the HID backend in 0a24f77 which was causing it to fail inside the VM -- the HID transport was double-opening device handles, which was upsetting the HID library backend. @BS-Tek / @xorbital could you please re-test this latest revision? If I knew Python HID was such a tire fire I wouldn't have been so eager to build this. Looking through the library code of both HIDAPI and HID makes me quite a bit concerned around proper cleanup of native resources, not to mention the possibility of various memory corruptions and leaks. |
Thanks for your work :)
The Stream Deck turns black (keys are illuminated) for approx. 5 seconds, then:
|
Dangit. Does |
Sadly nothing, only that I plugged in and removed the device. :< |
I pulled the last changes and when running
When I run
When I connect the Stream deck XL
On disconnect If I connect the Stream Deck Original
When I run
When I disconnect the Stream Deck Original I am a little curious about the last line returned by |
Too damned hot today to spin up any more machines in the house. Leaving some note here for when I get back to this.
Digging into the HID library code: It looks like the That means that Current Linux I might have to make a C/C++ test app for either of you to try to call the |
The weird thing is that the udev rules are set and the node.js library works without root permissions... |
Try #27 (comment) - testing on my local machine, I get an identical error when trying to use the StreamDecks with the HID backend, but only when the |
Sorry I was unable to respond yesterday. I have tested again on a clean and fully updated image of I ran the following commands:
My
The Classic is now working again but the XL is back to black keys and the 5 second timeout after the key image should have been updated. The key presses from the XL are reported correctly after the initial startup where all 32 buttons with delay has be updated. No errors is shown anymore and I have also tried this on my Ubuntu 18.04.1 LTS in VMWare Fusion 10 virtual machine with the same results. |
Was there a determination on what the root issue was for the XL? Is there anything else needed to help troubleshoot? Thanks. |
Sorry, I got side-tracked by the HID backend issue which I wasn't able to resolve fully, and forgot about this. So, the current library revision blacklists the For now, the blacklist at least ensures that on Linux everyone is using libusb as a backend, which theoretically should work well for all the variants. I'm late to the party discovering this, as it looks like all the Node guys figured that out ages ago. Doh. So, with that patched we should have the Original and Mini variants working, leaving the XL. I have two theories on what's happening:
One of those two has to work, as I've just disassembled the real software's write function and confirmed my algorithm is functionally identical. We've sorted out the backend issues enough that I know what's being used for sure, and that works for other projects. |
I tried both individually and then together and doesn't seem to have any effect on the original error message. It opens the XL and I can set the brightness, but it errors out as soon the update_key_image command is run. I am getting the same errors as reported in #27 |
Well, I'm baffled - if the other functions work then basic comms are working, and the write code is functionally identical both to the real app and the other third party libraries I compared against. If you really have:
then I must be missing something that's no doubt obvious in hindsight. I did notice that Debian is shipping an ancient version of hidapi-libusb0 but I grepped through the changes over the last few years and I don't see anything relevant in the libUSB backend. The NodeJS guys are building and shipping a newer version of the library with their In lieu of spending $350 to buy one of these just for testing, I'm still going to have to rely on some more tests - sorry! Would you mind trying trying a couple of quick tests:
The funny part about all this is that I actually know quite a lot about USB and HID - I'm just hamstrung by the absolute cluster-*&^% that is the abstraction libraries over the actual packets on the bus. I'm really surprised this is the current state of the art, given how simple the protocol is. |
I forgot the damned report padding on the XL (e487aff). |
This fixed the problem! I did discover another issue now, which is the close command does not seem to work correctly. On the original and mini when I call the deck.reset() and deck.close() when my program exits it goes back to the stream deck logo. The XL doesn't seem to do anything. I don't see any error messages thrown, but it also doesn't seem to be releasing cleanly. Thanks again for all your work on this. |
Awesome! Can't believe I missed the padding for so long - I already had it for the other models and somehow complete skipped over it for the XL. I've fixed the reset command in 906ee5d - I typo'd one of the command bytes. |
I am having the same issue here. Plus i cannot end the application. When run from the terminal and quit it stays there, even ctrl+x does not work, i have to use killall streamdeck in another terminal. Ideas? Edit: after reading the installation guide again i uninstalled hidapi and installed hid, now my streamdeck does not start anymore, i am getting: StreamDeck.DeviceManager.ProbeError: ('Probe failed to find any functional HID backend.', {'hid': OSError('The libhidapi-hidraw0 backend is currently blacklisted for StreamDeck devices.'), 'hidapi': TypeError("enumerate() got an unexpected keyword argument 'vendor_id'")}) where can i unblacklist this? Fixed! |
Hi, First of all thank you for a very useful library.
I have cloned version 0.5.1 from the github repository and have without any problems been using it with a Stream Deck Original on a Raspberry PI CM3+ module. The baseboard for the CM3+ is my own design. (USB 2.0)
I have now bought a Stream Deck XL and it is not working correctly. I have tested this on the CM3+ (USB2.0 Capable of delivering 1 ampere to the USB port), a Raspberry Pi 4 (USB3.0) and Ubuntu in VMware Fusion and the result is the same.
When I connect the Stream Deck XL I can control the backlight and read key states but calling
update_key_image(deck, key, False)
inexample_basic.py
causes a delay for about 3 seconds and the key stays black before trying to update the the next key.Investigating a little further it looks like
def set_key_image(self, key, image):
inStreamDeckXL.py
callsself.device.write(payload)
three times to transmit all data and the functiondef write(self, payload):
inHIDAPI.py
returns -1 and not the transferred byte count.When Disconnecting the XL and reconnecting the Stream Deck Original to the Raspberry Pi 4,
example_basic.py
works as expected.I have tested the NodeJS library mentioned in another post (https://github.com/bitfocus/elgato-stream-deck-clean-xl/blob/master/index.js) and it does change the key colours.
The Raspberry Pi 4 is running a fresh install of 2019-09-26-raspbian-buster.
Below are the version information of the system.
Any help is greatly appreciated.
Best regards,
Brian.
The text was updated successfully, but these errors were encountered: