Difference between revisions of "Mqtt received message on subscribed topic"

From wiki.netio-products.com
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:Script trigger Mqtt received message on subscribed topic}} Triggered when message is published on subscribed topic. Arguments are stored in table <code>event.ar...")
 
(No difference)

Latest revision as of 17:22, 11 July 2019

Triggered when message is published on subscribed topic. Arguments are stored in table event.args

Arguments

  • payload published message
  • topic topic name

Print arguments

-- print all arguments
for i, v in pairs(event.args) do
  logf("%s: %s",tostring(i),tostring(v))
end