Skip to content

bitfocus/companion-module-bss-soundweb

Repository files navigation

BSS Soundweb Control for Companion v3

See HELP.md and LICENSE

This module enables Companion to control BSS Soundweb London BLU devices such as:

  • Soundweb BLU-806
  • Soundweb BLU-160

This module is only compatible with Companion v3 and will be available in Companion from v3.3.0.

Releases

v1.0.2

Fixes and minor improvements.

  • Fixes bug where large relative percent increments could result in looping back round to 0%
  • Minor refactoring for logging module TX messages when setting parameters to avoid code duplication and error

v1.0.1

Fixes and minor improvements.

  • Fixes bug that stopped the module communicating due to nodes not being removed correctly from the connection watchdog.
  • Minor improvements to logging to help direct users to the button where there is an issue with the configuration of an action or feedback.

v1.0.0

This is the first release of the module and is compatible with Companion v3.3.0 and later.

Feature Roadmap

  • Custom parameter action
    • Absolute set
    • Relative set
  • Custom parameter feedback
    • Comparison operators
    • Add variable checkbox
  • Custom parameter variable feedback
  • Gain N-Input action
    • Fader set
    • Mute set
    • Fader set with fade time
  • Gain N-Input feedback
    • Comparison operators
    • Add variable
  • Module variables
    • Node connection status
  • Button Presets
    • Gain Mute
    • Gain Level Feedback
    • Gain Level Up
    • Gain Level Down
    • Gain Fade

Development

TODO

  • Improve options parsing/validation and error reporting with Zod object schemas
  • Abstract away comms/control methods from module instance class
  • General cleanup

Setup Node.js with fnm

It's recommended to use fnm for managing Node versions: https://github.com/Schniz/fnm#installation

Install using Winget (Windows)

winget install Schniz.fnm

Install using Homebrew (macOS/Linux)

brew install fnm

(See further below for specific instructions on setting up fnm for specific terminals.)

A .node-version file has been provided, which means that once fnm is installed and the shell is correctly configured, in theory you can cd into the repo directoy and fnm should automatically switch to the correct version of Node and request to install it if it is not available.

If this doesn't work, just run fnm use and it should switch to the correct version of Node.

Enable Corepack

Once Node has been installed, be sure to enable corepack so you can use package managers such as yarn without installing them globally:

corepack enable

Shell setup for fnm

Windows PowerShell

Add the following to the end of your profile file:

fnm env --use-on-cd | Out-String | Invoke-Expression

On Windows, PowerShell comes pre-installed, but there are two versions of it. Read more about it here. The profile is located at different places depending on which version you're using:

  • Built in PowerShell (aka "Windows PowerShell"): ~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
  • The newer, PowerShell >= 7, that's not built in: ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1

Bash

Add the following to your .bashrc or .zshrc profile:

eval "$(fnm env --use-on-cd)"

The .bashrc or .zshrc file can typically be found in your home directory.

Build

Install Yarn

If you enabled corepack, then this should allow you to use yarn without installing it globally. However, if necessary (or preferable) you may install yarn globally by running:

npm install --global yarn

Install project dependencies

Once you have cd'd into the root of the repo, simply run:

yarn

Build/transpile the project

To build/transpile the project into Javascript, run the following, which calls a script in package.json.

yarn build

Run development scripts

This activates the file watcher so as you update Typescript files, they are automatically transpiled into Javascript.

yarn dev

Run the module in Companion

To run the module in Companion, you need to provide Companion a path to a directory containing your development modules. This can be done from the desktop server application window. Click the gear icon and a 'Developer Modules Path' field appears, where you can set the path.

Once this has been done, Companion will watch the files in your development path and will 'live reload' any modules whose files have been changed.

Companion imports/runs the file identified in mainfest.json under runtime.entrypoint. This should be the transpiled (.js) version of main.ts, which will appear at: dist/main.js, but only once the project has been built using yarn build or yarn dev.

Once you have built the project, you can run yarn dev as detailed above, which will then watch your source code and auto-transpile typescript to javascript as you work. In turn, Companion will then live reload any edited development modules automatically.

Version bumping

Releases

yarn version --major

yarn version --minor

yarn version --patch

Pre-releases

yarn version --premajor --preid rc

yarn version --preminor --preid rc

yarn version --prepatch --preid rc

Betas

yarn version --premajor --preid beta

yarn version --preminor --preid beta

yarn version --prepatch --preid beta