SensorConnection

Represents a connection to an Efento sensor (software version 7 and later).

Properties

Link copied to clipboard
abstract val commands: SensorCommands

Commands for Efento sensors

Link copied to clipboard
abstract var encryptionKey: String

Encryption key which is used to exchange data with encrypted sensor.

Link copied to clipboard
abstract val isConnected: Boolean

Checks if the connection is initialized and established. Returns true if the connection is active, false otherwise.

Link copied to clipboard

Notifications sent by sensor

Link copied to clipboard
abstract var resetCode: Int

Device reset code is required for running some commands . Can be found on a device's sticker.

Functions

Link copied to clipboard
abstract suspend fun connect()

Establishes and initializes a new connection. Safe to call when already connected — returns immediately without reconnecting.

Link copied to clipboard
abstract suspend fun disconnect()

Terminates the existing connection. Safe to call when already disconnected — returns immediately without throwing.