Webportal v1

embedded apps

API Reference - WebPortal.MQTT.publish

WebPortal.MQTT.publish

Type Method
Min Privacy Full

WebPortal.MQTT.publish

Description Publish in a MQTT topic.
Parameter Type Description Required
type String Name of the API WebPortal.MQTT.publish Yes
payload String Content of the MQTT message Yes
subtopic String Path of the subtopic to publish in. Leading ‘/’ not mandatory. No

Response Events:

Example

1
2
3
4
5
6
7
window.parent.postMessage(
{
  'type':'WebPortal.MQTT.publish',
  'payload':'Hello World'
  'subtopic':'my/sub/topic',
}
, '*');