Repository navigation
Conversation
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
The change still has an unguarded indexing risk in _read_control_states that could raise IndexError on short reports and crash the read thread, along with a minor documentation formatting nit.
2 open issues
What changed in this PR
This pull request adds first-class support for the Soomfon Stream Controller (XF-CN001, USB 1500:3003), a Mirabox-293S–family device using a newer protocol revision, by introducing a dedicated device implementation, wiring it into discovery, and adding docs plus an example.
Changes:
- Add Soomfon VID/PID constants and register the device on HID interface
0for correct enumeration. - Introduce
SoomfonStreamController(derived fromMirabox293S) with updated report sizing, image sizing behavior (including side-tile resizing), native press/release handling, and a CONNECT heartbeat. - Add documentation pages and a new
example_soomfon.pydemonstrating usage (including side display tiles).
Outstanding review items to address before approval:
- Moderate: Guard against short/incomplete HID reports in
SoomfonStreamController._read_control_statesto avoid potentialIndexError(noted at the referenced locations). - Nit: Cache blank JPEG images in
_blank_imageto avoid repeated recompression work. - Nit: Remove trailing whitespace in the
devices.rstsection title to prevent awkward reStructuredText rendering.
Assessment: This pull request requires changes.
| File | Summary |
|---|---|
src/StreamDeck/ProductIDs.py |
Adds Soomfon VID/PID constants for device discovery. |
src/StreamDeck/Devices/SoomfonStreamController.py |
Implements Soomfon protocol behavior; address the moderate-length guard in _read_control_states and the blank-image caching nit. |
src/StreamDeck/DeviceManager.py |
Registers the new device and constrains enumeration to interface 0. |
src/example_soomfon.py |
Adds a Soomfon-specific example script (including side-tile usage). |
README.md |
Updates supported-device documentation to include the Soomfon controller. |
doc/source/modules/devices.rst |
Adds the device to Sphinx docs; fix trailing space in the section title (nit). |
doc/source/index.rst |
Updates docs index/toctree to include the new Soomfon example page. |
doc/source/examples/soomfon.rst |
Adds the Sphinx page embedding the new example. |
Review effort: Balanced
Update input validation in SoomfonStreamController and fix heading in documentation. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Hi! This PR adds support for the Soomfon Stream Controller (XF-CN001), USB
1500:3003.It's essentially a rebranded Mirabox 293S: same 6×3 layout, same key mapping and the same command set. The difference is that it runs a newer revision of the Mirabox protocol, which is why the existing
Mirabox293Sclass doesn't work with it as-is (keys are read, but images never show up). Themirajazz/opendeck-akp153projects classify this device as protocol version 3.What's in it
The new
SoomfonStreamControllerclass subclassesMirabox293Sand only overrides what actually differs:CONNECTheartbeat while the deck is open, sent underupdate_lockso it can't land in the middle of an image uploadThe deck exposes two HID interfaces under the same VID/PID (the second one is a keyboard), so I registered it with interface
0, the same way the Ulanzi D200 is handled.One small note: the payload builder in
Mirabox293Sproduces one byte more than the packet size. I fixed that only in the new class and left the 293S untouched, since I can't test on that device.I also added a device page to the docs, plus an example (
example_soomfon.py) based on the Neo one that uses the side display as a clock. It uses key 16 as the exit button, because on this device the last index (17) is a side tile and can't be pressed. That also meansexample_basic.pycan't be closed from the deck on this model.Testing
test/test.pywith the dummy transport passes for all models, including the new oneHappy to adjust anything if you'd prefer a different approach.