Add MQTT Subscribe on Page Open

  • Go to the “Properties” panel on the right sidebar in the UI Design module.
  • Add Subscribe action so that when the user enters the page, he/she is automatically subscribed to a specific topic. In this example, “kuika/test” is used as the topic.
  • With this subscribe action, the user is authorized to see the messages coming to the specified Topic.
  • You can make additions to the Action section. For example:some text
    • Add a Notify action to show the message from the “ADD ACTION” button on the right sidebar.
    • To make the message appear in a Text Input component, use the Set Value Of action to print the message into the Text Input.

Add the Publish Action to a Button

  • Add a “Button” from the Elements panel on the left side and connect the Publish action to this button.
  • With the Publish action, you can send a message to the Topic you specify. For example, when you send a message to the user/guide Topic, all users subscribed to this Topic will see the message.