API Reference - WebPortal.MQTT.publish
WebPortal.MQTT.publish
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:
- Webportal.MQTT.evt.messageDelivered
- Webportal.MQTT.evt.messageNotDelivered
- Webportal.MQTT.evt.messagereceived
Example
1
2
3
4
5
6
7
window.parent.postMessage(
{
'type':'WebPortal.MQTT.publish',
'payload':'Hello World'
'subtopic':'my/sub/topic',
}
, '*');