Get UPnP status
unifi_get_upnp_statusReads whether UPnP and NAT-PMP are enabled on a site's gateway, showing if the stored setting is active and flagging controller versions where no UPnP setting exists.
Instructions
Read whether UPnP and NAT-PMP are on for the site's gateway, from the classic controller API (get/setting): the dedicated upnp section where the controller has one, otherwise the gateway (usg) section's upnp_* fields. With UPnP on, LAN devices open WAN ports themselves, without a port forward. upnp_nat_pmp_enabled is the stored setting, which does nothing while UPnP is off; detail says which applies. status: unavailable means no UPnP setting was found on this controller version; it does not mean UPnP is off.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteReference | Yes | Site internalReference from unifi_list_sites (often default), not the Integration API UUID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| source | Yes | ||
| status | Yes | ||
| upnp_enabled | Yes | ||
| siteReference | Yes | ||
| upnp_secure_mode | Yes | ||
| upnp_wan_interface | Yes | ||
| upnp_nat_pmp_enabled | Yes |