> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fabl.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Bitfocus Companion

> Control a Bitfocus Companion instance — press and restyle buttons, read and write variables, and react to watched button changes — over its HTTP remote-control API.

The **Bitfocus Companion** device controls a [Bitfocus Companion](https://bitfocus.io/companion) instance over its HTTP remote-control API — press buttons, restyle them, and read or write variables from your automation [rules](/automation/rules).

## Connection

The agent connects to Companion over your network. Provide the **host** of the machine running Companion, and if needed adjust the **port** (default **8000**, the same as Companion's web interface).

To react to button changes, list the **button locations** (page / row / column) you want to watch. Watching buttons uses Companion's Satellite connection (default port **16622**) and requires **Companion 4.3 or newer**; leave it empty to use the device for control only.

## Commands

The Bitfocus Companion device drives buttons and variables, including:

* **Press**, press-and-hold, or **release** a button
* **Rotate** a button left or right, or set its step
* Set a button's **style** — text, colour, and background
* **Set or read a custom variable**, and read a module variable
* **Rescan** connected surfaces

<Note>
  Button locations and variable names are chosen per action, not on the device — one Companion instance exposes many buttons and variables.
</Note>

## State and triggers

The device reports its connection state. When you list buttons to watch, it also raises triggers your rules can react to, including:

* A watched **button** being pressed
* A watched **button** being released
* A watched **button's** text or colour changing

Trigger data such as the button location is available for use in rule actions.
