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:publish () Build and publish the v5 device
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

Returns:

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