KtorHttpLoxoneClient

Constructors

Link copied to clipboard
constructor(endpoint: LoxoneEndpoint, authentication: LoxoneAuth = LoxoneAuth.None)

Functions

Link copied to clipboard
open suspend override fun <RESPONSE : LoxoneResponse> call(command: Command<RESPONSE>): RESPONSE
Link copied to clipboard
inline suspend fun <VAL : LoxoneMsgVal> LoxoneClient.callForMsg(command: LoxoneMsgCommand<VAL>): VAL
Link copied to clipboard
open suspend override fun callRaw(command: String): String
Link copied to clipboard
open suspend override fun callRawForData(command: String): ByteArray

Call given command and return response as raw data. Can be used to retrieve files, icons, etc.

Link copied to clipboard
open suspend override fun close()
Link copied to clipboard
open suspend override fun postRaw(command: String, payload: ByteArray): String

Sends given payload to command's endpoint using HTTP POST to Loxone and returns the response body as text.