foxxyz / loupedeck

Node.js API for Loupedeck Controllers
MIT License
87 stars 10 forks source link

Razer Stream Controller #25

Closed linkshadowelf closed 1 year ago

linkshadowelf commented 1 year ago

Is this project designed to work with the Razer Stream Controller? Or is the stream controller just different enough from a regular LoupeDeck Live that it will kind of work as is?

In minimal testing, I was able to manually connect to it (the auto discover wasn't able to find it) forcing the Loupedeck Live class. Using a slightly modified version of the simple example, it was able to read the touch screen, trigger the vibration, and work with the knobs. The buttons were able to change color once, but I have yet to figure out why they are not changing. touch.key is also undefined.

Additionally, I attempted the slide example, but the touchscreen's appearance did not change outside of the default appearance (a set of rotated semicircles).

Finally, when the app is closed, it takes about 30 seconds or more for the stream controller to be released/disconnected from the application despite running loupedeck.close().

All testing was done on PopOS 22.04 LTS (Debian based). Thank you!

foxxyz commented 1 year ago

Oooh, this is cool. I did not know Razer partnered with Loupedeck to do a rebranded version of the Live...

I definitely did not test compatibility for it, but it sounds that from your testing that there is some. Thank you for doing that!

I would love to add real compatibility if I can get my hands on a physical device. I'd expect the changes to be pretty minor, but from your comments it seems like they are using a different coordinate system and perhaps different command bytes for writing to the screen and button colors.

Thanks for putting this on my radar, and let me know if there's a way you can get me a physical device!

linkshadowelf commented 1 year ago

While I can't get you the physical device (yet), I may be able to assist from the one I have. If there's any test scripts or code I can edit to test the device, let me know. I'm still relatively new to node, but willing to learn. (Most of my experience has been with Foundry VTT in an attempt to make a few custom systems for it).

latenitefilms commented 1 year ago

You can use this Lua code as a reference - the changes are pretty minor, as it looks like maybe newer Loupedeck firmware is all using the same technique as the newer Razer devices. I'm still exploring this.

https://github.com/CommandPost/CommandPost/blob/develop/src/extensions/hs/loupedeck/init.lua

Julusian commented 1 year ago

Yeah as far as I'm aware there is very little difference between them. In my code I am handling them identically. But the main difference to what you have now is that the screens must all be addressed as one large 0x4d. In my testing, this also works for the live with the 0.2.5(?) firmware, so I adopted this approach for these too to keep it simpler.

There is also the razer stream controller x. This is again a subset of existing functionality, the button presses are the same as the circle buttons on other models, and it has a single lcd segment

asdf23 commented 1 year ago

Razer locks their keyboard down where you cannot use it without logging in.

Anything associated with company is spyware garbage

On Sat, Jun 3, 2023, 12:09 PM Link Shadowelf @.***> wrote:

Is this project designed to work with the Razer Stream Controller? Or is the stream controller just different enough from a regular LoupeDeck Live that it will kind of work as is?

In minimal testing, I was able to manually connect to it (the auto discover wasn't able to find it) forcing the Loupedeck Live class. Using a slightly modified version of the simple example, it was able to read the touch screen, trigger the vibration, and work with the knobs. The buttons were able to change color once, but I have yet to figure out why they are not changing. touch.key is also undefined.

Additionally, I attempted the slide example, but the touchscreen's appearance did not change outside of the default appearance (a set of rotated semicircles).

Finally, when the app is closed, it takes about 30 seconds or more for the stream controller to be released/disconnected from the application despite running loupedeck.close().

All testing was done on PopOS 22.04 LTS (Debian based). Thank you!

— Reply to this email directly, view it on GitHub https://github.com/foxxyz/loupedeck/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7ZAZ56REO6RNXAL6LFNATXJNOSNANCNFSM6AAAAAAYZL2OUU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

foxxyz commented 1 year ago

Yeah as far as I'm aware there is very little difference between them. In my code I am handling them identically. But the main difference to what you have now is that the screens must all be addressed as one large 0x4d. In my testing, this also works for the live with the 0.2.5(?) firmware, so I adopted this approach for these too to keep it simpler.

There is also the razer stream controller x. This is again a subset of existing functionality, the button presses are the same as the circle buttons on other models, and it has a single lcd segment

This is super useful. I imagine the changes to support this device are minor but I'd still like to double-check with an actual device to make sure I have it right.

Will try to obtain one soon and add support.

foxxyz commented 1 year ago

@linkshadowelf I added support, try it out and open a new issue if you find any problems!