SMART

async OPNsenseClient.get_smart()

Return SMART device data from the OPNsense SMART plugin.

Returns:

SMART device rows, or an empty list when the

endpoint returns 404. With throw_errors off, 403 and transient HTTP or transport failures return an empty list, and an undecodable response body returns None. With throw_errors on, those failures raise OPNsenseError.

Return type:

list[dict[str, Any]] | None

async OPNsenseClient.get_smart_info(device, info_type='a')

Return SMART detail data for a single device.

Parameters:
  • device (str) – SMART device name, such as nvme0 or ada0.

  • info_type (str) – SMART info selector supported by the plugin. Valid values are: - i: Device info - H: Health - c: SMART capabilities - A: Attributes - a: All (default) - x: Extended

Returns:

Decoded SMART details, with non-mapping outputs

wrapped under output. A 404 returns an empty dictionary. With throw_errors off, 403 and transient HTTP or transport failures return an empty dictionary, and an undecodable response body returns None. With throw_errors on, those failures raise OPNsenseError.

Return type:

dict[str, Any] | None