Sensorberg Smart Spaces SDK for Android / com.sensorberg.smartworkspace.sdk.model / IotUnit

IotUnit

data class IotUnit : Openable

Class that represents an IoT device that can be interacted with. e.g. A door or locker box.

Types

HardwareType

enum class HardwareType

Type

enum class Type

Constructors

<init>

IotUnit(id: String, grouping: String, displayName: String, type: Type, hardwareType: HardwareType, bookable: Boolean, unitId: String, actuatorId: String, actuatorType: String, action: String, connections: List<Connector>, tap: TapParams? = null)

Class that represents an IoT device that can be interacted with. e.g. A door or locker box.

Properties

bookable

val bookable: Boolean

If this unit can be booked

displayName

val displayName: String

The human-readable display name of this unit. (e.g. Meeting room 2, or #1)

grouping

val grouping: String

The name of a grouping that this unit is contained (e.g. First Floor, Locker 1)

hardwareType

val hardwareType: HardwareType

The type of hardware used on this unit. (e.g. Sensorberg gateway or blue-id)

id

val id: String

The unique ID of this IoT unit

type

val type: Type

The type of this unit. (e.g; door, or locker box)

Functions

debugGetBlueIdDetails

fun debugGetBlueIdDetails(callback: (String?, String?, Int) -> Unit, onFail: (String) -> Unit): Unit

Debug mode only. Do not use this method for normal user operation. The callback parameters are (in order): hardware version, firmware version, battery status

isNearby

fun isNearby(): Boolean

toString

fun toString(): String