Skip to content
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

get_firmware_version() call leads to streamdeck XL ignoring top 3 row presses #38

Open
humbled opened this issue Feb 28, 2020 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed more-info-needed Insufficient information to diagnose

Comments

@humbled
Copy link

humbled commented Feb 28, 2020

Strange behaviour encountered today where the top 3 rows of an XL get ignored until reset() or similar

Here's a tiny working illustration. Pressing key(0) makes the call and the top 3 rows stop working then. Pressing key(31) runs reset() then all kets work again.

import threading
from StreamDeck.DeviceManager import DeviceManager

def _cbKeyPressed(deck, key, state):
    print("Got a press on {}".format(key))
    if state:
        return
    if key == 0:
        print("Running get_firmware_version()!")
        deck.get_firmware_version()
    elif key == 31:
        print("restoring")
        deck.reset()
        
def setup(deck):
    deck.open()
    deck.reset()
    deck.set_key_callback(_cbKeyPressed)

deck = DeviceManager().enumerate()[0]
setup(deck)

for t in threading.enumerate():
    if t is threading.currentThread():
        continue
    
    if t.is_alive():
            t.join()

streamdeck 0.6.3
hidapi 0.9.0.post2
Mac OS 10.15.2 (Catalina)

Seen same on Linux with hid (referenced in #29)

@abcminiuser abcminiuser added the bug Something isn't working label Mar 29, 2020
@abcminiuser
Copy link
Owner

Could you please try the latest 0.7.3 release? It has a new HID backend I wrote that directly binds to the system installed hidapi, which might resolve the issue.

If you don't want to upgrade for some reason, there's also a newer release of the HIDAPI python library that your 0.6.3 version uses, which could also help.

@abcminiuser
Copy link
Owner

Give the latest 0.8.1 a go please and report back - the back end is substantially different to the version mentioned in this report, and the underlying issue might now be solved.

@abcminiuser abcminiuser added help wanted Extra attention is needed more-info-needed Insufficient information to diagnose labels Jun 15, 2020
@abcminiuser
Copy link
Owner

Closing due to an extended period of inactivity - please re-open if you can reproduce this on the latest version of the library.

@twidi
Copy link

twidi commented May 2, 2021

@abcminiuser just got the same problem with a XL and version 0.8.4 of your (awesome, thanks for it, btw) lib: only the last row is working. Adding a deck.reset() after reading the firmware version solved it (I was going crazy until I found this issue)

@abcminiuser abcminiuser reopened this Jun 19, 2021
@abcminiuser
Copy link
Owner

Well, that's frustrating. I don't have an XL model around to test with, but I've checked over the original application multiple times, and it definitely reads out a 32-byte feature report (report ID 5) from the XL device. If that's causing issues it'll either be device firmware related, or something not quite right in the libhidapi-libusb backend.

If anyone else has a StreamDeck XL, can you please try this on Mac or Windows and report if the same issue is observed there?

@impala454
Copy link

impala454 commented May 20, 2022

Old thread I know, but I can confirm this on Ubuntu 20.04 and Stream Deck XL. If I do any of the deck.get_* function calls, the top three rows quit working. If I remove any and all of those calls from my code and just do deck.open(), deck.reset(), and deck.set_key_callback() and never make any of the get_* calls, it works fine. With the calls in there, it works fine on a Stream Deck Mini.

edit: Also my libhidapi-libusb0 version is 0.9.0+dfsg-1 if that helps. I also am actively working on this so can easily test fixes.

@aaronr8684
Copy link

@abcminiuser I'm available to test/troubleshoot on Windows or Rasberry Pi OS (and Ubuntu VM if that works to test). I have a XL and know python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed more-info-needed Insufficient information to diagnose
Projects
None yet
Development

No branches or pull requests

5 participants