kotlin-homie / org.homieiot / device

device

fun device(id: String, name: String = id, init: Device.() -> Unit): Device

Create a new device instance

Commonly, a device represents a physical piece of hardware. For example, an Arduino/ESP8266 or a coffee machine.

Parameters

id - Each device must have a unique device ID which adheres to the homie id convention

name - Friendly name of the device

init - Add the nodes within the init block