Files
Meshtastic-Android/main/srp/user/mqtt.html
T

3 lines
43 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <link rel="stylesheet" href="/Meshtastic-Android/main/assets/css/just-the-docs-default.css"> <link rel="stylesheet" href="/Meshtastic-Android/main/assets/css/just-the-docs-head-nav.css" id="jtd-head-nav-stylesheet"> <style id="jtd-nav-activation"> .site-nav ul li a { background-image: none; } </style> <script src="/Meshtastic-Android/main/assets/js/vendor/lunr.min.js"></script> <script src="/Meshtastic-Android/main/assets/js/just-the-docs.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Begin Jekyll SEO tag v2.9.0 --> <title>MQTT | Meshtastic Android</title> <meta name="generator" content="Jekyll v4.4.1" /> <meta property="og:title" content="MQTT" /> <meta property="og:locale" content="srp" /> <meta name="description" content="Bridge your mesh to the internet — MQTT broker setup, encryption layers, and map reporting." /> <meta name="twitter:description" property="og:description" content="Bridge your mesh to the internet — MQTT broker setup, encryption layers, and map reporting." /> <link rel="canonical" href="/Meshtastic-Android/main/srp/user/mqtt.html" /> <meta property="og:url" content="/Meshtastic-Android/main/srp/user/mqtt.html" /> <meta property="og:site_name" content="Meshtastic Android" /> <meta property="og:type" content="website" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:title" content="MQTT" /> <script type="application/ld+json"> {"@context":"https://schema.org","@type":"WebPage","description":"Bridge your mesh to the internet — MQTT broker setup, encryption layers, and map reporting.","headline":"MQTT","url":"/Meshtastic-Android/main/srp/user/mqtt.html"}</script> <!-- End Jekyll SEO tag --> <!-- Inter font from Google Fonts --> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"> <style> /* M3-inspired typography */ :root { --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace; } body, .site-title, .search-input { font-family: var(--font-sans) !important; } code, pre, .highlight { font-family: var(--font-mono) !important; font-size: 0.875em; } /* M3 surface elevation & rounding */ .main-content table { border-radius: 12px; overflow: hidden; } .main-content blockquote { border-radius: 12px; padding: 1rem 1.25rem; border-left-width: 4px; } .main-content pre { border-radius: 12px; } .main-content code { border-radius: 6px; padding: 0.15em 0.4em; } /* Smooth transitions for theme switching */ body, .side-bar, .main, .main-content, .site-header, .search-input, .search-results, a { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; } /* Theme toggle button styling */ .theme-toggle { background: none; border: 1px solid var(--border-color, #D5D6E0); border-radius: 20px; padding: 6px 12px; cursor: pointer; font-family: var(--font-sans); font-size: 0.75rem; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: inherit; margin: 0 auto; transition: background-color 0.2s ease, border-color 0.2s ease; } .theme-toggle:hover { background-color: rgba(128, 128, 128, 0.1); } .theme-toggle-wrap { text-align: center; padding: 12px 0 4px; } /* Heading weight refinement */ h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -0.01em; } h1 { font-weight: 700; letter-spacing: -0.02em; } /* Smooth anchor scroll */ html { scroll-behavior: smooth; } /* Language switcher */ .language-switcher { display: inline-block; position: relative; margin-left: 8px; } .language-switcher-btn { cursor: pointer; font-size: 0.8rem; font-weight: 500; font-family: var(--font-sans); list-style: none; padding: 4px 10px; border: 1px solid var(--border-color, #D5D6E0); border-radius: 16px; display: inline-flex; align-items: center; gap: 4px; transition: background-color 0.2s ease; } .language-switcher-btn:hover { background-color: rgba(128, 128, 128, 0.1); } .language-switcher[open] .language-switcher-list { display: block; } .language-switcher-list { position: absolute; top: 100%; right: 0; left: auto; z-index: 100; list-style: none; padding: 8px 0; margin: 4px 0 0; min-width: 140px; background: var(--body-background-color, #fff); border: 1px solid var(--border-color, #D5D6E0); border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); } .language-switcher-list li { padding: 0; } .language-switcher-list a { display: block; padding: 6px 16px; text-decoration: none; font-size: 0.85rem; color: inherit; } .language-switcher-list a:hover { background-color: rgba(103, 234, 148, 0.15); } /* Version switcher (shares the language-switcher dropdown styling) */ .version-switcher { margin-left: 8px; } .version-switcher[hidden] { display: none; } /* Link out to the upstream meshtastic.org docs */ .upstream-docs-link { display: inline-flex; align-items: center; margin-left: 8px; padding: 4px 10px; border: 1px solid var(--border-color, #D5D6E0); border-radius: 16px; font-size: 0.8rem; font-weight: 500; font-family: var(--font-sans); text-decoration: none; color: inherit; transition: background-color 0.2s ease; } .upstream-docs-link:hover { background-color: rgba(128, 128, 128, 0.1); } </style> <script> // Respect OS preference on first visit, then remember user choice (function() { var stored = localStorage.getItem('jtd-theme'); if (stored) return; // will be applied by jtd.setTheme below if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { localStorage.setItem('jtd-theme', 'meshtastic-dark'); } })(); </script> </head> <body> <a class="skip-to-main" href="#main-content">Skip to main content</a> <svg xmlns="http://www.w3.org/2000/svg" class="d-none"> <symbol id="svg-link" viewBox="0 0 24 24"> <title>Link</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-link"> <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <!-- Feather. MIT License: https://github.com/feathericons/feather/blob/master/LICENSE --> <symbol id="svg-external-link" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-external-link"> <title id="svg-external-link-title">(external link)</title> <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line> </symbol> <symbol id="svg-doc" viewBox="0 0 24 24"> <title>Document</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file"> <path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"></path><polyline points="13 2 13 9 20 9"></polyline> </svg> </symbol> <symbol id="svg-search" viewBox="0 0 24 24"> <title>Search</title> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"> <circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line> </svg> </symbol> <!-- Bootstrap Icons. MIT License: https://github.com/twbs/icons/blob/main/LICENSE.md --> <symbol id="svg-copy" viewBox="0 0 16 16"> <title>Copy</title> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard" viewBox="0 0 16 16"> <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/> <path d="M9.5 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/> </svg> </symbol> <symbol id="svg-copied" viewBox="0 0 16 16"> <title>Copied</title> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-clipboard-check-fill" viewBox="0 0 16 16"> <path d="M6.5 0A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3Zm3 1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h3Z"/> <path d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1A2.5 2.5 0 0 1 9.5 5h-3A2.5 2.5 0 0 1 4 2.5v-1Zm6.854 7.354-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 0 1 .708-.708L7.5 10.793l2.646-2.647a.5.5 0 0 1 .708.708Z"/> </svg> </symbol> </svg> <header class="side-bar"> <div class="site-header"> <a href="/Meshtastic-Android/main/" class="site-title lh-tight"> Meshtastic Android </a> <button id="menu-button" class="site-button btn-reset" aria-label="Menu" aria-expanded="false"> <svg viewBox="0 0 24 24" class="icon" aria-hidden="true"><use xlink:href="#svg-menu"></use></svg> </button> </div> <nav aria-label="Main" id="site-nav" class="site-nav"> <ul class="nav-list"><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/" class="nav-list-link">Home</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/" class="nav-list-link">Home</a></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="User Guide submenu" aria-expanded="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/Meshtastic-Android/main/en/user.html" class="nav-list-link">User Guide</a><ul class="nav-list"><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/onboarding.html" class="nav-list-link">Getting Started</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/onboarding.html" class="nav-list-link">Getting Started</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/connections.html" class="nav-list-link">Connexions</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/connections.html" class="nav-list-link">Connections</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/messages-and-channels.html" class="nav-list-link">Messages & Channels</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/messages-and-channels.html" class="nav-list-link">Messages & Channels</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/nodes.html" class="nav-list-link">Nœuds</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/nodes.html" class="nav-list-link">Nodes</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/node-metrics.html" class="nav-list-link">Node Metrics</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/node-metrics.html" class="nav-list-link">Node Metrics</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/map-and-waypoints.html" class="nav-list-link">Map & Waypoints</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/map-and-waypoints.html" class="nav-list-link">Map & Waypoints</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/settings-radio-user.html" class="nav-list-link">Settings — Radio & User</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/settings-radio-user.html" class="nav-list-link">Settings — Radio & User</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/settings-module-admin.html" class="nav-list-link">Settings — Modules & Admin</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/settings-module-admin.html" class="nav-list-link">Settings — Modules & Admin</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/tak.html" class="nav-list-link">TAK Integration</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/tak.html" class="nav-list-link">TAK Integration</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/mqtt.html" class="nav-list-link">MQTT</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/mqtt.html" class="nav-list-link">MQTT</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/discovery.html" class="nav-list-link">Découverte de maille locale</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/discovery.html" class="nav-list-link">Local Mesh Discovery</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/firmware.html" class="nav-list-link">Firmware Updates</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/firmware.html" class="nav-list-link">Firmware Updates</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/desktop.html" class="nav-list-link">Desktop App</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/desktop.html" class="nav-list-link">Desktop App</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/signal-meter.html" class="nav-list-link">How the Meshtastic Signal Meter Works</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/signal-meter.html" class="nav-list-link">How the Meshtastic Signal Meter Works</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/units-and-locale.html" class="nav-list-link">Units, Measurement & Locale</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/units-and-locale.html" class="nav-list-link">Units, Measurement & Locale</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/fr-rCA/user/translate.html" class="nav-list-link">Translate the App</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/translate.html" class="nav-list-link">Translate the App</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/app-functions.html" class="nav-list-link">App Functions</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/widget.html" class="nav-list-link">Home Screen Widget</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/help-and-docs.html" class="nav-list-link">Help & In-App Docs</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/user/debug-logs.html" class="nav-list-link">Debug Logs</a></li></ul></li><li class="nav-list-item"><button class="nav-list-expander btn-reset" aria-label="Developer Guide submenu" aria-expanded="false"> <svg viewBox="0 0 24 24" aria-hidden="true"><use xlink:href="#svg-arrow-right"></use></svg> </button><a href="/Meshtastic-Android/main/en/developer.html" class="nav-list-link">Developer Guide</a><ul class="nav-list"><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/architecture.html" class="nav-list-link">Architecture</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/codebase.html" class="nav-list-link">Codebase</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/adding-a-feature-module.html" class="nav-list-link">Adding a Feature Module</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/navigation-and-deep-links.html" class="nav-list-link">Navigation & Deep Links</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/transport.html" class="nav-list-link">Transport</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/persistence.html" class="nav-list-link">Persistence</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/testing.html" class="nav-list-link">Testing</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/contributing.html" class="nav-list-link">Contributing</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/measurement.html" class="nav-list-link">Measurement & Formatting</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/test-builds.html" class="nav-list-link">Test Builds & Obtainium</a></li><li class="nav-list-item"><a href="/Meshtastic-Android/main/en/developer/documentation-style.html" class="nav-list-link">Documentation Style</a></li></ul></li></ul> </nav> <div class="d-md-block d-sm-none"> <div class="site-footer"> This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </div> </div> </header> <div class="main" id="top"> <div id="main-header" class="main-header"> <div class="search" role="search"> <div class="search-input-wrap"> <input type="text" id="search-input" class="search-input" tabindex="0" placeholder="Search Meshtastic Android" autocomplete="off"> <label for="search-input" class="search-label"> <span class="sr-only">Search Meshtastic Android</span> <svg viewBox="0 0 24 24" class="search-icon" aria-hidden="true"><use xlink:href="#svg-search"></use></svg> </label> </div> <div id="search-results" class="search-results"></div> </div> <div class="theme-toggle-wrap"> <button class="theme-toggle" id="theme-toggle" aria-label="Toggle dark mode" title="Toggle light/dark theme" onclick="toggleMeshtasticTheme()"> <span id="theme-icon">🌙</span> <span id="theme-label">Dark</span> </button> <details class="language-switcher version-switcher" id="version-switcher" aria-label="Documentation version" hidden> <summary class="language-switcher-btn" title="Switch documentation version"> 🏷️ <span id="version-current"></span> </summary> <ul class="language-switcher-list" id="version-switcher-list"></ul> </details> <script> (function() { var baseurl = '/Meshtastic-Android/main'; var root = baseurl; var channel = 'latest'; // /main/, /vX.Y.Z/ or a prerelease snapshot like /v2.8.0-open.1/. var match = baseurl.match(/^(.*)\/(main|v\d+\.\d+\.\d+(?:-(?:open|closed)\.\d+)?)$/); if (match) { root = match[1]; channel = match[2]; } fetch(root + '/versions.json') .then(function(res) { return res.ok ? res.json() : Promise.reject(); }) .then(function(data) { var switcher = document.getElementById('version-switcher'); var list = document.getElementById('version-switcher-list'); var current = document.getElementById('version-current'); if (!switcher || !list || !current) return; // Keep the reader on the same page when switching channels; a page // that doesn't exist in the target version lands on the 404 page. var relativePath = location.pathname.slice(baseurl.length) + location.hash; var entries = []; if (data.latest) { entries.push({ id: 'latest', label: 'latest (v' + data.latest + ')', base: root }); } // Prereleases are documented ahead of general availability, so the track // is always spelled out — a reader must not mistake a closed-testing // snapshot for a shipped release. (data.prereleases || []).forEach(function(p) { entries.push({ id: p.dir, label: p.dir.replace(/^v/, 'v') + ' — ' + p.track + ' testing', base: root + '/' + p.dir }); }); if (data.hasMain) { entries.push({ id: 'main', label: 'main (unreleased snapshot)', base: root + '/main' }); } (data.versions || []).forEach(function(v) { entries.push({ id: 'v' + v, label: 'v' + v, base: root + '/v' + v }); }); var currentEntry = entries.filter(function(e) { return e.id === channel; })[0]; current.textContent = currentEntry ? currentEntry.label : channel; var others = entries.filter(function(e) { return e.id !== channel; }); if (others.length === 0) return; others.forEach(function(e) { var li = document.createElement('li'); var a = document.createElement('a'); a.href = e.base + relativePath; a.textContent = e.label; li.appendChild(a); list.appendChild(li); }); switcher.hidden = false; }) .catch(function() { /* no manifest (local build) — leave switcher hidden */ }); })(); </script> <details class="language-switcher" aria-label="Language options"> <summary class="language-switcher-btn" title="View in another language"> 🌐 <span class="lang-current">Српски (Ћирилица)</span> </summary> <ul class="language-switcher-list"> <li><a href="/Meshtastic-Android/main/en/user/mqtt" lang="en">English</a></li> <li><a href="/Meshtastic-Android/main/ar-rSA/user/mqtt" lang="ar-rSA" dir="rtl">العربية</a></li> <li><a href="/Meshtastic-Android/main/be-rBY/user/mqtt" lang="be-rBY" >Беларуская</a></li> <li><a href="/Meshtastic-Android/main/bg-rBG/user/mqtt" lang="bg-rBG" >Български</a></li> <li><a href="/Meshtastic-Android/main/ca-rES/user/mqtt" lang="ca-rES" >Català</a></li> <li><a href="/Meshtastic-Android/main/cs-rCZ/user/mqtt" lang="cs-rCZ" >Čeština</a></li> <li><a href="/Meshtastic-Android/main/de-rDE/user/mqtt" lang="de-rDE" >Deutsch</a></li> <li><a href="/Meshtastic-Android/main/el-rGR/user/mqtt" lang="el-rGR" >Ελληνικά</a></li> <li><a href="/Meshtastic-Android/main/es-rES/user/mqtt" lang="es-rES" >Español</a></li> <li><a href="/Meshtastic-Android/main/et-rEE/user/mqtt" lang="et-rEE" >Eesti</a></li> <li><a href="/Meshtastic-Android/main/fi-rFI/user/mqtt" lang="fi-rFI" >Suomi</a></li> <li><a href="/Meshtastic-Android/main/fr-rFR/user/mqtt" lang="fr-rFR" >Français</a></li> <li><a href="/Meshtastic-Android/main/ga-rIE/user/mqtt" lang="ga-rIE" >Gaeilge</a></li> <li><a href="/Meshtastic-Android/main/gl-rES/user/mqtt" lang="gl-rES" >Galego</a></li> <li><a href="/Meshtastic-Android/main/iw-rIL/user/mqtt" lang="iw-rIL" dir="rtl">עברית</a></li> <li><a href="/Meshtastic-Android/main/hr-rHR/user/mqtt" lang="hr-rHR" >Hrvatski</a></li> <li><a href="/Meshtastic-Android/main/ht-rHT/user/mqtt" lang="ht-rHT" >Kreyòl Ayisyen</a></li> <li><a href="/Meshtastic-Android/main/hu-rHU/user/mqtt" lang="hu-rHU" >Magyar</a></li> <li><a href="/Meshtastic-Android/main/is-rIS/user/mqtt" lang="is-rIS" >Íslenska</a></li> <li><a href="/Meshtastic-Android/main/it-rIT/user/mqtt" lang="it-rIT" >Italiano</a></li> <li><a href="/Meshtastic-Android/main/ja-rJP/user/mqtt" lang="ja-rJP" >日本語</a></li> <li><a href="/Meshtastic-Android/main/ko-rKR/user/mqtt" lang="ko-rKR" >한국어</a></li> <li><a href="/Meshtastic-Android/main/lt-rLT/user/mqtt" lang="lt-rLT" >Lietuvių</a></li> <li><a href="/Meshtastic-Android/main/nl-rNL/user/mqtt" lang="nl-rNL" >Nederlands</a></li> <li><a href="/Meshtastic-Android/main/no-rNO/user/mqtt" lang="no-rNO" >Norsk</a></li> <li><a href="/Meshtastic-Android/main/pl-rPL/user/mqtt" lang="pl-rPL" >Polski</a></li> <li><a href="/Meshtastic-Android/main/pt-rBR/user/mqtt" lang="pt-rBR" >Português (Brasil)</a></li> <li><a href="/Meshtastic-Android/main/pt-rPT/user/mqtt" lang="pt-rPT" >Português</a></li> <li><a href="/Meshtastic-Android/main/ro-rRO/user/mqtt" lang="ro-rRO" >Română</a></li> <li><a href="/Meshtastic-Android/main/ru-rRU/user/mqtt" lang="ru-rRU" >Русский</a></li> <li><a href="/Meshtastic-Android/main/sk-rSK/user/mqtt" lang="sk-rSK" >Slovenčina</a></li> <li><a href="/Meshtastic-Android/main/sl-rSI/user/mqtt" lang="sl-rSI" >Slovenščina</a></li> <li><a href="/Meshtastic-Android/main/sq-rAL/user/mqtt" lang="sq-rAL" >Shqip</a></li> <li><a href="/Meshtastic-Android/main/sr-rLatn/user/mqtt" lang="sr-rLatn" >Српски (Latinica)</a></li> <li><a href="/Meshtastic-Android/main/sv-rSE/user/mqtt" lang="sv-rSE" >Svenska</a></li> <li><a href="/Meshtastic-Android/main/tr-rTR/user/mqtt" lang="tr-rTR" >Türkçe</a></li> <li><a href="/Meshtastic-Android/main/uk-rUA/user/mqtt" lang="uk-rUA" >Українська</a></li> <li><a href="/Meshtastic-Android/main/zh-rCN/user/mqtt" lang="zh-rCN" >中文 (简体)</a></li> <li><a href="/Meshtastic-Android/main/zh-rTW/user/mqtt" lang="zh-rTW" >中文 (繁體)</a></li> </ul> </details> <a class="upstream-docs-link" href="https://meshtastic.org/docs/" title="Official Meshtastic documentation (meshtastic.org)">Meshtastic Docs ↗</a> </div> <script> function toggleMeshtasticTheme() { var current = localStorage.getItem('jtd-theme') || 'meshtastic'; var next = (current === 'meshtastic-dark') ? 'meshtastic' : 'meshtastic-dark'; if (typeof jtd !== 'undefined' && typeof jtd.setTheme === 'function') { jtd.setTheme(next); } localStorage.setItem('jtd-theme', next); var icon = document.getElementById('theme-icon'); var label = document.getElementById('theme-label'); if (icon && label) { icon.textContent = (next === 'meshtastic-dark') ? '☀️' : '🌙'; label.textContent = (next === 'meshtastic-dark') ? 'Light' : 'Dark'; } } // Apply stored/OS theme on page load (function() { var theme = localStorage.getItem('jtd-theme') || 'meshtastic'; // Sync toggle label immediately var icon = document.getElementById('theme-icon'); var label = document.getElementById('theme-label'); if (icon && label) { icon.textContent = (theme === 'meshtastic-dark') ? '☀️' : '🌙'; label.textContent = (theme === 'meshtastic-dark') ? 'Light' : 'Dark'; } // Apply theme once jtd is ready function tryApply() { if (typeof jtd !== 'undefined' && typeof jtd.setTheme === 'function') { jtd.setTheme(theme); } else { setTimeout(tryApply, 50); } } tryApply(); })(); </script> </div> <div class="main-content-wrap"> <nav aria-label="Breadcrumb" class="breadcrumb-nav"> <ol class="breadcrumb-nav-list"> <li class="breadcrumb-nav-list-item"><a href="/Meshtastic-Android/main/en/user.html">User Guide</a></li> <li class="breadcrumb-nav-list-item"><span>MQTT</span></li> </ol> </nav> <div id="main-content" class="main-content"> <main> <div class="locale-page-banner" > <p class="locale-notice"> 🌐 <strong>Српски (Ћирилица)</strong> — Community translation <a href="/Meshtastic-Android/main/en/user/mqtt">View in English</a> </p> </div> <div lang="srp"> <h1 id="mqtt"> <a href="#mqtt" class="anchor-heading" aria-labelledby="mqtt"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> MQTT </h1> <p>MQTT bridges your Meshtastic mesh network to the internet, enabling long-range communication beyond radio range.</p> <h2 id="overview"> <a href="#overview" class="anchor-heading" aria-labelledby="overview"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Overview </h2> <p>The MQTT module connects your node to an MQTT broker, allowing:</p> <ul> <li>Messages to reach nodes on different physical meshes via the internet</li> <li>Integration with home automation and monitoring systems</li> <li>Publishing node positions to the public Meshtastic map</li> <li>Custom data pipelines for logging and alerting</li> </ul> <h2 id="how-it-works"> <a href="#how-it-works" class="anchor-heading" aria-labelledby="how-it-works"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> How It Works </h2> <div class="language-text highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[Your Node] → Radio → [Gateway Node with Wi-Fi] → MQTT Broker → [Remote Gateway] → Radio → [Remote Node]
</code></pre></div></div> <p>A gateway node with internet access (Wi-Fi or Ethernet) publishes mesh messages to an MQTT topic. Remote gateways subscribed to the same topic inject those messages into their local mesh.</p> <h2 id="configuration"> <a href="#configuration" class="anchor-heading" aria-labelledby="configuration"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Configuration </h2> <h3 id="enabling-mqtt"> <a href="#enabling-mqtt" class="anchor-heading" aria-labelledby="enabling-mqtt"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Enabling MQTT </h3> <ol> <li>Navigate to <strong>Settings → Module configuration → MQTT</strong>.</li> <li>Enable the MQTT module.</li> <li>Configure the broker connection:</li> </ol> <div class="table-wrapper"><table> <thead> <tr> <th>Setting</th> <th>Опис</th> <th>Подразумевано</th> </tr> </thead> <tbody> <tr> <td><strong>Address</strong></td> <td>MQTT broker hostname</td> <td>mqtt.meshtastic.org</td> </tr> <tr> <td><strong>Username</strong></td> <td>Broker authentication</td> <td>meshdev</td> </tr> <tr> <td><strong>Password</strong></td> <td>Broker authentication</td> <td>large4cats</td> </tr> <tr> <td><strong>Root topic</strong></td> <td>Base topic for messages</td> <td><code class="language-plaintext highlighter-rouge">msh</code>, which the radio rewrites to <code class="language-plaintext highlighter-rouge">msh/&lt;REGION&gt;</code> once you set a region</td> </tr> <tr> <td><strong>Encryption enabled</strong></td> <td>Encrypt MQTT payload</td> <td>Омогућено</td> </tr> <tr> <td><strong>JSON output enabled</strong></td> <td>Also publish and consume the <code class="language-plaintext highlighter-rouge">/2/json/</code> topic. Deprecated in the protobuf schema, but still the only toggle for this behavior — and the app’s own proxy honors it</td> <td>Онемогућено</td> </tr> <tr> <td><strong>TLS enabled</strong></td> <td>Secure connection to broker</td> <td>Онемогућено</td> </tr> <tr> <td><strong>Map reporting</strong></td> <td>Report position to public map</td> <td>Онемогућено</td> </tr> <tr> <td><strong>Proxy to client enabled</strong></td> <td>Relay MQTT through the connected phone</td> <td>Онемогућено</td> </tr> </tbody> </table></div> <h3 id="connection-status-and-test-connection"> <a href="#connection-status-and-test-connection" class="anchor-heading" aria-labelledby="connection-status-and-test-connection"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Connection Status and Test Connection </h3> <p>The top of the MQTT settings screen shows the status of the relay this phone runs — <strong>Connected</strong>, <strong>Connecting</strong>, <strong>Reconnecting</strong>, <strong>Disconnected</strong>, or <strong>Inactive</strong>. It reads <strong>Inactive</strong> whenever the phone is not relaying, which includes the normal case of a radio reaching the broker over its own Wi-Fi or Ethernet. The radio’s own connection to the broker is not reported here.</p> <p><strong>Test connection</strong> probes the broker before you commit the settings to the radio, and distinguishes the failure modes: the hostname not resolving, the TCP connection being refused, TLS failing, the attempt timing out, or the broker rejecting your credentials with a reason.</p> <h3 id="mqtt-proxy-on-this-phone"> <a href="#mqtt-proxy-on-this-phone" class="anchor-heading" aria-labelledby="mqtt-proxy-on-this-phone"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> MQTT Proxy on This Phone </h3> <p>If your radio has no internet access of its own, it can use the connected phone as its MQTT gateway: enable <strong>MQTT</strong> and <strong>Proxy to client enabled</strong> in the module config, and the app relays MQTT traffic between the radio and the broker over your phone’s internet connection.</p> <blockquote> <p>ℹ️ <strong>Note:</strong> The proxy relay is mobile-only. On the Desktop app the MQTT settings are present, but no relay runs behind them.</p> </blockquote> <p>The <strong>MQTT proxy on this phone</strong> toggle at the top of the MQTT settings screen shows whether this relay is running and lets you cut it off (or restart it) immediately — without editing and re-saving the radio’s MQTT configuration.</p> <h3 id="default-meshtastic-broker"> <a href="#default-meshtastic-broker" class="anchor-heading" aria-labelledby="default-meshtastic-broker"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Default Meshtastic Broker </h3> <p>The community maintains a public broker at <code class="language-plaintext highlighter-rouge">mqtt.meshtastic.org</code>. This is intended for general use and testing.</p> <p>When this phone relays MQTT for the radio, connections to that broker always use TLS on port 8883 even if <strong>TLS enabled</strong> is off — that upgrade is the app’s own, and the switch says so. A radio that reaches the broker over its own Wi-Fi or Ethernet forces nothing: it uses <strong>TLS enabled</strong> as stored, so turn it on yourself or the radio connects in the clear on port 1883. For any other broker the toggle decides in both cases (port 8883 with TLS, 1883 without).</p> <blockquote> <p>🔒 <strong>Privacy:</strong> Messages on the public broker are readable by anyone subscribed. Always use channel encryption for private communications.</p> </blockquote> <h3 id="private-broker"> <a href="#private-broker" class="anchor-heading" aria-labelledby="private-broker"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Private Broker </h3> <p>For better privacy and control, you can run your own MQTT broker:</p> <ul> <li>Mosquitto (lightweight, open-source)</li> <li>HiveMQ</li> <li>EMQX</li> </ul> <p>Configure your node to point to your private broker with appropriate credentials.</p> <h2 id="map-reporting"> <a href="#map-reporting" class="anchor-heading" aria-labelledby="map-reporting"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Map Reporting </h2> <p>When <strong>Map reporting</strong> is on, your node periodically publishes a map report to the broker. The report goes out unencrypted, whatever keys your channels use, and carries your node id, long and short name, approximate location, hardware model, role, firmware version, LoRa region, modem preset, and primary channel name.</p> <p>Turning it on opens a consent card. Turn on <strong>I agree.</strong> and choose a <strong>Map reporting interval (seconds)</strong> of one hour or more — the screen will not save until you do. A slider sets the position precision, and the app shows the resulting accuracy as a ± distance, so you can publish an approximate location rather than an exact one.</p> <p>Reports appear at <a href="https://meshmap.net">meshmap.net</a> and similar community map services.</p> <blockquote> <p>🔒 <strong>Privacy:</strong> A map report is readable by anyone subscribed to the broker. Leave <strong>Map reporting</strong> off if you do not want your approximate location published.</p> </blockquote> <h2 id="uplink-vs-downlink"> <a href="#uplink-vs-downlink" class="anchor-heading" aria-labelledby="uplink-vs-downlink"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Uplink vs Downlink </h2> <div class="table-wrapper"><table> <thead> <tr> <th>Direction</th> <th>Опис</th> </tr> </thead> <tbody> <tr> <td><strong>Uplink</strong></td> <td>Messages from mesh → MQTT broker</td> </tr> <tr> <td><strong>Downlink</strong></td> <td>Messages from MQTT broker → mesh</td> </tr> </tbody> </table></div> <p>Uplink and downlink are per-channel settings, not MQTT module settings. Open <strong>Settings → Channels</strong>, tap the channel, and use <strong>MQTT Uplink Enabled</strong> and <strong>MQTT Downlink Enabled</strong>. Every channel you want bridged out needs uplink on, and every channel you want MQTT traffic injected into needs downlink on.</p> <h2 id="message-formats"> <a href="#message-formats" class="anchor-heading" aria-labelledby="message-formats"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Message Formats </h2> <p>MQTT carries two payload formats:</p> <div class="table-wrapper"><table> <thead> <tr> <th>Format</th> <th>Опис</th> <th>Use case</th> </tr> </thead> <tbody> <tr> <td><strong>Protobuf</strong></td> <td>Binary Meshtastic protobuf encoding</td> <td>Node-to-node mesh bridging</td> </tr> <tr> <td><strong>JSON</strong></td> <td>Human-readable JSON on the <code class="language-plaintext highlighter-rouge">/2/json/</code> topic</td> <td>Consumers outside the mesh (dashboards, home automation)</td> </tr> </tbody> </table></div> <blockquote> <p>ℹ️ <strong>Note:</strong> <code class="language-plaintext highlighter-rouge">json_enabled</code> is marked deprecated in the protobuf schema, but it has not been replaced and it is not ignored. When it is on, the app’s own MQTT proxy subscribes to the <code class="language-plaintext highlighter-rouge">/2/json/</code> topic and decodes those payloads.</p> </blockquote> <h2 id="encryption--privacy"> <a href="#encryption--privacy" class="anchor-heading" aria-labelledby="encryption--privacy"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Encryption &amp; Privacy </h2> <p>Understanding the layered encryption model:</p> <ol> <li><strong>Channel encryption</strong> happens on the mesh <em>before</em> MQTT. If your channel has a PSK, the MQTT payload is already encrypted — the broker and any subscribers see only the ciphertext.</li> <li><strong>Encryption enabled</strong> (the module setting) decides which copy of the packet the gateway publishes — it is not an extra layer. Leave it on and the broker receives the packet still encrypted with your channel key. Turn it off and the gateway publishes the decrypted packet, so anyone subscribed to the topic reads your messages in the clear. Turn it off only when you own the broker and want plain payloads for a dashboard.</li> <li><strong>TLS</strong> encrypts the TCP connection to the broker itself, preventing network-level eavesdropping.</li> </ol> <blockquote> <p>🔒 <strong>Security:</strong> The default public channel has a well-known key. Messages on the default channel sent via MQTT are effectively <strong>unencrypted</strong> — anyone can decode them. Always use a custom PSK for private communications.</p> </blockquote> <h2 id="best-practices"> <a href="#best-practices" class="anchor-heading" aria-labelledby="best-practices"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Best Practices </h2> <ul> <li>Use channel-level encryption (PSK) on channels that bridge to MQTT</li> <li>Don’t enable MQTT on nodes without internet access (the radio buffers unsendable messages and wastes memory)</li> <li>Use a private broker for sensitive deployments</li> <li>Be mindful of airtime when downlinking messages from busy MQTT topics — every downlinked message consumes radio airtime on your local mesh</li> <li>Consider enabling uplink-only if you only need to monitor your mesh remotely without injecting messages back</li> </ul> <h2 id="troubleshooting"> <a href="#troubleshooting" class="anchor-heading" aria-labelledby="troubleshooting"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Troubleshooting </h2> <h3 id="mqtt-not-connecting"> <a href="#mqtt-not-connecting" class="anchor-heading" aria-labelledby="mqtt-not-connecting"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> MQTT Not Connecting </h3> <ul> <li><strong>Check Wi-Fi</strong> — the gateway node must have an active internet connection (Wi-Fi or Ethernet). MQTT does not work over the LoRa radio link itself.</li> <li><strong>Verify credentials</strong> — with incorrect credentials, most brokers fail silently — double-check for trailing spaces.</li> <li><strong>Firewall</strong> — port 1883 (MQTT) or 8883 (MQTT over TLS) must be reachable. Some networks allow only web traffic (ports 80 and 443).</li> <li><strong>DNS resolution</strong> — if using a custom broker hostname, verify the node can resolve it. Try the broker’s IP address directly.</li> </ul> <h3 id="messages-not-bridging"> <a href="#messages-not-bridging" class="anchor-heading" aria-labelledby="messages-not-bridging"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Messages Not Bridging </h3> <ul> <li><strong>Check uplink/downlink settings</strong> — if only uplink is enabled, messages flow from mesh to MQTT but not back. Enable downlink on the receiving gateway.</li> <li><strong>Channel mismatch</strong> — both gateways must share the same channel with the same PSK. A mismatch means messages are encrypted with different keys and appear as garbage.</li> <li><strong>Topic mismatch</strong> — both gateways must use exactly the same root topic. Setting a region rewrites a default root to <code class="language-plaintext highlighter-rouge">msh/&lt;REGION&gt;</code> (for example <code class="language-plaintext highlighter-rouge">msh/US</code>), so gateways in different regions do not meet until you give both the same explicit root.</li> <li><strong>Ignore MQTT is on</strong> — in a region with a duty-cycle limit, the radio turns on <strong>Ignore MQTT</strong> (LoRa config, <strong>Advanced</strong>) when you set the region, and then drops every packet that reached it via MQTT. Turn it off on the receiving nodes, not only on the gateway.</li> <li><strong>Ok to MQTT is off</strong> — on a public broker a gateway uplinks other nodes’ packets only when the sending node has <strong>Ok to MQTT</strong> (LoRa config, <strong>Advanced</strong>) on. Your own traffic bridges either way; your neighbors’ does not until they opt in.</li> </ul> <h2 id="related-topics"> <a href="#related-topics" class="anchor-heading" aria-labelledby="related-topics"><svg viewBox="0 0 16 16" aria-hidden="true"><use xlink:href="#svg-link"></use></svg></a> Related Topics </h2> <ul> <li><a href="settings-module-admin">Settings — Modules &amp; Admin</a> — MQTT module configuration reference</li> <li><a href="messages-and-channels">Messages &amp; Channels</a> — channel encryption and PSK setup</li> <li><a href="https://meshtastic.org/docs/software/integrations/mqtt">MQTT integration guide</a> — detailed MQTT documentation on meshtastic.org</li> </ul> </div> <style> .locale-page-banner { background: rgba(103, 234, 148, 0.1); border: 1px solid rgba(103, 234, 148, 0.3); border-radius: 12px; padding: 10px 16px; margin-bottom: 1.5rem; font-size: 0.85rem; } .locale-notice a { margin-left: 12px; font-weight: 500; } </style> </main> <hr> <footer> <footer class="site-footer"> Copyright &copy; 2026 Meshtastic LLC. Distributed under the <a href="https://www.gnu.org/licenses/gpl-3.0.html">GPL v3 License.</a> </footer> <div class="d-sm-block d-md-none"> <div class="mt-4 fs-2"> This site uses <a href="https://github.com/just-the-docs/just-the-docs">Just the Docs</a>, a documentation theme for Jekyll. </div> </div> </footer> </div> </div> <div class="search-overlay"></div> </div> </body> </html>