Class Device

Device class that represents a Homie 4 device discovered, and mirrors it to Homie v5.

Methods

device:new (opts) Creates a new device instance.
device:start () Starts the device.


Methods

device:new (opts)
Creates a new device instance.

Parameters:

  • opts options table
    • log logger the logger instance to use.
    • id string MQTT device id of the device to create
    • mqtt mqtt-client the mqtt client to use
    • domain4 string the Homie domain for v4
    • domain5 string the Homie domain for v5
    • parent_id string the parent device id

Returns:

    Device the newly created instance.
device:start ()
Starts the device. Will subscribe to the device topics (v4) to build the description, and start.
generated by LDoc 1.5.0