H2R Layouts

Websocket API

Connecting

Connect to H2R Layouts (the app) via the following websocket addresses:

  • ws://127.0.0.1:4011 - On the same computer
  • ws://[your-ip-address]:4011 - On your network

BitFocus Companion

We are still working on releasing our official connection. In the meantime, add a “Generic: WebSocket” connection to your Companion setup.

Adding the Generic WebSocket connection
Adding the Generic WebSocket connection

From here, configure the connection to point at H2R Layouts (the app).

Configuring the connection
Configuring the connection

Then, when adding buttons, use the data below and add it to a buttons press actions.

Adding an action
Adding an action

You’ll find all the current possible requests below.


General

Health

Checks the connection health

// JSON data
{"id": "[random_id]", "action": "health"}

// -> Response
// {"success": boolean}

Layouts

Get all layouts

List all the layouts you have added to the app

// JSON data
{"id": "[random_id]", "action": "layouts/get-all"}

// -> Response
// { "success": boolean, "count": number, "layouts": array }

Run a layout

Runs a layout on a connected device

// JSON data
{"id": "[random_id]", "action": "layouts/run", "params": { "number": 1 }}
// Where "number" is the layout you want to run. E.g. 4 or 10.

// -> Response
// { "success": boolean, "count": number, "layouts": array }

Run to full

Runs to a full screen version of each box

// JSON data
{"id": "[random_id]", "action": "layouts/run-to-full", "params": { "number": 1 }}
// Where "number" is the box you want to run. E.g. 1 or 4.

// -> Response
// { "success": boolean, "count": number, "layouts": array }

Connections

Get all connections

List all the connections you have added to the app

// JSON data
{"id": "[random_id]", "action": "connections/get-all"}

// -> Response
// { "success": boolean, "connections": object }

ATEM connection: Animate Enable/Disable

Enable or Disable the animation between layouts

// JSON data
// enable 
{"id": "[random_id]", "action": "connections/atem/animate/enable"}
// disable
{"id": "[random_id]", "action": "connections/atem/animate/disable"}

// -> Response
// { "success": boolean }

ATEM connection: Animate Easing

Easing used when animating between layouts

// JSON data 
{"id": "[random_id]", "action": "connections/atem/animate/easing", "params": { "type": "type_of_easing" }}
// Options for "type_of_easing" are "linear", "easeInQuad", "easeOutQuad", "easeInOutQuad".

// -> Response
// { "success": boolean }

ATEM connection: Animate Speed

Speed of animation between layouts

// JSON data 
{"id": "[random_id]", "action": "connections/atem/animate/speed", "params": { "speed": 10 }}
// Options for "speed" are any number from 10 (faster) to 100 (slower). E.g. 50.

// -> Response
// { "success": boolean }

ATEM connection: SuperSource index

Useful for bigger ATEM switchers with multiple SuperSources

// JSON data 
{"id": "[random_id]", "action": "connections/atem/supersource/index", "params": { "index": 0 }}
// Options for "index" are 0 and 1. This is a zero-based indexing system.

// -> Response
// { "success": boolean }

Simplify building layouts

Create SuperSource macros or vMix virtual sets in seconds.

Build now