-
Notifications
You must be signed in to change notification settings - Fork 141
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
Support for Mirabox Stream Dock 293S #148
base: master
Are you sure you want to change the base?
Conversation
Maybe we can add a |
At least for this specific device, returning the resolution by key index would be easier. I'm not sure how to expose this new method to be used by downstream projects, or if it makes sense to do so, given that (as I currently understand) the Elgato devices don't have keys with distinct resolution. I don't like the idea of simply rescaling the images to be displayed though. |
This is probably a bigger task than is wanted for this pr, but it could be useful for inspiration. Something I recently did in the javascript streamdeck library was to remove all the loose properties describing functionality, and replace it with an array of controls on the class. (the typescript definitions of these are here) This array contains entries such as:
or
These objects also get passed to the keypress and other event handlers instead of the index that used to be provided. This gives me the scope to handle things like varying resolution buttons in the future if needed. As well as adding new types or variations of existing controls, with minimal effort needed for consumers of the library. By doing this, I managed to remove all the model specific handling in a consumer of the library, it is now able to rely solely on these control descriptions to translate to its internal grid system. Previously it had to know how the plus and neo were physically laid out, and handle the rgb only buttons of the neo differently. |
There is an official Python-SDK (see https://github.com/MiraboxSpace/Linux-StreamDock-PythonSDK) for ther mirabox devices. Maybe helpful for this? |
I just took a look into that code. It's nice to see I wasn't that far off with my reverse engineering, and it's also good have some comments on the key resolution and the specific implementation details for the 293 model. It seems the official SDK only supports up to 80x80, while the displays themselves can go up to 85x85 without cropping (measured by eye 😄), so it takes into account the three not-button displays. I don't like what they did to hide the USB commands into a binary .so, the commands are so simple that there is no need, but I understand the manufacturer wanting to protect their IP. When I have some spare time I can work on this PR. |
I think you're right. Configuring a button with the original software, uses a smaller area, compared to the "boot logo", which uses the whole area of a key.
That would be great 👍 |
Heyo, this might be pushing the scope a bit but what would be needed for the MBox N3 to be able to be added as well? Instead of a 5x3 array, It has 6 of the same lcd buttons, 3 opaque buttons, and 3 encoders each of which also have a click-in. If they put it together the way I imagine they probably did, that comes out to being three extra buttons. Edit: keymapping, and the images are 64x: MiraboxSpace/Linux-StreamDock-PythonSDK#15 (comment) |
I also have a Mirabox 293S available. Is there something specific I can help with to get this CR going? |
@Gotolei - at the protocol level I tend to agree with you, it shouldn't deviate too much from what we already have. From the keymap you linked, it looks like as if the encoders expose their status as two different key presses. Also notice the comment from @Heart-State that states the set button image command for N3 is a bit different from the 293. I'd take a look at the Stream Deck Plus implementation of the dials as a base to implement them for the N3.
@fightforlife - Yeah, the PR has working code for the main 15 buttons with 85x85 resolution (and I'm using it daily). I haven't added support for the side screen that are driven as if they were three 80x80 screens. They would be black in this case. To support the side screen with my code, the easiest way would be to decrease the overall supported resolution down to 80x80 and update the key mapping:
The not so easy way is to add support for multiple resolution buttons in this library and also on downstream applications that happen to use this library like @Julusian mentioned on their comment above. |
Could we just resize the received image to 80x80 when the keyID belongs to one of the 3 virtual display keys? (somewhere in def set_key_image) |
Sure, that would work. My problem with this approach - and why I didn't implement this before - is that the downstream app could be making the image on the fly considering the button's resolution. This is more concerning when text is overlaid to an icon or if the icon has pixel art style, as it would lose details. |
I stayed at 85x85 and it works fine. The keys on the side just gets a little bit cutted off. If you don't know it, you won't notice. BTW, the correct order for the keys is:
|
Added this into my PR to this PR: rescbr#1 |
Add dummy functions for compatibility with StreamController + upstream changes merged
This commit adds unofficial basic support for the Mirabox Stream Dock 293S by reverse engineering the USB traffic of their Windows controller app.
This code could potentially support other Mirabox products and other brands that have Mirabox as the OEM, such as AJAZZ. I only tested with my generic unbranded deck bought on Aliexpress.
Features that are implemented:
Missing support: