{"id":3356,"date":"2026-11-17T18:42:51","date_gmt":"2026-11-17T10:42:51","guid":{"rendered":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/p5hmi-fvd-en-14\/"},"modified":"2026-11-17T18:42:51","modified_gmt":"2026-11-17T10:42:51","slug":"p5hmi-fvd-en-14","status":"publish","type":"post","link":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/p5hmi-fvd-en-14\/","title":{"rendered":"Chapter 14 MQTT"},"content":{"rendered":"<p>MQTT is a kind of communication protocol designed for IoT with simple and slight features, it\u2019s suitable with limited hardware and internet bandwidth environment, can reach the needs of remote monitor and data exchange.<\/p>\n<p>The mechanism of message delivery includes publish and subscribe modes, and each of the message needs a topic name to be identified, such as Temperature. Client side includes Publisher and Subscriber, Publisher publish message with topic, Subscriber subscribe topic; Server side is the Broker, charge for receive the message from Publisher then transfer to Subscriber.<\/p>\n<p>When enable MQTT function on HMI, it can play the above mentioned three roles: Publisher, Subscriber and Broker. HMI can publish the data that in the HMI and PLC register address to Broker via MQTT, also can connect with Broker to get the Subscriber\u2019s data. HMI has built-in Broker and no need to search another Broker tool.<\/p>\n<p>This chapter will describe the MQTT settings.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-001.png\" \/><\/p>\n<p>Figure 181 MQTT application schematic diagram<\/p>\n<h3>14.1 Server Settings<\/h3>\n<p>The MQTT function is in\u3010Project Explorer\u3011\u3010Functions\u3011,\u3010Broker\u3011paging is used to set MQTT server (Broker), figure as below:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-002.png\" \/><\/p>\n<p>Figure 182\u3010MQTT\u3011\u3010Broker\u3011setting page<\/p>\n<p>Table 91\u3010MQTT\u3011\u3010Broker\u3011setting properties<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Field<\/p>\n<\/td>\n<td>\n<p>Description<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010Enable MQTT\u3011<\/p>\n<\/td>\n<td>\n<p>Enable to use\u3010MQTT\u3011. If want to use MQTT, enable the function to setup.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010Basic\u3011<\/p>\n<\/td>\n<td>\n<p>\u3010Connection Name\u3011<\/p>\n<p>Set the connection name, can be used as a description.<\/p>\n<p>\u3010Host (IP or Domain Name)\u3011<\/p>\n<p>Set the address of Broker, can field up IP or domain name.<\/p>\n<p>Default is 127.0.0.1.<\/p>\n<p>(Note: If specified local side 127.0.0.1, means to connect the HMI built-in Broker, needs to check\u3010Enable built-in Broker in HMI\u3011to connect successfully.)<\/p>\n<p>\u3010Port\u3011<\/p>\n<p>Set the Broker\u2019s port. Default is 1883.<\/p>\n<p>\u3010Enable built-in Broker in HMI\u3011<\/p>\n<p>Decide whether to enable HMI built-in Broker, if enabled,  the link limitations are1024, IP and Port will automatically change to default 127.0.0.1 and 1883.<\/p>\n<p>\u3010MQTT Version\u3011<\/p>\n<p>MQTT communication protocol version.<\/p>\n<p>\u3010Client ID\u3011<\/p>\n<p>Client-specific ID, can customized or use a special code starting with % to form a unique ID:<\/p>\n<p>%1: HMI name<\/p>\n<p>%2: Random code<\/p>\n<p>\uff05\uff05: Character%<\/p>\n<p>(Note: if use the same Client ID to connect with the same Broker may cause identification error and disconnection.)<\/p>\n<p>\u3010Keep Alive Timer\u3011<\/p>\n<p>Indicates the maximum time interval for the server to receive messages from the client. If the server does not receive a message from the client within one and a half of the connection period, it will automatically disconnect from the client. By the unit of second.<\/p>\n<p>\u3010Clean Session\u3011<\/p>\n<p>The settings in the broker will all be cleared after offline, includes the subscribe topics.<\/p>\n<p>\u3010Automatic Connection\u3011<\/p>\n<p>MQTT will automatically connected when turn on the HMI.<\/p>\n<p>\u3010Reconnection\u3011<\/p>\n<p>Whether to reconnect automatically if MQTT disconnect.<\/p>\n<ol>\n<li>\u3010Interval\u3011<\/li>\n<\/ol>\n<p>Time interval for reconnection, by the unit of second. <\/p>\n<ol>\n<li>\u3010Times\u3011<\/li>\n<\/ol>\n<p>Reconnection times, set \u2018\u2019-1\u2019\u2019 as unlimited times.<\/p>\n<p>(Note: this reconnection mechanism will not be enabled when the control address for control disconnection is used.)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010Credential\u3011<\/p>\n<\/td>\n<td>\n<p>Enter the username and password when the connected broker has set credential. <\/p>\n<p>\u3010Username\u3011Credential user name.<\/p>\n<p>\u3010Password\u3011Credential password.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010TLS\/SSL\u3011<\/p>\n<\/td>\n<td>\n<p>If the connected broker has use TLS\/SSL encrypted message to transfer, user can import the certificate file here.<\/p>\n<p>\u3010TLS Version\u3011<\/p>\n<p>TLS version.<\/p>\n<p>\u3010Server Certificate\u3011<\/p>\n<p>Use server side to certificate. <\/p>\n<p>\u3010Import\u3011the need of certification.<\/p>\n<p>\u3010Client Certificate\u3011<\/p>\n<p>Use client side to certificate.<\/p>\n<p>\u3010Import\u3011the need of certificate file and private key.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>14.2 Topic Settings<\/h3>\n<p>The MQTT function is in\u3010Project Explorer\u3011\u3010Functions\u3011, check the checkbox\u3010Enable MQTT\u3011then will appear the\u3010Topic\u3011paging.\u3010Topic\u3011is divided into\u3010Topic Publish\u3011and\u3010Topic Subscribe\u3011. Click\u3010Add\u3011to add new topic, click\u3010Delete\u3011to delete the selected topic, click\u3010Edit\u3011or double click the selected topic to edit, if there is an existing item in the topic list, click\u3010Export\u3011to export the topics into specific format of CSV file, click\u3010Import\u3011to import specific format of CSV file to update the topics directly. There is an unique ID in the left side of the list, is for topic\u2019s ID.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-003.jpg\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-004.jpg\" \/><\/p>\n<p>Figure 183\u3010MQTT\u3011\u3010Topic\u3011setting page<\/p>\n<p>The following is a detailed description of the settings for\u3010Topic Publish\u3011and\u3010Topic Subscribe\u3011.<\/p>\n<h4>14.2.1 \u3010Topic Publish\u3011<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-005.png\" \/><\/p>\n<p>Figure 184\u3010MQTT\u3011\u3010Topic Publish\u3011setting page<\/p>\n<p>Table 92\u3010MQTT\u3011\u3010Topic Publish\u3011properties setting<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Field<\/p>\n<\/td>\n<td>\n<p>Description<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010Basic\u3011<\/p>\n<\/td>\n<td>\n<p>\u3010Name\u3011<\/p>\n<p>Set the topic name, can be used as a description.<\/p>\n<p>\u3010Topic\u3011<\/p>\n<p>The topic used by MQTT to send messages.<\/p>\n<p>(Note: #,+ are wildcard character, cannot be used)<\/p>\n<p>\u3010Variable\u3011<\/p>\n<p>When selected, you can dynamically adjust the theme.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-006.png\" \/><\/p>\n<p>\u3010Address\u3011<\/p>\n<p>When selected, you can dynamically adjust the theme.<\/p>\n<p>Note: If both \u201cVariable\u201d and \u201cAddress\u201d options are selected,<br \/>the message replacement will follow this order:<br \/>The entire message will first be replaced with the string read from the \u201cAddress\u201d,<br \/>and then variable tags will be substituted within that string.<\/p>\n<p>\u3010Send Mode\u3011<\/p>\n<ul>\n<li>\u3010Period\u3011<\/li>\n<\/ul>\n<p>Send messages periodically, can set the interval times in seconds. <\/p>\n<ul>\n<li>\u3010 Value Changed \u3011<\/li>\n<\/ul>\n<p>The message is sent only when the value of a data item changes.<br \/>When using this option, you can enable \u201cTriggered by value change\u201d for individual data items.<br \/>This will only send messages for items whose values have changed.<br \/>If an item is not checked, it will still be sent along with other checked items when any of them is triggered. <\/p>\n<ul>\n<li>\u3010Control Bit\u3011<\/li>\n<\/ul>\n<p>The message is sent when the specified bit transitions from OFF to ON. <\/p>\n<p>\u3010Retain\u3011<\/p>\n<p>Determine whether the MQTT message should keep in the server. Check this option as true then the server will retain this topic message. If there is new subscriber or the previous disconnected subscribers, will receive the latest remain message.<\/p>\n<p>\u3010QoS\u3011<\/p>\n<p>Set the QoS (Quality of Service) of MQTT, divided in three level: <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Level<\/p>\n<\/td>\n<td>\n<p>Description<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>The message will only send once, no guaranteed of delivery, will not be repeated.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>The message will deliver at least once, guarantee delivery, might repeated. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>The message delivered once, guaranteed delivery, will not be repeated.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u3010Data Format\u3011<\/p>\n<p>The message content of each topic is composed of the value of the data item address, there are 3 formats as follows:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-007.png\" \/><\/p>\n<ol>\n<li>\u3010JSON\u3011<\/li>\n<\/ol>\n<p>{<\/p>\n<p>  &quot;d&quot;: {<\/p>\n<p>    &quot;DataItem0&quot;: [true],<\/p>\n<p>    &quot;DataItem1&quot;: [810],<\/p>\n<p>    &quot;DataItem2&quot;: [1.7899999618530273],<\/p>\n<p>    &quot;DataItem3&quot;: [&quot;love&quot;]<\/p>\n<p>  },<\/p>\n<p>  &quot;error&quot;: [],<\/p>\n<p>  &quot;ts&quot;: &quot;2019-06-18T10:55:41.491&quot;<\/p>\n<p>}<\/p>\n<ol>\n<li>\u3010Raw Data\u3011<\/li>\n<\/ol>\n<p>01 2a 03 b8 1e e5 3f 6c 6f 76 65<\/p>\n<p>(Note: In order to exchange data successfully, the format and data item settings for publish and subscribe must be the same.)<\/p>\n<ol>\n<li>\u3010Custom\u3011<\/li>\n<\/ol>\n<p>      Users can customize their own publish messages. The variable keyword indicates DataItem Value \u201c%n\u201d.<\/p>\n<p>Example figure as following, and the right side shows the custom message result.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-008.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010DataItem Setting\u3011<\/p>\n<\/td>\n<td>\n<p>\u3010No. of DataItems\u3011<\/p>\n<p>Set the numbers of data items for this topic.<\/p>\n<p>\u3010Address Type\u3011<\/p>\n<ol>\n<li>\u3010Random\u3011<\/li>\n<\/ol>\n<p>Users can set the address of each data item.<\/p>\n<ol>\n<li>\u3010Continuous\u3011<\/li>\n<\/ol>\n<p>Only the first item can set the address, the other item address will automatically generate, user cannot modify. <\/p>\n<p>The following is the setting description of the data item.<\/p>\n<p>\u3010Name\u3011<\/p>\n<p>DataItem name cannot be blank and each of them should be unique.<\/p>\n<p>\u3010Data Type\u3011<\/p>\n<p>\u3010Bit\u3011,\u301016Bit-BCD\u3011,\u301016Bit-INT\u3011,\u301016Bit-UINT\u3011,\u301032Bit-BCD\u3011,\u301032Bit-INT\u3011,\u301032Bit-UINT\u3011,\u301032Bit-FLOAT\u3011,\u3010Ascii-String\u3011can select.<\/p>\n<p>\u3010Address\u3011<\/p>\n<p>According to data type, user can set each of the data item address. <\/p>\n<p>\u3010Length\u3011<\/p>\n<p>If the data type is 16-bit then will occupy 1 word, 32-bit will occupy 2 words; if use Ascii-String, user can decide to use how many words. Each word can contain 2 characters.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h4>14.2.2 \u3010Topic Subscribe\u3011<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-009.png\" \/><\/p>\n<p>Figure 185\u3010MQTT\u3011\u3010Topic Subscribe\u3011setting page<\/p>\n<p>Table 93\u3010MQTT\u3011\u3010Topic Subscribe\u3011properties setting<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Field<\/p>\n<\/td>\n<td>\n<p>Description<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010Basic\u3011<\/p>\n<\/td>\n<td>\n<p>\u3010Name\u3011<\/p>\n<p>Set the topic name, can be used as a description.<\/p>\n<p>\u3010Topic\u3011<\/p>\n<p>The topic used by MQTT to send messages.<\/p>\n<p>(Note: #,+ are wildcard character, cannot be used)<\/p>\n<p>\u3010QoS\u3011<\/p>\n<p>Set the QoS (Quality of Service) of MQTT, divided in three level: <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Level<\/p>\n<\/td>\n<td>\n<p>Description<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>The message will only send once, no guaranteed of delivery, will not be repeated.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>The message will deliver at least once, guarantee delivery, might repeated. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>The message delivered once, guaranteed delivery, will not be repeated.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>\u3010Data Format\u3011<\/p>\n<p>The message content of each topic is composed of the value of the data item address, there are two formats as follows:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-010.png\" \/><\/p>\n<ol>\n<li>\u3010JSON\u3011<\/li>\n<\/ol>\n<p>{<\/p>\n<p>  &quot;d&quot;: {<\/p>\n<p>    &quot;DataItem0&quot;: [true],<\/p>\n<p>    &quot;DataItem1&quot;: [810],<\/p>\n<p>    &quot;DataItem2&quot;: [1.7899999618530273],<\/p>\n<p>    &quot;DataItem3&quot;: [&quot;love&quot;]<\/p>\n<p>  },<\/p>\n<p>  &quot;error&quot;: [],<\/p>\n<p>  &quot;ts&quot;: &quot;2019-06-18T10:55:41.491&quot;<\/p>\n<p>}<\/p>\n<ol>\n<li>\u3010Raw Data\u3011<\/li>\n<\/ol>\n<p>01 2a 03 b8 1e e5 3f 6c 6f 76 65<\/p>\n<p>(Note: In order to exchange data successfully, the format and data item settings for publish and subscribe must be the same.)<\/p>\n<ol>\n<li>\u3010Custom\u3011<\/li>\n<\/ol>\n<p>When using a customized subscription format, please note that it needs to be the same as that of the publisher to receive complete data, otherwise there will be data errors.<\/p>\n<p>(Note: The data format and data item settings of publish and subscribe must be the same to data transmission successfully)<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u3010DataItem Setting\u3011<\/p>\n<\/td>\n<td>\n<p>\u3010No. of DataItems\u3011<\/p>\n<p>Set the numbers of data items for this topic.<\/p>\n<p>\u3010Address Type\u3011<\/p>\n<ol>\n<li>\u3010Random\u3011<\/li>\n<\/ol>\n<p>Users can set the address of each data item.<\/p>\n<ol>\n<li>\u3010Continuous\u3011<\/li>\n<\/ol>\n<p>Only the first item can set the address, the other item address will automatically generate, user cannot modify. <\/p>\n<p>The following is the setting description of the data item.<\/p>\n<p>\u3010Name\u3011<\/p>\n<p>DataItem name cannot be blank and each of them should be unique.<\/p>\n<p>\u3010Data Type\u3011<\/p>\n<p>\u3010Bit\u3011,\u301016Bit-BCD\u3011,\u301016Bit-INT\u3011,\u301016Bit-UINT\u3011,\u301032Bit-BCD\u3011,\u301032Bit-INT\u3011,\u301032Bit-UINT\u3011,\u301032Bit-FLOAT\u3011,\u3010Ascii-String\u3011can select.<\/p>\n<p>\u3010Address\u3011<\/p>\n<p>According to data type, user can set each of the data item address. <\/p>\n<p>\u3010Length\u3011<\/p>\n<p>If the data type is 16-bit then will occupy 1 word, 32-bit will occupy 2 words; if use Ascii-String, user can decide to use how many words. Each word can contain 2 characters.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h5>14.2.2.1  Custom Subscription Format Examples<\/h5>\n<p>Because each project has different content, a fixed format cannot handle all situations. In such cases, a custom format must be used.<br \/>When configuring a custom format, you need to pay attention to the data type of the reading items, and the format must match the publisher side. Any differing parts should be replaced with variables.<\/p>\n<p><strong>Example 1<\/strong><br \/>Publishe content<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>{<\/p>\n<p>flour = &quot;300&quot;,<\/p>\n<p>oil = &quot;115.5&quot;,<\/p>\n<p>apple= &quot;200&quot;<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Subscribe settings<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-011.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>{<\/p>\n<p>flour = &quot;%1&quot;,<\/p>\n<p>oil = &quot;%2&quot;,<\/p>\n<p>apple= &quot;%3&quot;<\/p>\n<p>}<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Replace the variable portions with <strong>%n<\/strong>, and the data can then be read in the custom format.<\/p>\n<p><strong>Example 2<\/strong><br \/>Publishe content<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>{flour,oil,apple = &quot;300 115.5 200&quot;}<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Subscribe settings<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-012.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>{flour,oil,apple = &quot;%1 %2 %3&quot;}<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Sometimes the publisher data may appear disorganized, but as long as the format matches, the values can still be read correctly.<\/p>\n<h3>14.3 Address Setting<\/h3>\n<p>The MQTT function is in\u3010Project Explorer\u3011\u3010Functions\u3011, check the checkbox\u3010Enable MQTT\u3011then will appear the\u3010Address\u3011paging. Use\u3010Status Address\u3011to monitor the MQTT connected status and use\u3010Control Address\u3011to control the connection and broker settings of the MQTT. Figure as below:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-013.png\" \/><\/p>\n<p>Figure 186\u3010MQTT\u3011\u3010Address\u3011setting page<\/p>\n<p>Table 94\u3010MQTT\u3011\u3010Address\u3011properties setting<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>Field<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>Description<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u3010Status Address\u3011<\/p>\n<\/td>\n<td>\n<p>Use status address can monitor the connection status of the MQTT.<\/p>\n<p>\u3010Connection\u3011<\/p>\n<p>Set the status address of the MQTT connection. Following is the connection status definition table, also can click <img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-014.png\" \/> to view.<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>No.<\/p>\n<\/td>\n<td>\n<p>Value<\/p>\n<p>(16Bit-INT)<\/p>\n<\/td>\n<td>\n<p>Definition<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>Disable<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>Disconnected<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>Connected<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>4<\/p>\n<\/td>\n<td>\n<p>-1<\/p>\n<\/td>\n<td>\n<p>Error<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">\n<p>\u3010Control Address\u3011<\/p>\n<\/td>\n<td>\n<p>Use control address to control the connection of MQTT or the real time update the broker\u2019s setting.<\/p>\n<p>\u3010Connection\u3011<\/p>\n<p>Set the control address of the MQTT connection. Following is the control connection definition table, also can click<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-015.png\" \/>to view.<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>No.<\/p>\n<\/td>\n<td>\n<p>Value<\/p>\n<p>(16Bit-INT)<\/p>\n<\/td>\n<td>\n<p>Definition<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>0<\/p>\n<\/td>\n<td>\n<p>None<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>Disconnect<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>Connect<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>4<\/p>\n<\/td>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>Update<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>After changing the following control address related to broker, update the control address command to update the broker\u2019s setting immediately.<\/p>\n<p>\u3010Host (IP or Domain Name)\u3011<\/p>\n<p>Set the IP control address, you can set the length of the string, it will automatically calculate the length of the continuous occupation register, the string can be up to 253 words, dynamically change the IP address of the broker by changing the content of the register.<\/p>\n<p>\u3010Port\u3011<\/p>\n<p>Set the control address of the port, is control by a word, dynamically change the port by changing the content of the register.<\/p>\n<p>\u3010Client ID\u3011<\/p>\n<p>Set the control address of Client ID, you can set the length of the string, it will automatically calculate the length of the continuous occupation register, the string can be up to 23 words, dynamically change the Client ID by changing the content of the register.<\/p>\n<p>\u3010Username\u3011<\/p>\n<p>Set the control address of username, you can set the length of the string, it will automatically calculate the length of the continuous occupation register, the string can be up to 256 words, dynamically change the username by changing the content of the register.<\/p>\n<p>\u3010Password\u3011<\/p>\n<p>Set the control address of password, you can set the length of the string, it will automatically calculate the length of the continuous occupation register, the string can be up to 256 words, dynamically change the password by changing the content of the register.<\/p>\n<p>\u3010TLS\/SSL\u3011<\/p>\n<p>Set whether to enable TSL\/SSL control address, is control by a bit, dynamically decided whether to enable TSL\/SSL certificate by changing the content of the register.<\/p>\n<p>Following is the definition table, also can click<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/p5hmi-fvd-en-14\/p5hmi-fvd-en-14-016.png\" \/>to view.<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>No.<\/p>\n<\/td>\n<td>\n<p>Value<\/p>\n<p>(Bit)<\/p>\n<\/td>\n<td>\n<p>Definition<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>1<\/p>\n<\/td>\n<td>\n<p>False<\/p>\n<\/td>\n<td>\n<p>Disable<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>True<\/p>\n<\/td>\n<td>\n<p>Enable<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<h3>14.4 Tool<\/h3>\n<p>Introduce how to use MQTT related tool.<\/p>\n<h4>14.4.1 Select server (Broker)<\/h4>\n<ol>\n<li>HMI built-in broker<\/li>\n<\/ol>\n<p>To enable the built-in broker, check the checkbox\u3010Enable built-in Broker in HMI\u3011in \u3010Broker\u3011setting page, if\u3010Host (IP or Domain Name)\u3011set as local side 127.0.0.1 indicates MQTT will use the HMI built-in broker and it must check the\u3010Enable built-in Broker in HMI\u3011to connect successfully. If use the third party MQTT client program, then set the broker\u2019s IP as HMI\u2019s IP indicates to use the HMI broker to connect.<\/p>\n<ol>\n<li>Public Broker<\/li>\n<\/ol>\n<p>Enter the public broker IP or domain name in\u3010Host (IP or Domain Name)\u3011.<\/p>\n<p>For example: Use Mosquitto public test broker (<a href=\"https:\/\/test.mosquitto.org\/\">https:\/\/test.mosquitto.org\/<\/a>)<\/p>\n<ul>\n<li>Host: test.mosquitto.org<\/li>\n<li>Port: 1883<\/li>\n<\/ul>\n<ol>\n<li>Set up your own Broker<\/li>\n<\/ol>\n<p>Users can set up your own Broker.<\/p>\n<p>For example: Use Mosquitto(<a href=\"http:\/\/mosquitto.org\/download\/\">http:\/\/mosquitto.org\/download\/<\/a>), is free and open source, for detail installation and operations please refer to the website.<\/p>\n<h4>14.4.2 Client-Side Application<\/h4>\n<p>To monitor the information transmitted by MQTT, needs to use a third-party MQTT client application to connect to the selected broker and subscribe HMI\u2019s publish topic to receive the updated data. There are many free MQTT client-side applications that can be downloaded to use.<\/p>\n<p>For example: MQTT.fx (<a href=\"https:\/\/mqttfx.jensd.de\/index.php\/download\">https:\/\/mqttfx.jensd.de\/index.php\/download<\/a>)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MQTT is a kind of communication protocol designed for I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[],"class_list":["post-3356","post","type-post","status-publish","format-standard","hentry","category-en-p5hmi-fvd"],"_links":{"self":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/comments?post=3356"}],"version-history":[{"count":0,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3356\/revisions"}],"wp:attachment":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/media?parent=3356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/categories?post=3356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/tags?post=3356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}