TelemetryApi

interface TelemetryApi(source)

Telemetry RPCs and observation.

Each requestX method sends a unicast Telemetry packet on TELEMETRY_APP with want_response = true to node and waits for the device's reply. observe returns a cold Flow of every Telemetry packet observed for a given node — including unsolicited periodic broadcasts.

Acquired via RadioClient.telemetry. Available only while the client is connected.

Since

0.1.0

Functions

Link copied to clipboard
abstract fun observe(node: NodeId): Flow<Telemetry>

Cold flow of every Telemetry packet observed for node. The flow never completes organically — collect inside a launch { … } and cancel when done.

Link copied to clipboard
abstract suspend fun requestAirQuality(node: NodeId = NodeId.LOCAL): AdminResult<AirQualityMetrics>

Request the latest AirQualityMetrics from node.

Link copied to clipboard
abstract suspend fun requestDevice(node: NodeId = NodeId.LOCAL): AdminResult<DeviceMetrics>

Request the latest DeviceMetrics from node.

Link copied to clipboard
abstract suspend fun requestEnvironment(node: NodeId = NodeId.LOCAL): AdminResult<EnvironmentMetrics>

Request the latest EnvironmentMetrics from node.

Link copied to clipboard
abstract suspend fun requestHealth(node: NodeId = NodeId.LOCAL): AdminResult<HealthMetrics>

Request the latest HealthMetrics from node (heart rate, SpO2, temperature).

Link copied to clipboard
abstract suspend fun requestHost(node: NodeId = NodeId.LOCAL): AdminResult<HostMetrics>

Request the latest HostMetrics from node (CPU, memory, disk usage on Linux hosts).

Link copied to clipboard
abstract suspend fun requestLocalStats(): AdminResult<LocalStats>

Request the local node's LocalStats (mesh-wide stats sourced from this device).

Link copied to clipboard
abstract suspend fun requestPower(node: NodeId = NodeId.LOCAL): AdminResult<PowerMetrics>

Request the latest PowerMetrics from node.

Link copied to clipboard
abstract suspend fun requestTrafficManagement(node: NodeId = NodeId.LOCAL): AdminResult<TrafficManagementStats>

Request the latest TrafficManagementStats from node (packet counts, duty cycle).