Skip to content

Control MyHUD from another device ​

By default, MyHUD accepts commands only from the PC it runs on. To use the API from a second PC, a tablet or a Companion machine on the same network, turn on local network mode.

WARNING

The traffic is not encrypted. Use this mode only on a network you trust, for example your studio or LAN event network.

Turn on local network mode ​

  1. Go to Integrations > Local automation.
  2. Make sure that Enable local automation server is selected.
  3. Select Allow connections from the local network.
  4. If Windows asks, allow MyHUD through the firewall.

The panel then shows:

  • Addresses for other devices: the addresses of this PC on your network, for example http://192.168.1.20:44555. Click an address to copy it.
  • Access token: a secret key. Click Show or Copy.

Send the token ​

Other devices must send the token with each request. The PC that runs MyHUD never needs it.

HTTP ​

Send the token in the Authorization header:

bash
curl -X POST http://192.168.1.20:44555/api/actions/show_veto \
  -H 'Authorization: Bearer <token>'
powershell
$headers = @{ Authorization = 'Bearer <token>' }
Invoke-RestMethod -Method Post http://192.168.1.20:44555/api/actions/show_veto -Headers $headers
python
import requests

res = requests.post(
    "http://192.168.1.20:44555/api/actions/show_veto",
    headers={"Authorization": "Bearer <token>"},
)
print(res.json())
ts
const res = await fetch('http://192.168.1.20:44555/api/actions/show_veto', {
  method: 'POST',
  headers: { Authorization: 'Bearer <token>' },
});
console.log(await res.json());

The X-MyHUD-Token: <token> header also works.

WebSocket ​

Put the token in the address:

ws://192.168.1.20:44555/?token=<token>

Or send this message first, within 5 seconds after you connect:

json
{ "type": "auth", "token": "<token>" }

Until the token is accepted, the connection receives nothing.

Change the token ​

Click Regenerate to create a new token. All remote devices are disconnected and must use the new token. Do this if you think someone else has the token.

What is blocked ​

  • Devices outside your local network are always refused, even with the token.
  • Web pages open in a browser cannot send commands, even on the MyHUD PC. This prevents a website from controlling your HUD.
  • A remote device can send up to 20 requests per second. Above that, MyHUD answers 429 rate_limited.

Common problems ​

AnswerCause
401 unauthorizedThe token is missing or wrong. Copy it again from the panel.
403 forbiddenLocal network mode is off, or the device is not on a local network.
No answer, timeoutThe Windows firewall blocks MyHUD, or the address is wrong.
WebSocket closed with code 4401The token is wrong, or the auth message came too late.