Device
Defined in: console-sdk/src/device/deviceModel.ts:128
The unified device record (SDK_PLAN.md §3.3.2): discovered, saved, and
connected are facets of this ONE type, not separate lists. useDevices()
returns readonly Device[]; every per-device hook is keyed by
Device.id. Single-console usage is the N=1 case of the same model.
Properties
Section titled “Properties”autoReconnect
Section titled “autoReconnect”autoReconnect:
boolean
Defined in: console-sdk/src/device/deviceModel.ts:154
Persisted per-device auto-reconnect policy.
batteryPercent
Section titled “batteryPercent”batteryPercent:
number|null
Defined in: console-sdk/src/device/deviceModel.ts:190
Last-known battery percentage; null if unknown.
bleName
Section titled “bleName”bleName:
string
Defined in: console-sdk/src/device/deviceModel.ts:136
Advertised BLE name, e.g. 'ROGUE ECHO BIKE 123456'.
connection
Section titled “connection”connection:
ConnectionState
Defined in: console-sdk/src/device/deviceModel.ts:171
Connection facet — the state machine in §3.4.
consoleId
Section titled “consoleId”consoleId:
string|null
Defined in: console-sdk/src/device/deviceModel.ts:147
User-visible 6-digit console id, derived from the advertised name and
verified against the DIS serial on connect; null when the name carries
none.
displayName
Section titled “displayName”displayName:
string
Defined in: console-sdk/src/device/deviceModel.ts:141
Human-friendly name, e.g. 'Echo Bike' — the ONE classification impl and
ONE naming impl.
displayUnits
Section titled “displayUnits”displayUnits:
DisplayUnits|null
Defined in: console-sdk/src/device/deviceModel.ts:195
Reactive console display-unit preferences; set via
useConsoleControls(id).setDisplayUnits. null until read on connect.
firmware
Section titled “firmware”firmware: {
gd:string;rf:string|null; } |null
Defined in: console-sdk/src/device/deviceModel.ts:188
Two-MCU firmware readout (gd general, rf radio), populated during
connection setup and retained while disconnected; null if never read.
id:
DeviceId
Defined in: console-sdk/src/device/deviceModel.ts:130
Stable identifier; every per-device structure in the SDK is keyed by it.
isConnected
Section titled “isConnected”isConnected:
boolean
Defined in: console-sdk/src/device/deviceModel.ts:176
Derived convenience: true while a session survives a blip —
connection.status is 'ready', 'reconnecting', or 'updating'.
lastConnectedAt
Section titled “lastConnectedAt”lastConnectedAt:
number|null
Defined in: console-sdk/src/device/deviceModel.ts:156
Epoch ms of the most recent successful connection; null if never.
modality
Section titled “modality”modality:
Modality|null
Defined in: console-sdk/src/device/deviceModel.ts:134
Exercise modality; null when a console reports no modality.
model:
DeviceModel
Defined in: console-sdk/src/device/deviceModel.ts:132
Concrete hardware model ('echo-rhino' is first-class).
presence
Section titled “presence”presence:
object
Defined in: console-sdk/src/device/deviceModel.ts:161
Discovery facet — SDK-owned 15 s scan TTL; consumers never run timers.
available
Section titled “available”available:
boolean
Seen within the scan TTL.
lastSeenAt
Section titled “lastSeenAt”lastSeenAt:
number|null
Epoch ms of the most recent advertisement; null if never seen.
rssi:
number|null
Signal strength of the most recent advertisement; null if unknown.
saved:
boolean
Defined in: console-sdk/src/device/deviceModel.ts:150
Persistence facet — whether the device is a saved device.
savedAt
Section titled “savedAt”savedAt:
number|null
Defined in: console-sdk/src/device/deviceModel.ts:152
Epoch ms the device was first saved; null when not saved.
serial
Section titled “serial”serial:
string|null
Defined in: console-sdk/src/device/deviceModel.ts:183
Last-known DIS serial, populated during connection setup and retained
while disconnected so list rows render without narrowing; null if never
read.