interface UnitController
Controller for a IotUnit.
sealed class Status
Base class for the possible statuses of the UnitController |
abstract fun action(requests: List<IotDeviceRequest>): LiveData<SimpleResponse<Void>>
Execute the specific action to the device with optional parameters. The action depends on the unit type, e.g. Doors and Lockers Box action is open |
|
abstract fun getDeviceState(iotDeviceIds: List<String>): LiveData<SimpleResponse<List<IotDevice>>>
Get state of the requested IotDevice IDs |
|
abstract fun getStatus(): LiveData<Status>
|
|
abstract fun getUnits(availability: Availability, proximity: Sorting, type: Type? = null): LiveData<SimpleResponse<List<IotUnit>>>
Get a LiveData for all the IotUnit the given the parameters. This data should be observed for as long as needed as calls to SmartWorkspaceSdk.refresh will be update it. |
|
abstract fun open(openable: Openable, cancellationSignal: CancellationSignal?): LiveData<Response<IotUnit, OpeningProgress>>
Open the specified Openable. Some IotUnit must be booked before they can be opened. See BookingManager. Returns a LiveData with the status of the operation. |