function devices.system.MqttPublish()

From wiki.netio-products.com
Revision as of 13:50, 11 July 2019 by Phrych (talk | contribs) (Created page with "{{DISPLAYTITLE:function devices.system.MqttPublish()}} Publish a message to MQTT topic <i>nil</i> <b>devices.system.MqttPublish</b>(<i>table</i> <code>config</code>) === Pa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Publish a message to MQTT topic

nil devices.system.MqttPublish(table config)

Parameters

table config{topic}
  • string topic name of topic
  • string payload message to be sent

Return value

nil

Usage

-- send information about first output on topic luaHole
local topic = "luaHole"
local message = devices.system["output" .. 1 .. "_state"]
devices.system.MqttPublish{topic=topic,payload=string.format(message)}


Requirements

Netio FirmWare 3.3.1+