useFirmwareStatus
useFirmwareStatus(
deviceId,options?):FirmwareStatusResult
Defined in: console-sdk/src/react/hooks/useFirmwareStatus.ts:131
The SDK’s one request-shaped read (SDK_PLAN.md §3.7 row 17, §3.6.7): the
installed-vs-latest firmware readout for one device as a
QueryResult, plus an imperative refresh().
updateAvailable comes from a real segment-wise version comparison, never
parseInt fuzzing. Results are provider-cached per model+channel, so listing
N same-model devices triggers one manifest fetch. Safe from the first render
(returns pending while the manifest loads); throws OutsideProviderError
when no <ConsoleProvider> is above the caller.
Parameters
Section titled “Parameters”deviceId
Section titled “deviceId”DeviceId | null | undefined
the device to read, or null/undefined for “no device”
(holds the inert pending state, no fetch).
options?
Section titled “options?”optional { enabled }; enabled: false holds pending and
issues no manifest fetch (e.g. off-screen FlatList rows). Defaults to
true.
Returns
Section titled “Returns”a QueryResult of FirmwareStatus
extended with refresh().
Example
Section titled “Example”const fw = useFirmwareStatus(deviceId);if (fw.status === 'success' && fw.data.updateAvailable) { // render an update banner with fw.data.releaseNotes}