Get relay
protect_get_relayFetch full details for a specific UniFi Protect relay by ID, including outputs, inputs, wireless signal, battery status, and LED settings to monitor or automate relay behavior.
Instructions
Get full details for a specific relay by ID. Returns: id, modelKey, name, mac, state, type, guid, ledSettings (isEnabled), outputs (array of objects: id, name, type, delay, pulseDuration, state, rebootState — id is the outputId for protect_activate_relay_output), inputs (array of objects: id, name, state, actionTrigger, actionType, actionOutputId), wirelessConnectionState (signalState: signalQuality, signalStrength; batteryStatus: percentage, isLow; bridge) (7.3.70 docs).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Relay ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Device ID | |
| mac | No | MAC address | |
| guid | No | Hardware MODEL GUID, shared by every unit of the same model. NOT a per-device identifier — use `id` to identify a device. | |
| name | No | Device name | |
| type | No | Hardware model name, e.g. "UVC G6 Turret", "UP Chime PoE", "UNVR-PRO" | |
| state | No | CONNECTED | DISCONNECTED | ... | |
| inputs | No | Input channels (array of objects: id, name, state, actionTrigger, actionType, actionOutputId) | |
| outputs | No | Output channels (array of objects: id, name, type, delay, pulseDuration, state, rebootState). `id` is the outputId for protect_activate_relay_output | |
| modelKey | No | Resource kind | |
| ledSettings | No | LED settings (object: isEnabled) | |
| wirelessConnectionState | No | Wireless link state (object: signalState { signalQuality, signalStrength }, batteryStatus { percentage, isLow }, bridge) |