get_port_settings
Retrieve the active mode, speed target, and full automation configuration for a specific AC Infinity port, including VPD, temperature, humidity, schedule, and cycle settings.
Instructions
Get the full automation configuration for a port.
Calls the getdevModeSettingList endpoint and returns the active mode, speed target, and all configured automation targets (VPD, temperature, humidity, schedule, timer, cycle).
Args: device_id: The AC Infinity device code (from discover_devices) port: 1-based port number
Returns: JSON example (non-ADVANCE port)::
{
"device_id": "C58ZA",
"port": 1,
"mode": "AUTO",
"speed_target": 5,
"vpd_target_kpa": null,
"temp_range": null,
"humidity_range_pct": null,
"schedule_window": null,
"cycle_on_seconds": 300,
"cycle_off_seconds": 60
}
When ``mode`` is ``"ADVANCE"``, ``speed_target`` is null (an automation governs
the port), and the response includes three additional enrichment fields:
- ``automation_running``: ``true`` if the governing automation has
``run_state=True``; ``false`` if an automation was found but none active;
``null`` when the secondary API call failed (degraded path).
- ``automation_configured``: ``true`` if the automations list is non-empty;
``false`` if empty; ``null`` when degraded.
- ``human_summary``: grower-readable description of the ADVANCE state.
Three variants:
- Governing found: ``"Port is running under 'Name' automation (target
speed: N, current live speed: M). The automation is active."``
- All disabled: ``"Port is in automation mode, but all automations are
disabled. The port hasn't fully released. Ask me to list your
automations for details."``
- Degraded: ``"Port is in ADVANCE automation mode. Automation details
could not be retrieved."``
``current_speed`` reflects the live fan speed from the device.
``automation_name``/``automation_id`` are populated from the governing
automation (or null if none active or secondary lookup degrades).
``automation_on_speed`` is read from the port group of the governing
automation whose ``grouptDevType`` bitmask covers this port (bitmask-matched);
null when no governing automation, no matching port group, or degraded.
``vpd_target_kpa`` is non-null only when VPD automation is active.
``temp_range`` / ``humidity_range_pct`` are non-null only when those
thresholds are enabled. ``schedule_window`` times are in device local time
(not UTC).
When the port appears to have nothing connected (primary: ``portResistance == 65535``;
fallback for old firmware: default-named ``"Port N"`` with zero load, or a devType=18/22
controller), the response includes a staleness-aware ``note`` field.
On the non-ADVANCE path, ``human_summary`` is overridden with a staleness statement
and ``note`` is set to a redirect hint, so the response doesn't contradict itself
(e.g. "Humidity automation: 60–100%") for a port with nothing connected.
On the ADVANCE path, ``human_summary`` is preserved (it already describes the
automation state) and only ``note`` is appended.
On failure returns ``{"error": "...", "detail": "..."}``.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | ||
| port | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |