Skip to content

Commit

Permalink
Merge branch 'beta' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Nov 27, 2023
2 parents 93dad4b + b54666e commit 1b8f199
Show file tree
Hide file tree
Showing 260 changed files with 14,767 additions and 6,636 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,30 @@ jobs:
with:
node-version-file: '.node-version'

- name: Prepare
- name: Prepare (server)
run: |
# try and avoid timeout errors
yarn config set network-timeout 100000 -g
yarn --frozen-lockfile
- name: Check types
- name: Check types (server)
run: |
yarn check-types
- name: Prepare (client)
run: |
cd webui
# try and avoid timeout errors
yarn config set network-timeout 100000 -g
yarn --frozen-lockfile
- name: Check types (client)
run: |
cd webui
yarn check-types
linux64:
runs-on: ubuntu-20.04
needs: check-types
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,38 @@

## Companion v3.2.0 - Release Notes (unreleased)

Up to 13984f3b4c3fb4f206cadfa5549573734f8e6432

### 📣 CORE FEATURES AND IMPROVEMENTS

- Button grid can be resized to be smaller or larger than the default 8x4
- Rework button image drawing, to be higher resolution. This changes some font sizes slightly.

- Improved surface rotation, which rotates the whole surface not just the drawing of each button
- Change surface image scaling library to reduce install size and improve performance
- Use async HID library, removing spawning of child processes to handle HID devices
- Add fontsize and image scaling to satellite api
- Elgato Plugin performance improvements
- Export and import compressed configs
- Add support for Loupedeck CT
- Add support for Videohub Panel as a surface
- Send compressed button renders to webui
- Emulators can have their grid size changed
- Tablet page performance improvements
- Bonjour discovery broker to assist modules in discovering possible devices to control
- Indicate variables support on text input fields
- Internal action to set or create custom variable
- Slow down connection initiaisation at startup, to avoid crashes on lower power machines
- Change webui build tooling to be more modern
- Rework backend code to be loosely typed
- Rework various api implementations, to support customisable grid size and avoid 'bank' terminology
-

### 🐞 BUG FIXES

- Streamdeck Plus LCD strip image positioning
-

### 🧩 NEW & UPDATED MODULES

## Companion v3.1.2 - Release Notes
Expand Down
2 changes: 1 addition & 1 deletion bundled-modules
Submodule bundled-modules updated 113 files
88 changes: 74 additions & 14 deletions docs/5_remote_control/http_remote_control.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,80 @@ Remote triggering can be done by sending `HTTP` Requests to the same IP and port

**Commands**

This API tries to follow REST principles, and the convention that a `POST` request will modify a value, and a `GET` request will retrieve values.

- Press and release a button (run both down and up actions)
Method: POST
Path: `/api/location/<page>/<row>/<column>/press`
- Press the button (run down actions and hold)
Method: POST
Path: `/api/location/<page>/<row>/<column>/down`
- Release the button (run up actions)
Method: POST
Path: `/api/location/<page>/<row>/<column>/up`
- Trigger a left rotation of the button/encoder
Method: POST
Path: `/api/location/<page>/<row>/<column>/rotate-left`
- Trigger a right rotation of the button/encoder
Method: POST
Path: `/api/location/<page>/<row>/<column>/rotate-right`
- Set the current step of a button/encoder
Method: POST
Path: `/api/location/<page>/<row>/<column>/step`

- Change background color of button
Method: POST
Path: `/api/location/<page>/<row>/<column>/style?bgcolor=<bgcolor HEX>`
- Change background color of button
Method: POST
Path: `/api/location/<page>/<row>/<column>/style`
Body: `{ "bgcolor": "<bgcolor HEX>" }` OR `{ "bgcolor": "rgb(<red>,<green>,<blue>)" }`
- Change text color of button
Method: POST
Path: `/api/location/<page>/<row>/<column>/style?color=<color HEX>`
- Change text color of button
Method: POST
Path: `/api/location/<page>/<row>/<column>/style`
Body: `{ "color": "<color HEX>" }` OR `{ "color": "rgb(<red>,<green>,<blue>)" }`
- Change text of button
Method: POST
Path: `/api/location/<page>/<row>/<column>/style?text=<text>`
- Change text color of button
Method: POST
Path: `/api/location/<page>/<row>/<column>/style`
Body: `{ "text": "<text>" }`

- Change custom variable value
Method: POST
Path: `/api/custom-variable/<name>/value?value=<value>`
- Change custom variable value
Method: POST
Path: `/api/custom-variable/<name>/value`
Body: `<value>`
- Get custom variable value
Method: GET
Path: `/api/custom-variable/<name>/value`
- Rescan for USB surfaces
Method: POST
Path: `/surfaces/rescan`

**Examples**
Press page 1 row 0 column 2:
POST `/api/location/1/0/2/press`

Change the text of row 0 column 4 on page 2 to TEST:
POST `/api/location/1/0/4/style?text=TEST`

Change the text of row 1, column 4 on page 2 to TEST, background color to #ffffff, text color to #000000 and font size to 28px:
POST `/api/location/2/1/4/style` with body `{ "text": "TEST", "bgcolor": "#ffffff", "color": "#000000", "size": 28 }`

Change custom variable "cue" to value "intro":
POST `/api/custom-variable/cue/value?value=intro`

**Deprecated Commands**

The following commands are deprecated and have replacements listed above. They will be removed in a future version of Companion.

- `/press/bank/<page>/<bank>`
_Press and release a button (run both down and up actions)_
- `/press/bank/<page>/<bank>/down`
Expand All @@ -20,17 +94,3 @@ Remote triggering can be done by sending `HTTP` Requests to the same IP and port
_Change custom variable value_
- `/rescan`
_Make Companion rescan for newly attached USB surfaces_


**Examples**
Press page 1 bank 2:
`/press/bank/1/2`

Change the text of button 4 on page 2 to TEST:
`/style/bank/2/4/?text=TEST`

Change the text of button 4 on page 2 to TEST, background color to #ffffff, text color to #000000 and font size to 28px:
`/style/bank/2/4/?text=TEST&bgcolor=%23ffffff&color=%23000000&size=28px`

Change custom variable "cue" to value "intro":
`/set/custom-variable/cue?value=intro`
67 changes: 50 additions & 17 deletions docs/5_remote_control/osc_control.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,67 @@
Remote triggering can be done by sending OSC commands to port `12321`.
Remote triggering can be done by sending OSC commands to port `12321` (the port number is configurable).

**Commands**

- `/press/bank/ <page> <bank>`
- `/location/<page>/<row>/<column>/press`
_Press and release a button (run both down and up actions)_
- `/press/bank/ <page> <bank> <1>`
- `/location/<page>/<row>/<column>/down`
_Press the button (run down actions and hold)_
- `/press/bank/ <page> <bank> <0>`
- `/location/<page>/<row>/<column>/up`
_Release the button (run up actions)_
- `/style/bgcolor/ <page> <bank> <red 0-255> <green 0-255> <blue 0-255>`
- `/location/<page>/<row>/<column>/rotate-left`
_Trigger a left rotation of the button/encoder_
- `/location/<page>/<row>/<column>/rotate-right`
_Trigger a right rotation of the button/encoder_
- `/location/<page>/<row>/<column>/step`
_Set the current step of a button/encoder_

- `/location/<page>/<row>/<column>/style/bgcolor <red 0-255> <green 0-255> <blue 0-255>`
_Change background color of button_
- `/style/color/ <page> <bank> <red 0-255> <green 0-255> <blue 0-255>`
- `/location/<page>/<row>/<column>/style/bgcolor <css color>`
_Change background color of button_
- `/location/<page>/<row>/<column>/style/color <red 0-255> <green 0-255> <blue 0-255>`
_Change color of text on button_
- `/style/text/ <page> <bank> <text>`
- `/location/<page>/<row>/<column>/style/color <css color>`
_Change color of text on button_
- `/location/<page>/<row>/<column>/style/text <text>`
_Change text on a button_
- `/custom-variable/<name> <value>`

- `/custom-variable/<name>/value <value>`
_Change custom variable value_
- `/rescan 1`
_Make Companion rescan for newly attached USB surfaces_
- `/surfaces/rescan`
_Rescan for USB surfaces_

**Examples**

Press button 5 on page 1 down and hold
`/press/bank/1/5 1`
Press row 0, column 5 on page 1 down and hold
`/location/1/0/5/press`

Change button background color of button 5 on page 1 to red
`/style/bgcolor/1/5 255 0 0`
Change button background color of row 0, column 5 on page 1 to red
`/location/1/0/5/style/bgcolor 255 0 0`
`/location/1/0/5/style/bgcolor rgb(255,0,0)`
`/location/1/0/5/style/bgcolor #ff0000`

Change the text of button 5 on page 1 to ONLINE
`/style/text/1/5 ONLINE`
Change the text of row 0, column 5 on page 1 to ONLINE
`/location/1/0/5/style/text ONLINE`

Change custom variable "cue" to value "intro":
`/custom-variable/cue intro`
`/custom-variable/cue/value intro`

**Deprecated Commands**

The following commands are deprecated and have replacements listed above. They will be removed in a future version of Companion.

- `/press/bank/ <page> <bank>`
_Press and release a button (run both down and up actions)_
- `/press/bank/ <page> <bank> <1>`
_Press the button (run down actions and hold)_
- `/press/bank/ <page> <bank> <0>`
_Release the button (run up actions)_
- `/style/bgcolor/ <page> <bank> <red 0-255> <green 0-255> <blue 0-255>`
_Change background color of button_
- `/style/color/ <page> <bank> <red 0-255> <green 0-255> <blue 0-255>`
_Change color of text on button_
- `/style/text/ <page> <bank> <text>`
_Change text on a button_
- `/rescan 1`
_Make Companion rescan for newly attached USB surfaces_
61 changes: 48 additions & 13 deletions docs/5_remote_control/tcp_udp.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,54 @@ Remote triggering can be done by sending TCP (port `51234`) or UDP (port `51235`

**Commands**

- `SURFACE <surface id> PAGE-SET <page number>`
_Set a surface to a specific page_
- `SURFACE <surface id> PAGE-UP`
_Page up on a specific surface_
- `SURFACE <surface id> PAGE-DOWN`
_Page down on a specific surface_

- `LOCATION <page>/<row>/<column> PRESS`
_Press and release a button (run both down and up actions)_
- `LOCATION <page>/<row>/<column> DOWN`
_Press the button (run down actions)_
- `LOCATION <page>/<row>/<column> UP`
_Release the button (run up actions)_
- `LOCATION <page>/<row>/<column> ROTATE-LEFT`
_Trigger a left rotation of the button/encoder_
- `LOCATION <page>/<row>/<column> ROTATE-RIGHT`
_Trigger a right rotation of the button/encoder_
- `LOCATION <page>/<row>/<column> SET-STEP <step>`
_Set the current step of a button/encoder_

- `LOCATION <page>/<row>/<column> STYLE TEXT <text>`
_Change text on a button_
- `LOCATION <page>/<row>/<column> STYLE COLOR <color HEX>`
_Change text color on a button (#000000)_
- `LOCATION <page>/<row>/<column> STYLE BGCOLOR <color HEX>`
_Change background color on a button (#000000)_

- `CUSTOM-VARIABLE <name> SET-VALUE <value>`
_Change custom variable value_
- `SURFACES RESCAN`
_Make Companion rescan for USB surfaces_


**Examples**
Set the emulator surface to page 23:
`SURFACE emulator PAGE-SET 23`

Press page 1 row 2 column 3:
`LOCATION 1/2/3 PRESS`

Change custom variable "cue" to value "intro":
`CUSTOM-VARIABLE cue SET-VALUE intro`


**Deprecated Commands**

The following commands are deprecated and have replacements listed above. They will be removed in a future version of Companion.

- `PAGE-SET <page number> <surface id>`
_Make device go to a specific page_
- `PAGE-UP <surface id>`
Expand All @@ -20,18 +68,5 @@ Remote triggering can be done by sending TCP (port `51234`) or UDP (port `51235`
_Change text color on a button (#000000)_
- `STYLE BANK <page> <bank> BGCOLOR <color HEX>`
_Change background color on a button (#000000)_
- `CUSTOM-VARIABLE <name> SET-VALUE <value>`
_Change custom variable value_
- `RESCAN`
_Make Companion rescan for newly attached USB surfaces_


**Examples**
Set the emulator surface to page 23:
`PAGE-SET 23 emulator`

Press page 1 bank 2:
`BANK-PRESS 1 2`

Change custom variable "cue" to value "intro":
`CUSTOM-VARIABLE cue SET-VALUE intro`
1 change: 0 additions & 1 deletion launcher/Paths.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const ConfigReleaseDirs = [
'v3.0',
'v3.1',
'v3.2',
'v3.99',
]

module.exports = {
Expand Down
7 changes: 6 additions & 1 deletion lib/@types/osc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ declare module 'osc' {
args: Argument | Array<Argument> | MetaArgument | Array<MetaArgument>
}

export interface OscReceivedMessage {
address: string
args: Array<MetaArgument>
}

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface OscBundle {}

Expand All @@ -59,7 +64,7 @@ declare module 'osc' {

export interface PortEvents {
ready: () => void
message: (message: OscMessage, timeTag: number | undefined, info: SenderInfo) => void
message: (message: OscReceivedMessage, timeTag: number | undefined, info: SenderInfo) => void
bundle: (bundle: OscBundle, timeTag: number, info: SenderInfo) => void
osc: (packet: OscBundle | OscMessage, info: SenderInfo) => void
raw: (data: Uint8Array, info: SenderInfo) => void
Expand Down
6 changes: 3 additions & 3 deletions lib/Cloud/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ class CloudController extends CoreBase {
const retval = []

for (const control of this.controls.getAllControls().values()) {
if (control.type !== 'button' || !control.supportsStyle) continue
if (control.type !== 'button') continue
const drawStyle = control.getDrawStyle()
if (drawStyle.style !== 'button') continue
if (!drawStyle || drawStyle.style !== 'button') continue

// Don't expose a cloud control
if (drawStyle.cloud) continue
Expand All @@ -205,7 +205,7 @@ class CloudController extends CoreBase {
...control.toJSON(false).style,
pushed: control.supportsPushed && control.pushed,
actions_running: control.supportsActions && control.has_actions_running,
bank_status: control.supportsStyle && control.bank_status,
bank_status: control.supportsStyle && control.button_status,
style: 'button',
},
})
Expand Down
Loading

0 comments on commit 1b8f199

Please sign in to comment.