Skip to content

Conversation

@janikwitzig
Copy link
Collaborator

This is the skeleton to provide support for CC buttons on the WING to trigger Companion actions.

The SatelliteClient is responsible for communicating and essentially implements the Satellite API. It should be kept agnostic to ports and hosts.

The CustomCommandHandler uses a SatelliteClient to register the surfaces and eventually to read the OSC messages and execute the button presses through the Satellite API.

What is Missing

  • parsing of OSC messages and pressing the corresponding buttons
  • all non-user buttons on the consoles
  • some configs

Rambling

Furthermore, I tried something new with this more separated approach. I think this could be useful to some day clean up the main index.ts file by creating specific handler objects for tasks.

My vision is something like this:

// index.ts

if(oscMessageIsCc) {
   customControlHandler.register(message)
}

variableHandler.register(message)
oscHandler.send(message)

Each of the handlers implements its own Timeout events to control the timing and can callback to the function that need to be executed on the level of Companion, e.g. UpdateVariableDefinitions

I think this will greatly help declutter the main file and will result in cleaner code for the future, as boundaries between functional parts will be clearer.

@janikwitzig janikwitzig added the feature New feature or request label Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants