Skip to content

feat: CLI commands for device management & state control - #460

Merged
Core447 merged 1 commit into
StreamController:mainfrom
WakanaYuki:main
Jul 26, 2025
Merged

Core447 merged 1 commit into
StreamController:mainfrom
WakanaYuki:main

Conversation

@WakanaYuki

Copy link
Copy Markdown
Contributor

This feature has been requested in this issue: #164

What’s new

  • Device discovery

    • --list-devices: shows ID, product name, serial, key layout, connection status; prints permission tips if access fails.
    • --list-pages: lists every page, its items, and state counts.
  • State control

    • --change-state SERIAL PAGE COORD STATE: changes a single key’s state. Works via D-Bus if StreamController is running, or directly if not.

Help Documentation

I added the new commands to the documentation, here is what the help functions now additionally states.

  --list-devices        List all connected StreamDeck devices and their properties
  --list-pages          List all available pages
  --change-state SERIAL PAGE COORDS STATE
                        Change the state of a StreamDeck item. Format: SERIAL PAGE COORDS STATE SERIAL: Device serial number (e.g., CL123456789) PAGE: Page name (e.g., Main, Soundboard) COORDS:
                        Position as x,y (e.g., 0,0 for top-left) STATE: State number to change to (0, 1, 2, etc.) Example: --change-state CL123456789 Main 0,0 1

Files touched

  • globals.py — CLI arg definitions, API request storage
  • main.py — listing commands, validation, API calls
  • app.py — D-Bus handler for change_state
  • DeckController.py — processes state-change requests at init

Typical uses

  • Check connected StreamDecks quickly
  • Script key-state changes
    • thereby enabling companion applications to interact with StreamController item states
  • Debug layouts and permissions

Compatibility

Additive only; existing commands and APIs are untouched.

@WakanaYuki WakanaYuki mentioned this pull request Jul 24, 2025
@Core447
Core447 merged commit 7fedbc0 into StreamController:main Jul 26, 2025
@Core447

Core447 commented Jul 26, 2025

Copy link
Copy Markdown
Member

Amazing work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants