relay_activate_output
Switch a UniFi relay output on or off, or trigger a timed pulse, with explicit confirmation required for physical hardware action. Needs host, relay ID, and output ID.
Instructions
Switch a relay output (POST /v1/relays/{id}/outputs/{outputId}/activate).
WARNING: physically switches hardware.
host: console name, ID, or composite ID (MAC:numericId format).
relay_id: REQUIRED. Obtain it from list_relays (its id field).
output_id: REQUIRED output identifier on that relay.
confirm: must be true to execute. state: 'on'|'off' (omit to toggle).
pulse_duration: auto-off ms (only when state='on'). Governed by
UNIFI_PROTECT_MUTATIONS_ENABLED.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| state | No | ||
| confirm | No | ||
| relay_id | Yes | ||
| output_id | Yes | ||
| pulse_duration | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||