Skip to content

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.

DeviceId | null | undefined

the device to read, or null/undefined for “no device” (holds the inert pending state, no fetch).

FirmwareStatusOptions

optional { enabled }; enabled: false holds pending and issues no manifest fetch (e.g. off-screen FlatList rows). Defaults to true.

FirmwareStatusResult

a QueryResult of FirmwareStatus extended with refresh().

const fw = useFirmwareStatus(deviceId);
if (fw.status === 'success' && fw.data.updateAvailable) {
// render an update banner with fw.data.releaseNotes
}