get_port_status
Retrieve real-time operational status of a specific port on an AC Infinity controller, including power level, mode, and timer.
Instructions
Get the live operational status of a single port.
Reads real-time fields from the device info response: actual current power level, active automation mode, and remaining timer seconds.
Args: device_id: The AC Infinity device code (from discover_devices) port: 1-based port number
Returns: JSON example (port not powered)::
{
"device_id": "C58ZA",
"port": 1,
"port_name": "Port 1",
"power_level": 0,
"mode": "OFF",
"plug_status": "not powered"
}
``mode`` is one of: OFF, ON, AUTO, TIMER_TO_ON, TIMER_TO_OFF, CYCLE, SCHEDULE, VPD,
Automation. ``plug_status`` is only present when no current is detected on the port (the
port is not powered or nothing is connected). It is omitted when the port is running.
Only emitted for default-named ports (``"Port N"``) — custom-named ports are assumed to
have a device intentionally connected; ``loadState=0`` alone cannot distinguish "nothing
plugged in" from "device is off".
``remain_time_seconds`` is only present when a countdown timer is active (value > 0);
it is omitted when there is no active timer.
When ``mode`` is ``Automation``, the port is governed by a named Advance Automation
program in the AC Infinity app. ``automation_name`` is present only when the port is
under automation control and the governing automation name was successfully resolved;
absent otherwise.
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 also includes a ``note`` field alerting the grower
(e.g. ``"Port 7 doesn't appear to have anything connected."``).
On failure returns ``{"error": "...", "detail": "..."}``.
Note on ADVANCE detection: ``isOpenAutomation==1`` in devInfoListAll is the primary
signal. For AI+ devices (no curMode field) and older firmware without isOpenAutomation,
a secondary call to getdevModeSettingList is made to check modeType.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | ||
| port | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |