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
- Go to Integrations > Local automation.
- Make sure that Enable local automation server is selected.
- Select Allow connections from the local network.
- 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:
curl -X POST http://192.168.1.20:44555/api/actions/show_veto \
-H 'Authorization: Bearer <token>'$headers = @{ Authorization = 'Bearer <token>' }
Invoke-RestMethod -Method Post http://192.168.1.20:44555/api/actions/show_veto -Headers $headersimport requests
res = requests.post(
"http://192.168.1.20:44555/api/actions/show_veto",
headers={"Authorization": "Bearer <token>"},
)
print(res.json())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:
{ "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
| Answer | Cause |
|---|---|
401 unauthorized | The token is missing or wrong. Copy it again from the panel. |
403 forbidden | Local network mode is off, or the device is not on a local network. |
| No answer, timeout | The Windows firewall blocks MyHUD, or the address is wrong. |
WebSocket closed with code 4401 | The token is wrong, or the auth message came too late. |
