Set port mode
set_port_modeSwitch a controller port's active mode to Off, On, Auto, Schedule, or other modes while retaining its current power, triggers, and timer settings.
Instructions
Switch the active mode of a port (e.g. Off, On, Auto, Schedule). The mode's parameters (power, triggers, timers) keep their current values — set them first with the other tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | 1 Off, 2 On, 3 Auto, 4 Timer to On, 5 Timer to Off, 6 Cycle, 7 Schedule, 8 VPD, 9 CO2, 10 CO2 Fan, 11 Moisture, 12 Water Temp, 13 pH, 14 EC, 15 Water Detect. | |
| port | Yes | Port number as printed on the controller (1-based). | |
| controller_id | Yes | Controller id (`id` from list_controllers). | |
| user_authorized | No | Must be true. Set only after the user explicitly approved this exact change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| port | Yes | ||
| changed | Yes | API keys that were written, in API units. | |
| controller_id | Yes |