{"id":4585,"date":"2022-04-18T23:17:59","date_gmt":"2022-04-18T23:17:59","guid":{"rendered":"https:\/\/geia.ai\/?page_id=4585"},"modified":"2026-09-07T07:14:59","modified_gmt":"2026-09-07T07:14:59","slug":"mqtt","status":"publish","type":"page","link":"https:\/\/geia.ai\/de\/platform\/mqtt\/","title":{"rendered":"MQTT Documentation"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><div class=\"js-el la_row_grad\" data-la_component=\"GradientBackground\" data-grad=\"background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #DA98B4), color-stop(73%, #654EA3));background: -moz-linear-gradient(140deg,#DA98B4 0%,#654EA3 73%);background: -webkit-linear-gradient(140deg,#DA98B4 0%,#654EA3 73%);background: -o-linear-gradient(140deg,#DA98B4 0%,#654EA3 73%);background: -ms-linear-gradient(140deg,#DA98B4 0%,#654EA3 73%);background: linear-gradient(140deg,#DA98B4 0%,#654EA3 73%);\" ><\/div><div data-vc-full-width=\"true\" data-vc-full-width-temp=\"true\" data-vc-full-width-init=\"false\" class=\"vc_row wpb_row vc_row-fluid wpb_animate_when_almost_visible wpb_fadeIn fadeIn vc_row-o-full-height vc_row-o-columns-middle vc_row-flex la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e1709e2\" class=\"la-headings text-center vc_custom_1788764933859\"><h1 class=\"js-el heading-tag la-unit-responsive\" style=\"color:#ffffff\" >GEIA MQTT Documentation<\/h1><div class=\"js-el subheading-tag la-unit-responsive\" style=\"color:#ffffff\"  data-la_component=\"UnitResponsive\"  data-el_target='#la_heading_6ab2b2e1709e2 .subheading-tag'  data-el_media_sizes='{&quot;font-size&quot;:&quot;lg:22px;&quot;,&quot;line-height&quot;:&quot;&quot;}' ><p>Use MQTT Protocol for switching lights or Get live Sensor data<\/p>\n<\/div><\/div>\n<div class=\"vc_row wpb_row vc_inner vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-8\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_raw_code wpb_raw_html wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<div style=\"overflow:hidden;margin-left:auto;margin-right:auto;border-radius:10px;width:100%;max-width:669.67px;position:relative\"><div style=\"width:100%;padding-bottom:63.165439694177735%\"><\/div><iframe width=\"669.67\" height=\"423\" title=\"\" src=\"https:\/\/snappify.com\/embed\/a9c99ca3-9f49-482d-a39c-6a2f6a030559?responsive=1&p=1&b=0\" allow=\"clipboard-write\" allowfullscreen=\"\" loading=\"lazy\" style=\"background:#eee;position:absolute;left:0;top:0;width:100%\" frameborder=\"0\"><\/iframe><\/div>\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><div class=\"wpb_column vc_column_container vc_col-sm-4\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_raw_code wpb_raw_html wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<div class=\"switch\">\n\t<input type=\"checkbox\" name=\"toggle\" checked>\n\t<label for=\"toggle\">\n    <i class=\"bulb\">\n      <span class=\"bulb-center\"><\/span>\n      <span class=\"filament-1\"><\/span>\n      <span class=\"filament-2\"><\/span>\n      <span class=\"reflections\">\n        <span><\/span>\n      <\/span>\n      <span class=\"sparks\">\n        <i class=\"spark1\"><\/i>\n        <i class=\"spark2\"><\/i>\n        <i class=\"spark3\"><\/i>\n        <i class=\"spark4\"><\/i>\n      <\/span>\n    <\/i>    \n  <\/label>\n<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vc_row-full-width vc_clearfix\"><\/div><div class=\"vc_row wpb_row vc_row-fluid vc_custom_1716914540286 vc_row-has-fill la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e17faf3\" class=\"la-headings text-left\"><h2 class=\"js-el heading-tag la-unit-responsive\" style=\"\" >Introduction<\/h2><div class=\"js-el subheading-tag la-unit-responsive\" style=\"\" ><p>The GEIA Grow Hub (an IoT Gateway) is a special device that bridges internal devices connected to various systems with the GEIA.AI platform. The Grow Hub MQTT API facilitates data exchange between multiple devices and the platform using a single MQTT connection. As a GEIA.AI device, the Gateway can utilize the existing MQTT Device API to report statistics, receive configuration updates, and much more.<\/p>\n<p>The API listed below is used by the GEIA.AI open-source IoT Gateway.<\/p>\n<\/div><\/div>\n<\/div><\/div><\/div><\/div><div data-vc-full-width=\"true\" data-vc-full-width-temp=\"true\" data-vc-full-width-init=\"false\" class=\"vc_row wpb_row vc_row-fluid vc_custom_1716942865529 vc_row-has-fill la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e180e4d\" class=\"la-headings text-left\"><h3 class=\"js-el heading-tag la-unit-responsive\" style=\"\" >Obtaining MQTT Access<\/h3><\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>For demo purposes, you can obtain demo access to MQTT by joining our <a href=\"https:\/\/discord.gg\/7yTnADMH4P\">developer Discord channel<\/a>, where a bot will handle the setup for you &#8211; Just send a Hello message on\u00a0 the <a href=\"https:\/\/discord.gg\/7yTnADMH4P\">#developers<\/a> channel. (Discord invite link: <a href=\"https:\/\/discord.gg\/7yTnADMH4P\">https:\/\/discord.gg\/7yTnADMH4P<\/a>).<\/p>\n<p>For live access, please contact us and provide your Master Grow Hub&#8217;s external IP or the email address you use to log in to the APP. If you don&#8217;t have the Master Grow Hub, please indicate that in your request.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div><div class=\"vc_row-full-width vc_clearfix\"><\/div><div class=\"vc_row wpb_row vc_row-fluid vc_custom_1716914540286 vc_row-has-fill la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e18285c\" class=\"la-headings text-left\"><h3 class=\"js-el heading-tag la-unit-responsive\" style=\"\" >MQTT Connect<\/h3><\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>You can connect to MQTT internally or over the internet:<\/p>\n<h3>For internal connections:<\/h3>\n<ul>\n<li><strong>Hostname:<\/strong> GEIA-Gateway.local<\/li>\n<li><strong>Internal IP:<\/strong> Can be found in the APP<\/li>\n<li><strong>Port:<\/strong> 1883<\/li>\n<li><strong>WS (Un-secure Web Socket):<\/strong> 9001<\/li>\n<li><strong>WSS (Secure Web Socket):<\/strong> 9002<\/li>\n<\/ul>\n<h3>For external connections:<\/h3>\n<ul>\n<li><strong>Hostname:<\/strong> Can be found on the Grow Hub page, such as mqtt01.geia.ai<\/li>\n<li><strong>Port:<\/strong> 1883<\/li>\n<li><strong>WSS (Secure Web Socket):<\/strong> 9002<\/li>\n<\/ul>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div><div data-vc-full-width=\"true\" data-vc-full-width-temp=\"true\" data-vc-full-width-init=\"false\" class=\"vc_row wpb_row vc_row-fluid vc_custom_1716942915815 vc_row-has-fill la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e18441e\" class=\"la-headings text-left\"><h3 class=\"js-el heading-tag la-unit-responsive\" style=\"\" >MQTT Topics Structure<\/h3><\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Below is the structure of our MQTT topics. You can obtain the IDs using our <a href=\"https:\/\/geia.ai\/partner\/extend-geia-ai-rest-api-developers-diy\/rest-api-documentation-precisiion-indoor-farming\/\">Rest API<\/a>; see the<a href=\"https:\/\/geia.ai\/partner\/extend-geia-ai-rest-api-developers-diy\/rest-api-documentation-precisiion-indoor-farming\/\"> Rest API documentation<\/a> for details.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div class=\"vc_message_box vc_message_box-standard vc_message_box-rounded vc_color-info\" >\n\t<button class=\"close-button\" type=\"button\" data-close=\"\"><span aria-hidden=\"true\">&times<\/span><\/button>\n\t<div class=\"vc_message_box-icon\"><i class=\"fa fa-solid fa-circle-info\"><\/i>\n\t<\/div><p>Note: When connecting externally over the internet, <code>{location_id}<\/code> is required in the topics. If you connect locally, you must remove it, and topics will start without <code>\"\/\"<\/code>.<\/p>\n<\/div>\n<div class=\"vc_tta-container\" data-vc-action=\"collapse\"><div class=\"vc_general vc_tta vc_tta-tabs vc_tta-color-grey vc_tta-style-classic vc_tta-shape-rounded vc_tta-o-shape-group vc_tta-tabs-position-top vc_tta-controls-align-left\"><div class=\"vc_tta-tabs-container\"><ul class=\"vc_tta-tabs-list\" role=\"tablist\"><li class=\"vc_tta-tab vc_active\" data-vc-tab role=\"presentation\"><a href=\"#1716933650555-a393c1d0-33f5\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716933650555-a393c1d0-33f5\"><span class=\"vc_tta-title-text\">Actuator Topics<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716915425490-06aae0d4-fe31\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716915425490-06aae0d4-fe31\"><span class=\"vc_tta-title-text\">Sensor Topic<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716915425502-360be556-15eb\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716915425502-360be556-15eb\"><span class=\"vc_tta-title-text\">Node Topics<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716915425483-e486b23e-c6cd\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716915425483-e486b23e-c6cd\"><span class=\"vc_tta-title-text\">All Topics<\/span><\/a><\/li><\/ul><\/div><div class=\"vc_tta-panels-container\"><div class=\"vc_tta-panels\"><div class=\"vc_tta-panel vc_active\" id=\"1716933650555-a393c1d0-33f5\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716933650555-a393c1d0-33f5\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Actuator Topics<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p><strong>Actuators &amp; Switches (Normal Switch):=&gt; publish <code>1 or 0<\/code><\/strong><\/p>\n<pre>\/{location_id}\/e\/r\/{actuator_id}\/switch<\/pre>\n<p><strong>Actuator &amp; Switches Change Status Confirmation:<\/strong><\/p>\n<pre>\/{location_id}\/e\/r\/{actuator_id}\/switch\/confirm<\/pre>\n<p><strong>Enable \/ Disable Automation on actuator &amp; switches =&gt; publish For Enable: <code>1 1<\/code> or <code>1 0<\/code> And <code>0<\/code> For disable:<\/strong><\/p>\n<pre>\/{location_id}\/e\/r\/force\/{actuator_id}<\/pre>\n<p><strong>Automation switch status:<\/strong><\/p>\n<pre>\/{location_id}\/e\/r\/force\/{actuator_id}\/rstate<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716915425490-06aae0d4-fe31\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716915425490-06aae0d4-fe31\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Sensor Topic<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p><strong>Listen to Sensor values:<\/strong><\/p>\n<pre>\/{location_id}\/e\/s\/{sensor_id}<\/pre>\n<p><strong>Listen to all sensors:<\/strong><\/p>\n<pre>\/{location_id}\/e\/s\/#<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716915425502-360be556-15eb\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716915425502-360be556-15eb\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Node Topics<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p><strong>Request Node Info =&gt; publish <code>1<\/code><\/strong><\/p>\n<pre>\/{location_id}\/e\/{node_id}\/info\/request<\/pre>\n<p><strong>Listen to Node Info<\/strong><\/p>\n<pre>\/{location_id}\/e\/{node_id}\/info\/#<\/pre>\n<p><strong>Listen to Node Local IP<\/strong><\/p>\n<pre>\/{location_id}\/e\/{node_id}\/info\/localIP<\/pre>\n<p><strong>Listen to Node Uptime<\/strong><\/p>\n<pre>\/{location_id}\/e\/{node_id}\/info\/uptime<\/pre>\n<p><strong>Listen to Node WiFi Signal strength<\/strong><\/p>\n<pre>\/{location_id}\/e\/{node_id}\/info\/rssi<\/pre>\n<p><strong>Reboot Node =&gt; publish <code>1<\/code><\/strong><\/p>\n<pre>\/{location_id}\/e\/{node_id}\/reboot<\/pre>\n<p><strong>Reboot Node confirmation<\/strong><\/p>\n<pre>\/{location_id}\/e\/{node_id}\/reboot\/confirm<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716915425483-e486b23e-c6cd\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716915425483-e486b23e-c6cd\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">All Topics<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p><strong>Listen to all topics:<\/strong><\/p>\n<pre>\/{location_id}\/+\/#<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vc_row-full-width vc_clearfix\"><\/div><div class=\"vc_row wpb_row vc_row-fluid vc_custom_1716914540286 vc_row-has-fill la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e194192\" class=\"la-headings text-left\"><h3 class=\"js-el heading-tag la-unit-responsive\" style=\"\" >Finding My MQTT Topics<\/h3><\/div>\n<div class=\"vc_row wpb_row vc_inner vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-8\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>You can use our <a href=\"https:\/\/geia.ai\/partner\/extend-geia-ai-rest-api-developers-diy\/rest-api-documentation-precisiion-indoor-farming\/\">Rest API<\/a>, such as <a href=\"https:\/\/geia.ai\/en\/partner\/extend-geia-ai-rest-api-developers-diy\/rest-api-documentation-precisiion-indoor-farming\/#jump-4Sensors-4312GetAllSensorsperDashboard\">Get Sensors<\/a>, <a href=\"https:\/\/geia.ai\/en\/partner\/extend-geia-ai-rest-api-developers-diy\/rest-api-documentation-precisiion-indoor-farming\/#jump-5Actuators_28Relay_2FElectricalSocket_2Fsolenoidvalve_29-5312GetAllActuatorsperlocation\">Get Actuators<\/a>, and <a href=\"https:\/\/geia.ai\/en\/partner\/extend-geia-ai-rest-api-developers-diy\/rest-api-documentation-precisiion-indoor-farming\/#jump-35NodeDevices-356GetNodes\">Get Nodes<\/a>, to programmatically get IDs.<\/p>\n<p>Alternatively, you can find MQTT topic addresses in our APP on the Node, Sensor, or Actuator details page. See example screenshot below:<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><div class=\"wpb_column vc_column_container vc_col-sm-4\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div  class=\"wpb_single_image wpb_content_element vc_align_left wpb_content_element\">\n\t\t\n\t\t<figure class=\"wpb_wrapper vc_figure\">\n\t\t\t<div class=\"vc_single_image-wrapper   vc_box_border_grey\"><img loading=\"lazy\" decoding=\"async\" width=\"924\" height=\"902\" src=\"https:\/\/geia.ai\/wp-content\/uploads\/2024\/05\/Sensor-MQTT-TOPIC.png\" class=\"vc_single_image-img attachment-medium\" alt=\"\" title=\"Sensor--MQTT-TOPIC\" srcset=\"https:\/\/geia.ai\/wp-content\/uploads\/2024\/05\/Sensor-MQTT-TOPIC.png 924w, https:\/\/geia.ai\/wp-content\/uploads\/2024\/05\/Sensor-MQTT-TOPIC-12x12.png 12w\" sizes=\"auto, (max-width: 924px) 100vw, 924px\" \/><\/div>\n\t\t<\/figure>\n\t<\/div>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div data-vc-full-width=\"true\" data-vc-full-width-temp=\"true\" data-vc-full-width-init=\"false\" class=\"vc_row wpb_row vc_row-fluid vc_custom_1716942932714 vc_row-has-fill la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e198f5a\" class=\"la-headings text-left\"><h3 class=\"js-el heading-tag la-unit-responsive\" style=\"\" >MQTT Publish<\/h3><\/div>\n<div class=\"vc_row wpb_row vc_inner vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-8\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>You can publish any data on MQTT and topics, including your own. For switching actuators, switches, and relays, send the value &#8220;0&#8221; or &#8220;OFF&#8221; to turn off, or &#8220;1&#8221; or &#8220;ON&#8221; to turn on. You can use QOS 1 or QOS 2.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div class=\"vc_message_box vc_message_box-standard vc_message_box-rounded vc_color-info\" >\n\t<button class=\"close-button\" type=\"button\" data-close=\"\"><span aria-hidden=\"true\">&times<\/span><\/button>\n\t<div class=\"vc_message_box-icon\"><i class=\"fa fa-solid fa-circle-info\"><\/i>\n\t<\/div><p><strong>Automation Force Switch:<\/strong> When an automation function uses this switch, you cannot switch the appliance using the normal method (the function might override it immediately). To properly switch in this case, use the automation force switch, which offers three options:<\/p>\n<ol>\n<li>Switch Automation Off &amp; Turn Appliance ON =&gt; <code>{1 1}<\/code><\/li>\n<li>Switch Automation Off &amp; Turn Appliance OFF =&gt; <code>{1 0}<\/code><\/li>\n<li>Switch Automation ON =&gt; <code>{0}<\/code><\/li>\n<li style=\"list-style-type: none;\">Once in position 1 or 2, you can use the normal switch as well, using &#8220;ON&#8221; and &#8220;OFF&#8221; or &#8220;1&#8221; and &#8220;0.&#8221;<\/li>\n<\/ol>\n<\/div>\n<\/div><\/div><\/div><div class=\"wpb_column vc_column_container vc_col-sm-4\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div  class=\"wpb_single_image wpb_content_element vc_align_left wpb_content_element\">\n\t\t\n\t\t<figure class=\"wpb_wrapper vc_figure\">\n\t\t\t<div class=\"vc_single_image-wrapper   vc_box_border_grey\"><img loading=\"lazy\" decoding=\"async\" width=\"903\" height=\"579\" src=\"https:\/\/geia.ai\/wp-content\/uploads\/2024\/05\/Aquarium-lights-MQTT-TOPIC-switch.png\" class=\"vc_single_image-img attachment-medium\" alt=\"Automation switch: Double Switch mechanism\" title=\"Automation switch: Double Switch mechanism\" srcset=\"https:\/\/geia.ai\/wp-content\/uploads\/2024\/05\/Aquarium-lights-MQTT-TOPIC-switch.png 903w, https:\/\/geia.ai\/wp-content\/uploads\/2024\/05\/Aquarium-lights-MQTT-TOPIC-switch-18x12.png 18w\" sizes=\"auto, (max-width: 903px) 100vw, 903px\" \/><\/div>\n\t\t<\/figure>\n\t<\/div>\n<\/div><\/div><\/div><\/div><div class=\"vc_tta-container\" data-vc-action=\"collapse\" data-vc-tta-autoplay=\"{&quot;delay&quot;:5000}\"><div class=\"vc_general vc_tta vc_tta-tabs vc_tta-color-grey vc_tta-style-classic vc_tta-shape-rounded vc_tta-o-shape-group vc_tta-tabs-position-top vc_tta-controls-align-left\"><div class=\"vc_tta-tabs-container\"><ul class=\"vc_tta-tabs-list\" role=\"tablist\"><li class=\"vc_tta-tab vc_active\" data-vc-tab role=\"presentation\"><a href=\"#1716938112526-0aa09a7e-39f1\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716938112526-0aa09a7e-39f1\"><span class=\"vc_tta-title-text\">Shell<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716938112551-1abb4fda-b8d0\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716938112551-1abb4fda-b8d0\"><span class=\"vc_tta-title-text\">Python<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716938112569-c9bf57b6-f6fb\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716938112569-c9bf57b6-f6fb\"><span class=\"vc_tta-title-text\">HTML\/JAVA<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716938112584-552c3f48-fb36\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716938112584-552c3f48-fb36\"><span class=\"vc_tta-title-text\">Arduino<\/span><\/a><\/li><\/ul><\/div><div class=\"vc_tta-panels-container\"><div class=\"vc_tta-panels\"><div class=\"vc_tta-panel vc_active\" id=\"1716938112526-0aa09a7e-39f1\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716938112526-0aa09a7e-39f1\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Shell<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<pre>\/\/ Install MQTT client - for linux\r\nsudo apt-get install mosquitto-clients\r\n\r\n\/\/ Install MQTT client - for MacOS\r\nbrew install mosquitto-clients<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<pre># Internal connection\r\nmosquitto_pub -h GEIA-Gateway.local -p 1883 -u \"your-username\" -P \"your-password\" -t \"your\/topic\" -m \"your-message\"\r\n\r\n# External connection\r\nmosquitto_pub -h mqtt01.geia.ai -p 1883 -u \"your-username\" -P \"your-password\" -t \"\/{location_id}\/your\/topic\" -m \"your-message\"\r\n\r\n# Messege: 0 or 1\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716938112551-1abb4fda-b8d0\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716938112551-1abb4fda-b8d0\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Python<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Install <code>paho-mqtt<\/code><\/p>\n<pre>pip install paho-mqtt\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<pre>import paho.mqtt.client as mqtt\r\n\r\n# Define the MQTT settings\r\nbroker = \"mqtt01.geia.ai\"\r\nport = 1883\r\nusername = \"your-username\"\r\npassword = \"your-password\"\r\nlocation_id = <span class=\"hljs-string\">\"your-location-id\"\r\n<\/span>topic = \"\/\" + location_id + <span class=\"hljs-string\">\"\/your\/topic\"<\/span>\r\n\r\n# Connect to MQTT Broker\r\nclient = mqtt.Client()\r\nclient.username_pw_set(username, password)\r\nclient.connect(broker, port)\r\n\r\n# Publish a message\r\nclient.publish(topic, \"Hello, MQTT!\")\r\nclient.disconnect()\r\n\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716938112569-c9bf57b6-f6fb\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716938112569-c9bf57b6-f6fb\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">HTML\/JAVA<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Sample below includes <code>mqtt.js<\/code><\/p>\n<p>For NodeJS: Install <code>mqtt.js<\/code><\/p>\n<pre>npm install mqtt --save<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<pre>&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;MQTT Connect and Publish&lt;\/title&gt;\r\n&lt;script src=\"https:\/\/unpkg.com\/mqtt\/dist\/mqtt.min.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;button id=\"publishBtn\"&gt;Publish&lt;\/button&gt;\r\n&lt;p id=\"message\"&gt;Waiting for MQTT message...&lt;\/p&gt;\r\n\r\n&lt;script&gt;\r\nconst client = mqtt.connect('wss:\/\/mqtt01.geia.ai:8083', {\r\nusername: 'your-username',\r\npassword: 'your-password'\r\n});\r\n\r\nconst location_id = 'your-location-id';\r\nconst topic = '\/' + location_id + '\/your\/topic';\r\n\r\nclient.on('connect', () =&gt; {\r\nconsole.log('Connected');\r\ndocument.getElementById('publishBtn').addEventListener('click', () =&gt; {\r\nclient.publish(topic, 'Hello, MQTT!');\r\nconsole.log('Published message');\r\n});\r\n});\r\n\r\nclient.on('message', (topic, message) =&gt; {\r\nconsole.log(`Received message: ${message.toString()} on topic ${topic}`);\r\ndocument.getElementById('message').innerText = `Received message: ${message.toString()} on topic ${topic}`;\r\n});\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716938112584-552c3f48-fb36\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716938112584-552c3f48-fb36\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Arduino<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Install the <code>PubSubClient<\/code> plugin<\/p>\n<pre><span class=\"hljs-meta\">#<span class=\"hljs-keyword\">include<\/span> <span class=\"hljs-string\">&lt;WiFi.h&gt;<\/span><\/span> \r\n<span class=\"hljs-meta\">#<span class=\"hljs-keyword\">include<\/span> <span class=\"hljs-string\">&lt;PubSubClient.h&gt;<\/span><\/span>\r\n\r\n\r\n\/\/ WiFi settings\r\nconst char* ssid = \"your-SSID\";\r\nconst char* password = \"your-WIFI-password\";\r\n\r\n\/\/ MQTT settings\r\nconst char* mqtt_server = \"mqtt01.geia.ai\";\r\nconst int mqtt_port = 1883;\r\nconst char* mqtt_user = \"your-username\";\r\nconst char* mqtt_password = \"your-password\";\r\nconst char* location_id = \"your-location-id\";\r\nString topic = \"\/\" + String(location_id) + \"\/your\/topic\";\r\n\r\nWiFiClient espClient;\r\nPubSubClient client(espClient);\r\n\r\nvoid setup() {\r\n  Serial.begin(115200);\r\n  setup_wifi();\r\n  client.setServer(mqtt_server, mqtt_port);\r\n  client.connect(\"ArduinoClient\", mqtt_user, mqtt_password);\r\n  client.publish(topic.c_str(), \"Hello, MQTT!\");\r\n  client.disconnect();\r\n}\r\n\r\nvoid setup_wifi() {\r\n  delay(10);\r\n  WiFi.begin(ssid, password);\r\n  while (WiFi.status() != WL_CONNECTED) {\r\n    delay(500);\r\n    Serial.print(\".\");\r\n  }\r\n  Serial.println(\"WiFi connected\");\r\n}\r\n\r\nvoid loop() {\r\n}\r\n\r\n\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div class=\"vc_row-full-width vc_clearfix\"><\/div><div class=\"vc_row wpb_row vc_row-fluid vc_custom_1716914540286 vc_row-has-fill la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e1a3f14\" class=\"la-headings text-left\"><h3 class=\"js-el heading-tag la-unit-responsive\" style=\"\" >MQTT Subscribe<\/h3><\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Subscribe and listen to a topic to receive messages live as soon as they are sent.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div class=\"vc_tta-container\" data-vc-action=\"collapse\" data-vc-tta-autoplay=\"{&quot;delay&quot;:5000}\"><div class=\"vc_general vc_tta vc_tta-tabs vc_tta-color-grey vc_tta-style-classic vc_tta-shape-rounded vc_tta-o-shape-group vc_tta-tabs-position-top vc_tta-controls-align-left\"><div class=\"vc_tta-tabs-container\"><ul class=\"vc_tta-tabs-list\" role=\"tablist\"><li class=\"vc_tta-tab vc_active\" data-vc-tab role=\"presentation\"><a href=\"#1716939587255-20a0afa7-ec84\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716939587255-20a0afa7-ec84\"><span class=\"vc_tta-title-text\">Shell<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716939587290-5c6ba776-70456\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716939587290-5c6ba776-70456\"><span class=\"vc_tta-title-text\">Python<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716939587321-12a1d0b8-0563\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716939587321-12a1d0b8-0563\"><span class=\"vc_tta-title-text\">HTML\/JAVA<\/span><\/a><\/li><li class=\"vc_tta-tab\" data-vc-tab role=\"presentation\"><a href=\"#1716939587338-f2504504-d32a\" data-vc-tabs data-vc-container=\".vc_tta\" role=\"tab\" aria-selected=\"false\" id=\"tab-1716939587338-f2504504-d32a\"><span class=\"vc_tta-title-text\">Arduino<\/span><\/a><\/li><\/ul><\/div><div class=\"vc_tta-panels-container\"><div class=\"vc_tta-panels\"><div class=\"vc_tta-panel vc_active\" id=\"1716939587255-20a0afa7-ec84\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716939587255-20a0afa7-ec84\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Shell<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<pre># Internal connection\r\nmosquitto_sub -h GEIA-Gateway.local -p 1883 -u \"your-username\" -P \"your-password\" -t \"your\/topic\"\r\n\r\n# External connection\r\nmosquitto_sub -h mqtt01.geia.ai -p 1883 -u \"your-username\" -P \"your-password\" -t \"\/{location_id}\/your\/topic\"\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716939587290-5c6ba776-70456\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716939587290-5c6ba776-70456\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Python<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Install <code>paho-mqtt<\/code><\/p>\n<pre>pip install paho-mqtt\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<pre>import paho.mqtt.client as mqtt\r\n\r\n# Define the MQTT settings\r\nbroker = \"mqtt01.geia.ai\"\r\nport = 1883\r\nusername = \"your-username\"\r\npassword = \"your-password\"\r\nlocation_id = \"your-location-id\"\r\ntopic = \"\/\" + location_id + \"\/your\/topic\"\r\n\r\n# Callback function on receiving a message\r\ndef on_message(client, userdata, message):\r\n    print(f\"Received message: {message.payload.decode()} on topic {message.topic}\")\r\n\r\n# Connect to MQTT Broker and subscribe\r\nclient = mqtt.Client()\r\nclient.username_pw_set(username, password)\r\nclient.on_message = on_message\r\nclient.connect(broker, port)\r\nclient.subscribe(topic)\r\n\r\nclient.loop_forever()\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716939587321-12a1d0b8-0563\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716939587321-12a1d0b8-0563\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">HTML\/JAVA<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Sample below includes <code>mqtt.js<\/code><\/p>\n<p>For NodeJS: Install <code>mqtt.js<\/code><\/p>\n<pre>npm install mqtt --save<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<pre>&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;title&gt;MQTT Subscribe&lt;\/title&gt;\r\n&lt;script src=\"https:\/\/unpkg.com\/mqtt\/dist\/mqtt.min.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;p id=\"message\"&gt;Waiting for MQTT message...&lt;\/p&gt;\r\n\r\n&lt;script&gt;\r\nconst client = mqtt.connect('wss:\/\/mqtt01.geia.ai:8083', {\r\nusername: 'your-username',\r\npassword: 'your-password'\r\n});\r\n\r\nconst location_id = 'your-location-id';\r\nconst topic = '\/' + location_id + '\/your\/topic';\r\n\r\nclient.on('connect', () =&gt; {\r\nconsole.log('Connected');\r\nclient.subscribe(topic);\r\n});\r\n\r\nclient.on('message', (topic, message) =&gt; {\r\nconsole.log(`Received message: ${message.toString()} on topic ${topic}`);\r\ndocument.getElementById('message').innerText = `Received message: ${message.toString()} on topic ${topic}`;\r\n});\r\n&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><div class=\"vc_tta-panel\" id=\"1716939587338-f2504504-d32a\" data-vc-content=\".vc_tta-panel-body\"><div class=\"vc_tta-panel-heading\"><h4 class=\"vc_tta-panel-title\"><a href=\"#1716939587338-f2504504-d32a\" data-vc-accordion data-vc-container=\".vc_tta-container\"><span class=\"vc_tta-title-text\">Arduino<\/span><\/a><\/h4><\/div><div class=\"vc_tta-panel-body\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Install the <code>PubSubClient<\/code> plugin<\/p>\n<pre><span class=\"hljs-meta\">#<span class=\"hljs-keyword\">include<\/span> <span class=\"hljs-string\">&lt;WiFi.h&gt;<\/span><\/span> \r\n<span class=\"hljs-meta\">#<span class=\"hljs-keyword\">include<\/span> <span class=\"hljs-string\">&lt;PubSubClient.h&gt;<\/span><\/span>\r\n\r\n\r\n\/\/ WiFi settings\r\nconst char* ssid = \"your-SSID\";\r\nconst char* password = \"your-WIFI-password\";\r\n\r\n\/\/ MQTT settings\r\nconst char* mqtt_server = \"mqtt01.geia.ai\";\r\nconst int mqtt_port = 1883;\r\nconst char* mqtt_user = \"your-username\";\r\nconst char* mqtt_password = \"your-password\";\r\nconst char* location_id = \"your-location-id\";\r\nString topic = \"\/\" + String(location_id) + \"\/your\/topic\";\r\n\r\nWiFiClient espClient;\r\nPubSubClient client(espClient);\r\n\r\nvoid callback(char* topic, byte* payload, unsigned int length) {\r\n  Serial.print(\"Message arrived [\");\r\n  Serial.print(topic);\r\n  Serial.print(\"] \");\r\n  for (int i = 0; i &lt; length; i++) {\r\n    Serial.print((char)payload[i]);\r\n  }\r\n  Serial.println();\r\n}\r\n\r\nvoid setup() {\r\n  Serial.begin(115200);\r\n  setup_wifi();\r\n  client.setServer(mqtt_server, mqtt_port);\r\n  client.setCallback(callback);\r\n  client.connect(\"ArduinoClient\", mqtt_user, mqtt_password);\r\n  client.subscribe(topic.c_str());\r\n}\r\n\r\nvoid setup_wifi() {\r\n  delay(10);\r\n  WiFi.begin(ssid, password);\r\n  while (WiFi.status() != WL_CONNECTED) {\r\n    delay(500);\r\n    Serial.print(\".\");\r\n  }\r\n  Serial.println(\"WiFi connected\");\r\n}\r\n\r\nvoid loop() {\r\n  client.loop();\r\n}\r\n\r\n\r\n<\/pre>\n\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><div data-vc-full-width=\"true\" data-vc-full-width-temp=\"true\" data-vc-full-width-init=\"false\" class=\"vc_row wpb_row vc_row-fluid vc_custom_1716943008799 vc_row-has-fill la_fp_slide la_fp_child_section\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><div id=\"la_heading_6ab2b2e1a8d4b\" class=\"la-headings text-left\"><h3 class=\"js-el heading-tag la-unit-responsive\" style=\"\" >Using MQTT with VPN<\/h3><\/div>\n\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>You can connect to MQTT using either the encrypted or unencrypted port.<\/p>\n<p>To enhance security (also locally), you can also use a VPN or SSH Tunnel. Please contact us if you need free additional VPN access. Note that the VPN communicates only with our MQTT servers.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"la_divider6ab2b2e1a953e\" class=\"js-el la-divider la-unit-responsive\" data-la_component=\"UnitResponsive\"  data-el_target='#la_divider6ab2b2e1a953e'  data-el_media_sizes='{&quot;padding-top&quot;:&quot;lg:35px;&quot;}' ><\/div>\n<\/div><\/div><\/div><\/div><div class=\"vc_row-full-width vc_clearfix\"><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"GEIA MQTT DocumentationUse MQTT Protocol for switching lights or Get live Sensor data IntroductionThe GEIA Grow Hub (an IoT Gateway)&hellip;","protected":false},"author":1,"featured_media":0,"parent":6644,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4585","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MQTT Documentation for Agricultural IoT | GEIA<\/title>\n<meta name=\"description\" content=\"Connect sensors, gateways and automation systems to GEIA using MQTT. Explore topics, authentication, telemetry, commands and code examples for agricultural IoT.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/geia.ai\/de\/platform\/mqtt\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MQTT Documentation for Agricultural IoT | GEIA\" \/>\n<meta property=\"og:description\" content=\"Connect sensors, gateways and automation systems to GEIA using MQTT. Explore topics, authentication, telemetry, commands and code examples for agricultural IoT.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/geia.ai\/de\/platform\/mqtt\/\" \/>\n<meta property=\"og:site_name\" content=\"Geia.AI\u2122 Precision Farming Automation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-07T07:14:59+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data1\" content=\"4\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/geia.ai\\\/platform\\\/mqtt\\\/\",\"url\":\"https:\\\/\\\/geia.ai\\\/platform\\\/mqtt\\\/\",\"name\":\"MQTT Documentation for Agricultural IoT | GEIA\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/geia.ai\\\/en\\\/#website\"},\"datePublished\":\"2022-04-18T23:17:59+00:00\",\"dateModified\":\"2026-09-07T07:14:59+00:00\",\"description\":\"Connect sensors, gateways and automation systems to GEIA using MQTT. Explore topics, authentication, telemetry, commands and code examples for agricultural IoT.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/geia.ai\\\/platform\\\/mqtt\\\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/geia.ai\\\/platform\\\/mqtt\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/geia.ai\\\/platform\\\/mqtt\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/geia.ai\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Platform\",\"item\":\"https:\\\/\\\/geia.ai\\\/platform\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"MQTT Documentation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/geia.ai\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/geia.ai\\\/en\\\/\",\"name\":\"Geia.AI\u2122 Precision Farming Automation\",\"description\":\"Grow Automation, Management &amp; Marketplace For Professionals\",\"publisher\":{\"@id\":\"https:\\\/\\\/geia.ai\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/geia.ai\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/geia.ai\\\/en\\\/#organization\",\"name\":\"Geia.AI\u2122 Precision Farming Automation\",\"url\":\"https:\\\/\\\/geia.ai\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/geia.ai\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"http:\\\/\\\/geia.ai\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/59c11f2380584_thumb900.jpg\",\"contentUrl\":\"http:\\\/\\\/geia.ai\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/59c11f2380584_thumb900.jpg\",\"width\":900,\"height\":1090,\"caption\":\"Geia.AI\u2122 Precision Farming Automation\"},\"image\":{\"@id\":\"https:\\\/\\\/geia.ai\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MQTT Documentation for Agricultural IoT | GEIA","description":"Connect sensors, gateways and automation systems to GEIA using MQTT. Explore topics, authentication, telemetry, commands and code examples for agricultural IoT.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/geia.ai\/de\/platform\/mqtt\/","og_locale":"de_DE","og_type":"article","og_title":"MQTT Documentation for Agricultural IoT | GEIA","og_description":"Connect sensors, gateways and automation systems to GEIA using MQTT. Explore topics, authentication, telemetry, commands and code examples for agricultural IoT.","og_url":"https:\/\/geia.ai\/de\/platform\/mqtt\/","og_site_name":"Geia.AI\u2122 Precision Farming Automation","article_modified_time":"2026-09-07T07:14:59+00:00","twitter_card":"summary_large_image","twitter_misc":{"Gesch\u00e4tzte Lesezeit":"4\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/geia.ai\/platform\/mqtt\/","url":"https:\/\/geia.ai\/platform\/mqtt\/","name":"MQTT Documentation for Agricultural IoT | GEIA","isPartOf":{"@id":"https:\/\/geia.ai\/en\/#website"},"datePublished":"2022-04-18T23:17:59+00:00","dateModified":"2026-09-07T07:14:59+00:00","description":"Connect sensors, gateways and automation systems to GEIA using MQTT. Explore topics, authentication, telemetry, commands and code examples for agricultural IoT.","breadcrumb":{"@id":"https:\/\/geia.ai\/platform\/mqtt\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/geia.ai\/platform\/mqtt\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/geia.ai\/platform\/mqtt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/geia.ai\/"},{"@type":"ListItem","position":2,"name":"Platform","item":"https:\/\/geia.ai\/platform\/"},{"@type":"ListItem","position":3,"name":"MQTT Documentation"}]},{"@type":"WebSite","@id":"https:\/\/geia.ai\/en\/#website","url":"https:\/\/geia.ai\/en\/","name":"Geia.AI\u2122 Precision Farming Automation","description":"Grow Automation, Management &amp; Marketplace For Professionals","publisher":{"@id":"https:\/\/geia.ai\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/geia.ai\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/geia.ai\/en\/#organization","name":"Geia.AI\u2122 Precision Farming Automation","url":"https:\/\/geia.ai\/en\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/geia.ai\/en\/#\/schema\/logo\/image\/","url":"http:\/\/geia.ai\/wp-content\/uploads\/2022\/10\/59c11f2380584_thumb900.jpg","contentUrl":"http:\/\/geia.ai\/wp-content\/uploads\/2022\/10\/59c11f2380584_thumb900.jpg","width":900,"height":1090,"caption":"Geia.AI\u2122 Precision Farming Automation"},"image":{"@id":"https:\/\/geia.ai\/en\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/pages\/4585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/comments?post=4585"}],"version-history":[{"count":65,"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/pages\/4585\/revisions"}],"predecessor-version":[{"id":6925,"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/pages\/4585\/revisions\/6925"}],"up":[{"embeddable":true,"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/pages\/6644"}],"wp:attachment":[{"href":"https:\/\/geia.ai\/de\/wp-json\/wp\/v2\/media?parent=4585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}