System

async OPNsenseClient.get_device_unique_id(expected_id=None)

Return the stable device identifier derived from physical MAC addresses.

Parameters:

expected_id (str | None, optional) – Previously known identifier to prefer when it is still present among physical interface MAC addresses.

Returns:

MAC-address-based identifier with colons replaced by

underscores. Returns expected_id when it still matches a physical interface, otherwise the first sorted physical MAC identifier, or None when no physical MAC addresses are available.

Return type:

str | None

async OPNsenseClient.get_system_info()

Return basic OPNsense system identity information.

Returns:

Mapping containing the OPNsense host name when

the system-information endpoint is available.

Return type:

dict[str, Any]

async OPNsenseClient.get_carp()

Fetch one CARP snapshot and return both interfaces and aggregate summary.

Returns:

Snapshot payload containing interfaces and status_summary derived from one backend fetch.

Return type:

dict[str, Any]

async OPNsenseClient.system_reboot()

Reboot OPNsense.

Returns:

True when the operation succeeds; otherwise, False.

Return type:

bool

async OPNsenseClient.system_halt()

Shutdown OPNsense.

Return type:

None

async OPNsenseClient.send_wol(interface, mac)

Send a wake on lan packet to the specified MAC address.

Parameters:
  • interface (str) – OPNsense interface identifier used as the Wake-on-LAN egress interface.

  • mac (str) – MAC address to use for Wake-on-LAN.

Returns:

True when the operation succeeds; otherwise, False.

Return type:

bool

async OPNsenseClient.get_notices()

Return active OPNsense dashboard notices.

Returns:

Mapping with pending_notices_present and a

pending_notices list. Each notice includes its message, subject id, and parsed created_at timestamp when available.

Return type:

dict[str, Any]

async OPNsenseClient.close_notice(id)

Close selected notices.

Parameters:

id (str) – Identifier of the notice to close.

Returns:

True when the operation succeeds; otherwise, False.

Return type:

bool

async OPNsenseClient.reload_interface(if_name)

Reload the specified interface.

Parameters:

if_name (str) – Interface name to select rows for.

Returns:

True when the operation succeeds; otherwise, False.

Return type:

bool

async OPNsenseClient.get_certificates()

Return trust certificates known to OPNsense.

Returns:

Mapping keyed by certificate description. Each

certificate contains its UUID, issuer reference, RFC 3280 purpose, in-use flag, and validity timestamps.

Return type:

dict[str, Any]