GatewayCommands

interface GatewayCommands

Functions

Link copied to clipboard
abstract suspend fun deleteCustomHeaders(updateProgress: suspend (progress: Progress) -> Unit = {})

Delete custom headers set in the gateway. After this operation the gateway will restart.

Link copied to clipboard
abstract suspend fun deleteUserCertificate(updateProgress: suspend (progress: Progress) -> Unit = {})

Delete user certificate. After this operation the gateway will restart.

Link copied to clipboard
abstract suspend fun enterBootloader(bootloaderEntryCode: Long, updateProgress: suspend (progress: Progress) -> Unit = {})

Enter gateway bootloader. If bootloader entry code is incorrect gateway will reboot.

Link copied to clipboard
abstract suspend fun exitConfigurationMode(updateProgress: suspend (progress: Progress) -> Unit = {})

Exit gateway configuration mode

Link copied to clipboard
abstract suspend fun getConfiguration(updateProgress: suspend (progress: Progress) -> Unit = {}): GatewayConfiguration

Get configuration of the gateway

Link copied to clipboard
abstract suspend fun getCustomEndpoint(type: GatewayEndpoint.Type, updateProgress: suspend (progress: Progress) -> Unit = {}): GatewayEndpoint

Get custom gateway endpoint.

Link copied to clipboard
abstract suspend fun getCustomHeaders(updateProgress: suspend (progress: Progress) -> Unit = {}): List<GatewayHttpHeader>

Get custom headers set in the gateway

Link copied to clipboard
abstract suspend fun getDeviceInfo(updateProgress: suspend (progress: Progress) -> Unit = {}): GatewayDeviceInfo

Get device information

Link copied to clipboard
abstract suspend fun getSensorList(updateProgress: suspend (progress: Progress) -> Unit = {}): GatewaySensorList

Get list of sensors detected by gateway

Link copied to clipboard
abstract suspend fun getSoftwareVersion(updateProgress: suspend (progress: Progress) -> Unit = {}): SoftwareVersion

Get software version of the gateway

Link copied to clipboard
abstract suspend fun getUserCertificate(updateProgress: suspend (progress: Progress) -> Unit = {}): String?

Get user certificate as PEM or null if it is not set

Link copied to clipboard
abstract suspend fun manageSensor(sensorMacAddress: BluetoothMacAddress, action: GatewayDetectedSensorAction, updateProgress: suspend (progress: Progress) -> Unit = {})

Manage sensor detected by a gateway

Link copied to clipboard
abstract suspend fun pingNotification(number: Long, updateProgress: suspend (progress: Progress) -> Unit = {})

Send a ping number to a gateway. The number will be send back via gateway notification channel.

Link copied to clipboard
abstract suspend fun setConfiguration(configuration: GatewayConfiguration, updateProgress: suspend (progress: Progress) -> Unit = {})

Set configuration of the gateway

Link copied to clipboard
abstract suspend fun setCustomEndpoint(endpoint: GatewayEndpoint, updateProgress: suspend (progress: Progress) -> Unit = {})

Set custom gateway endpoint.

Link copied to clipboard
abstract suspend fun setCustomHeaders(headers: List<GatewayHttpHeader>, updateProgress: suspend (progress: Progress) -> Unit = {})

Set custom headers in the gateway

Link copied to clipboard
abstract suspend fun setUserCertificate(certificate: String, updateProgress: suspend (progress: Progress) -> Unit = {})

Set user certificate. After this operation the gateway will restart.

Link copied to clipboard
abstract suspend fun triggerHeartbeatCommunication(updateProgress: suspend (progress: Progress) -> Unit = {})

Trigger a heartbeat communication on the gateway. This will initiate communication with the server.