Files
OpenMQTTGateway/dev/upload/builds.html
2025-12-07 21:34:49 +00:00

243 lines
52 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>(Option 3) Upload your configurations | Theengs OpenMQTTGateway DEVELOPMENT SHA:36682c TEST ONLY</title>
<meta name="generator" content="VuePress 1.9.10">
<link rel="apple-touch-icon" sizes="180x180" href=".apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/dev/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/dev/favicon-16x16.png">
<link rel="manifest" href="/dev/manifest.json">
<link rel="mask-icon" href="/dev/icons/safari-pinned-tab.svg" color="#3eaf7c">
<script type="module" src="https://unpkg.com/esp-web-tools@9.4.3/dist/web/install-button.js?module"></script>
<meta name="description" content="One gateway, many technologies: MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, LoRa, beacons detection, mi flora / mi jia / LYWSD02/ Mi Scale compatibility, SMS &amp; LORA.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#3eaf7c">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="msapplication-TileImage" content="/favicon-144x144.png">
<meta name="msapplication-TileColor" content="#000000">
<link rel="preload" href="/dev/assets/css/0.styles.0f5b7756.css" as="style"><link rel="preload" href="/dev/assets/js/app.33921e4a.js" as="script"><link rel="preload" href="/dev/assets/js/2.f90febc1.js" as="script"><link rel="preload" href="/dev/assets/js/1.848070c7.js" as="script"><link rel="preload" href="/dev/assets/js/59.fc715049.js" as="script"><link rel="prefetch" href="/dev/assets/js/10.54a69cb0.js"><link rel="prefetch" href="/dev/assets/js/11.6556d787.js"><link rel="prefetch" href="/dev/assets/js/12.e41769b6.js"><link rel="prefetch" href="/dev/assets/js/13.f2f65af0.js"><link rel="prefetch" href="/dev/assets/js/14.286ec29b.js"><link rel="prefetch" href="/dev/assets/js/15.91304de5.js"><link rel="prefetch" href="/dev/assets/js/16.7c2b5a08.js"><link rel="prefetch" href="/dev/assets/js/17.e1333746.js"><link rel="prefetch" href="/dev/assets/js/18.42cba936.js"><link rel="prefetch" href="/dev/assets/js/19.71e6901b.js"><link rel="prefetch" href="/dev/assets/js/20.fbef6fa1.js"><link rel="prefetch" href="/dev/assets/js/21.0e500e6c.js"><link rel="prefetch" href="/dev/assets/js/22.1fa11360.js"><link rel="prefetch" href="/dev/assets/js/23.d5ff69ee.js"><link rel="prefetch" href="/dev/assets/js/24.7abe1c27.js"><link rel="prefetch" href="/dev/assets/js/25.3cdd6711.js"><link rel="prefetch" href="/dev/assets/js/26.60581abf.js"><link rel="prefetch" href="/dev/assets/js/27.f4bc0108.js"><link rel="prefetch" href="/dev/assets/js/28.23e9a1c4.js"><link rel="prefetch" href="/dev/assets/js/29.aac2a444.js"><link rel="prefetch" href="/dev/assets/js/3.2fb8cc22.js"><link rel="prefetch" href="/dev/assets/js/30.a35bbc54.js"><link rel="prefetch" href="/dev/assets/js/31.7ec0b927.js"><link rel="prefetch" href="/dev/assets/js/32.bf6ed2d3.js"><link rel="prefetch" href="/dev/assets/js/33.66867073.js"><link rel="prefetch" href="/dev/assets/js/34.1144d4cf.js"><link rel="prefetch" href="/dev/assets/js/35.de5ccc4f.js"><link rel="prefetch" href="/dev/assets/js/36.adfdf2f5.js"><link rel="prefetch" href="/dev/assets/js/37.8a3f6ff9.js"><link rel="prefetch" href="/dev/assets/js/38.55a68009.js"><link rel="prefetch" href="/dev/assets/js/39.089b560c.js"><link rel="prefetch" href="/dev/assets/js/4.ee469e2f.js"><link rel="prefetch" href="/dev/assets/js/40.54f66a91.js"><link rel="prefetch" href="/dev/assets/js/41.c56bed06.js"><link rel="prefetch" href="/dev/assets/js/42.a8267a4e.js"><link rel="prefetch" href="/dev/assets/js/43.73d8f4d8.js"><link rel="prefetch" href="/dev/assets/js/44.790d8d70.js"><link rel="prefetch" href="/dev/assets/js/45.aa140053.js"><link rel="prefetch" href="/dev/assets/js/46.a3d8b6f4.js"><link rel="prefetch" href="/dev/assets/js/47.7a8191ba.js"><link rel="prefetch" href="/dev/assets/js/48.f2c8695b.js"><link rel="prefetch" href="/dev/assets/js/49.d705f84d.js"><link rel="prefetch" href="/dev/assets/js/5.45a12acb.js"><link rel="prefetch" href="/dev/assets/js/50.df420363.js"><link rel="prefetch" href="/dev/assets/js/51.4d19c6ad.js"><link rel="prefetch" href="/dev/assets/js/52.d3d8653e.js"><link rel="prefetch" href="/dev/assets/js/53.6344416c.js"><link rel="prefetch" href="/dev/assets/js/54.7361c051.js"><link rel="prefetch" href="/dev/assets/js/55.a83c3bcc.js"><link rel="prefetch" href="/dev/assets/js/56.64c3f900.js"><link rel="prefetch" href="/dev/assets/js/57.bbcbc292.js"><link rel="prefetch" href="/dev/assets/js/58.4d098c0a.js"><link rel="prefetch" href="/dev/assets/js/6.88e76e8e.js"><link rel="prefetch" href="/dev/assets/js/60.7e3979c2.js"><link rel="prefetch" href="/dev/assets/js/61.096d97a1.js"><link rel="prefetch" href="/dev/assets/js/62.d32662df.js"><link rel="prefetch" href="/dev/assets/js/63.118c24b3.js"><link rel="prefetch" href="/dev/assets/js/64.25208722.js"><link rel="prefetch" href="/dev/assets/js/65.bd30a68b.js"><link rel="prefetch" href="/dev/assets/js/66.6b3e6794.js"><link rel="prefetch" href="/dev/assets/js/67.0d566ba2.js"><link rel="prefetch" href="/dev/assets/js/7.747393f7.js"><link rel="prefetch" href="/dev/assets/js/vendors~docsearch.9de5652f.js">
<link rel="stylesheet" href="/dev/assets/css/0.styles.0f5b7756.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/dev/" class="home-link router-link-active"><!----> <span class="site-name">Theengs OpenMQTTGateway DEVELOPMENT SHA:36682c TEST ONLY</span></a> <div class="links"><!----> <nav class="nav-links can-hide"><div class="nav-item"><a href="https://www.theengs.io" target="_self" class="nav-link external">
Home
<!----></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Use cases" class="dropdown-title"><span class="title">Use cases</span> <span class="arrow down"></span></button> <button type="button" aria-label="Use cases" class="mobile-dropdown-title"><span class="title">Use cases</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.theengs.io/usecases/smarthome.html" target="_self" class="nav-link external">
Smart Home
<!----></a></li><li class="dropdown-item"><!----> <a href="https://www.theengs.io/usecases/iot.html" target="_self" class="nav-link external">
IoT
<!----></a></li><li class="dropdown-item"><!----> <a href="https://www.theengs.io/usecases/research.html" target="_self" class="nav-link external">
Research
<!----></a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Solutions" class="dropdown-title"><span class="title">Solutions</span> <span class="arrow down"></span></button> <button type="button" aria-label="Solutions" class="mobile-dropdown-title"><span class="title">Solutions</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
Hardware
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://shop.theengs.io/products/theengs-plug-smart-plug-ble-gateway-and-energy-consumption" target="_self" class="nav-link external">
Theengs Plug
<!----></a></li><li class="dropdown-subitem"><a href="https://shop.theengs.io/products/theengs-bridge-esp32-ble-mqtt-gateway-with-ethernet-and-external-antenna" target="_self" class="nav-link external">
Theengs Bridge
<!----></a></li></ul></li><li class="dropdown-item"><h4>
Software
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://app.theengs.io" target="_self" class="nav-link external">
Mobile App
<!----></a></li><li class="dropdown-subitem"><a href="https://docs.openmqttgateway.com" target="_self" class="nav-link external">
OpenMQTTGateway
<!----></a></li><li class="dropdown-subitem"><a href="https://gateway.theengs.io" target="_self" class="nav-link external">
Gateway
<!----></a></li></ul></li><li class="dropdown-item"><h4>
Core
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://decoder.theengs.io" target="_self" class="nav-link external">
Decoder
<!----></a></li><li class="dropdown-subitem"><a href="https://parser.theengs.io" target="_self" class="nav-link external">
Web Parser
<!----></a></li></ul></li></ul></div></div><div class="nav-item"><a href="https://decoder.theengs.io/devices/devices.html" target="_self" class="nav-link external">
Compatible devices
<!----></a></div><div class="nav-item"><a href="https://community.openmqttgateway.com" target="_self" class="nav-link external">
Community
<!----></a></div><div class="nav-item"><a href="https://shop.theengs.io/" target="_self" class="nav-link external">
Shop
<!----></a></div><div class="nav-item"><a href="https://github.com/sponsors/theengs" target="_self" class="nav-link external">
Sponsor 🤍
<!----></a></div> <a href="https://github.com/1technophile/OpenMQTTGateway" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="https://www.theengs.io" target="_self" class="nav-link external">
Home
<!----></a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Use cases" class="dropdown-title"><span class="title">Use cases</span> <span class="arrow down"></span></button> <button type="button" aria-label="Use cases" class="mobile-dropdown-title"><span class="title">Use cases</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://www.theengs.io/usecases/smarthome.html" target="_self" class="nav-link external">
Smart Home
<!----></a></li><li class="dropdown-item"><!----> <a href="https://www.theengs.io/usecases/iot.html" target="_self" class="nav-link external">
IoT
<!----></a></li><li class="dropdown-item"><!----> <a href="https://www.theengs.io/usecases/research.html" target="_self" class="nav-link external">
Research
<!----></a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="Solutions" class="dropdown-title"><span class="title">Solutions</span> <span class="arrow down"></span></button> <button type="button" aria-label="Solutions" class="mobile-dropdown-title"><span class="title">Solutions</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><h4>
Hardware
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://shop.theengs.io/products/theengs-plug-smart-plug-ble-gateway-and-energy-consumption" target="_self" class="nav-link external">
Theengs Plug
<!----></a></li><li class="dropdown-subitem"><a href="https://shop.theengs.io/products/theengs-bridge-esp32-ble-mqtt-gateway-with-ethernet-and-external-antenna" target="_self" class="nav-link external">
Theengs Bridge
<!----></a></li></ul></li><li class="dropdown-item"><h4>
Software
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://app.theengs.io" target="_self" class="nav-link external">
Mobile App
<!----></a></li><li class="dropdown-subitem"><a href="https://docs.openmqttgateway.com" target="_self" class="nav-link external">
OpenMQTTGateway
<!----></a></li><li class="dropdown-subitem"><a href="https://gateway.theengs.io" target="_self" class="nav-link external">
Gateway
<!----></a></li></ul></li><li class="dropdown-item"><h4>
Core
</h4> <ul class="dropdown-subitem-wrapper"><li class="dropdown-subitem"><a href="https://decoder.theengs.io" target="_self" class="nav-link external">
Decoder
<!----></a></li><li class="dropdown-subitem"><a href="https://parser.theengs.io" target="_self" class="nav-link external">
Web Parser
<!----></a></li></ul></li></ul></div></div><div class="nav-item"><a href="https://decoder.theengs.io/devices/devices.html" target="_self" class="nav-link external">
Compatible devices
<!----></a></div><div class="nav-item"><a href="https://community.openmqttgateway.com" target="_self" class="nav-link external">
Community
<!----></a></div><div class="nav-item"><a href="https://shop.theengs.io/" target="_self" class="nav-link external">
Shop
<!----></a></div><div class="nav-item"><a href="https://github.com/sponsors/theengs" target="_self" class="nav-link external">
Sponsor 🤍
<!----></a></div> <a href="https://github.com/1technophile/OpenMQTTGateway" target="_blank" rel="noopener noreferrer" class="repo-link">
GitHub
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></nav> <ul class="sidebar-links"><li><a href="/dev/" aria-current="page" class="sidebar-link">0 - What is it for 🏠</a></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>1 - Prerequisites🧭</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>2 - Set it up 🔨</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>3 - Upload ➡️</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/dev/upload/web-install.html" class="sidebar-link">(Option 1) Upload from the web</a></li><li><a href="/dev/upload/binaries.html" class="sidebar-link">(Option 2) Upload ready-to-go binaries</a></li><li><a href="/dev/upload/builds.html" aria-current="page" class="active sidebar-link">(Option 3) Upload your configurations</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/dev/upload/builds.html#introduction" class="sidebar-link">Introduction</a></li><li class="sidebar-sub-header"><a href="/dev/upload/builds.html#configure-upload-with-platformio" class="sidebar-link">Configure &amp; Upload with PlatformIO</a></li><li class="sidebar-sub-header"><a href="/dev/upload/builds.html#api" class="sidebar-link">API</a></li></ul></li><li><a href="/dev/upload/gitpod.html" class="sidebar-link">(Option 4) Build from the web</a></li><li><a href="/dev/upload/portal.html" class="sidebar-link">Wifi and MQTT configuration</a></li><li><a href="/dev/upload/advanced-configuration.html" class="sidebar-link">Advanced configuration of the gateway</a></li><li><a href="/dev/upload/troubleshoot.html" class="sidebar-link">Troubleshooting</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>4 - Use ✈️</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>5 - Integrate 🎉</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>6 - Participate 💻</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="option-3-upload-your-configurations"><a href="#option-3-upload-your-configurations" class="header-anchor">#</a> (Option 3) Upload your configurations</h1> <h2 id="introduction"><a href="#introduction" class="header-anchor">#</a> Introduction</h2> <p>This section is useful if you want to make an advanced project configuration not supported by the pre-built binaries.</p> <p>Advanced configuration means changing the default pins, the MQTT topics, and all the expert parameters that you can find in <a href="https://github.com/1technophile/OpenMQTTGateway/blob/development/main/User_config.h" target="_blank" rel="noopener noreferrer"><code>User_config.h</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> and in all <a href="https://github.com/1technophile/OpenMQTTGateway/tree/development/main" target="_blank" rel="noopener noreferrer"><code>config_XX.h</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> files. If you don't have to change the default parameters except Wi-Fi and MQTT broker settings, you don't need advanced configuration; you can go directly to the <a href="/dev/upload/binaries.html">Upload Binaries</a> section instead.</p> <h2 id="configure-upload-with-platformio"><a href="#configure-upload-with-platformio" class="header-anchor">#</a> Configure &amp; Upload with PlatformIO</h2> <ul><li>Download the <a href="https://github.com/1technophile/OpenMQTTGateway/releases" target="_blank" rel="noopener noreferrer">CODE<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a> from github.</li> <li>Open the <code>OpenMQTTGateway</code> folder</li></ul> <p>You will find inside the folder a <code>platformio.ini</code> config file. PlatformIO uses this file to define how to build OMG for different kinds of hardware. Not just that, but it also specifies which modules to turn on and off. And there's more: it also lets you configure the settings of those modules.</p> <p>PlatformIO config files work on the concept of overriding. At first, a very simple base &quot;environment&quot; is specified that specifies common variables shared by all situations:</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">env</span><span class="token punctuation">]</span></span>
<span class="token key attr-name">framework</span> <span class="token punctuation">=</span> <span class="token value attr-value">arduino</span>
<span class="token key attr-name">lib_deps</span> <span class="token punctuation">=</span>
${libraries.picomqtt}
${libraries.arduinojson}
${libraries.arduinolog}
<span class="token key attr-name">build_flags</span> <span class="token punctuation">=</span>
-w ; supress all warnings
<span class="token comment">; '-DLOG_LEVEL=LOG_LEVEL_TRACE' ; Enable trace level logging</span>
<span class="token key attr-name">monitor_speed</span> <span class="token punctuation">=</span> <span class="token value attr-value">115200</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br></div></div><p>Later &quot;environments&quot; get more specific, but inherit everything that was defined in this common environment:</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">com-esp</span><span class="token punctuation">]</span></span>
<span class="token key attr-name">lib_deps</span> <span class="token punctuation">=</span>
${env.lib_deps} ; Inherit all the library dependencies from [env]
${libraries.wifimanager} ; Add another library dependency on top of them
<span class="token key attr-name">build_flags</span> <span class="token punctuation">=</span>
${env.build_flags} ; Inherit all the build flags from [env]
<span class="token key attr-name">'-DsimpleReceiving</span><span class="token punctuation">=</span><span class="token value attr-value">true' ; Add some of our own build flags</span>
<span class="token key attr-name">'-DZmqttDiscovery</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;HADiscovery&quot;'</span>
<span class="token comment">;'-DCORE_DEBUG_LEVEL=4'</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><p>Here, build flags starting with &quot;-D&quot; let us set configuration values you would normally find in <code>User_config.h</code> and <code>config_xx.h</code> files by specifying them here, overriding the default values set in those files. To include special characters, you can triple escape them with a backslash like so:</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code> <span class="token key attr-name">'-Dwifi_password</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;Cato\\\'sYounger\\\$on&quot;' ; Cato'sYounger$on</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>The different listed configurations in <code>platformio.ini</code> represent some standard environments and boards. For example, the environment</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">env:nodemcuv2-pilight</span><span class="token punctuation">]</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>sets the default settings for ESP8266 (NodeMCU v2) devices using the Plight module.</p> <h3 id="option-a-creating-a-portable-config-file"><a href="#option-a-creating-a-portable-config-file" class="header-anchor">#</a> <em>(Option A)</em> Creating a portable config file</h3> <p>You could make your configuration changes directly by editing the values in <code>User_config.h</code> (for main OMG settings) and <code>config_XX.h</code> (for module-specific settings). You could also make most of those changes by instead writing some -D build flags in <code>platformio.ini</code>. But for maximum portability, a feature of PlatformIO allows you to make your configurations by creating a new file and listing all of your overrides there. This way, you can pull the latest OMG code changes without losing your configurations, or having to re-enter them manually.</p> <p>To do this, create a file with a name ending in <code>_env.ini</code>, such as <code>production_env.ini</code>, into the root folder next to <code>platformio.ini</code>. PlatformIO will scan for all files ending in <code>_env.ini</code> and use it to override the default values in <code>platformio.ini</code>.</p> <p>At the top of your <code>*_env.ini</code> file, for example, put the following to enable the ESP8266 (NodeMCU v2) with the Pilight module.</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">platformio</span><span class="token punctuation">]</span></span>
<span class="token key attr-name">default_envs</span> <span class="token punctuation">=</span> <span class="token value attr-value">nodemcuv2-pilight</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>This will make this environment the default environment for this PlatformIO project. If another environment isn't specified when building, it will default to this one.</p> <p>For the rest of your config file, you can override the default configurations or add new configurations to existing environments in <code>platformio.ini</code>, or create a new environment. For example, if want to use both Pilight module and the BME280 module with an ESP8266, we can create a new environment. This is an example <code>my_env.ini</code> file that creates two new environments:</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">platformio</span><span class="token punctuation">]</span></span>
<span class="token key attr-name">default_envs</span> <span class="token punctuation">=</span> <span class="token value attr-value">nodemcuv2-pilight-bme280-ota</span>
<span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">env:nodemcuv2-pilight-bme280</span><span class="token punctuation">]</span></span>
<span class="token key attr-name">extends</span> <span class="token punctuation">=</span> <span class="token value attr-value">env:nodemcuv2-pilight</span>
<span class="token key attr-name">lib_deps</span> <span class="token punctuation">=</span>
${env:nodemcuv2-pilight.lib_deps}
${libraries.bme280}
<span class="token key attr-name">build_flags</span> <span class="token punctuation">=</span>
${env:nodemcuv2-pilight.build_flags}
<span class="token key attr-name">'-DGateway_Name</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;OpenMQTTGateway&quot;'</span>
<span class="token key attr-name">'-DZsensorBME280</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;BME280&quot;'</span>
<span class="token key attr-name">'-DBase_Topic</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;rf/&quot;'</span>
<span class="token key attr-name">'-DESPWifiManualSetup</span><span class="token punctuation">=</span><span class="token value attr-value">true'</span>
<span class="token key attr-name">'-Dwifi_ssid</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;mynetwork&quot;'</span>
<span class="token key attr-name">'-Dwifi_password</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;Cato\\\'sYounger\\\$on&quot;' ; Cato'sYounger$on</span>
<span class="token key attr-name">'-DMQTT_USER</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;mqttusername&quot;'</span>
<span class="token key attr-name">'-DMQTT_PASS</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;mqttpassword&quot;'</span>
<span class="token key attr-name">'-DMQTT_SERVER</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;mqttserver.local&quot;'</span>
<span class="token key attr-name">'-Dgw_password</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;12345678&quot;'</span>
<span class="token key attr-name">'-DLED_RECEIVE</span><span class="token punctuation">=</span><span class="token value attr-value">LED_BUILTIN' ; Comment 1</span>
<span class="token key attr-name">'-DLED_RECEIVE_ON</span><span class="token punctuation">=</span><span class="token value attr-value">LOW' ; Comment 2</span>
<span class="token key attr-name">'-DRF_RECEIVER_GPIO</span><span class="token punctuation">=</span><span class="token value attr-value">13'</span>
<span class="token key attr-name">'-DRF_EMITTER_GPIO</span><span class="token punctuation">=</span><span class="token value attr-value">15'</span>
<span class="token key attr-name">'-DsimpleReceiving</span><span class="token punctuation">=</span><span class="token value attr-value">false'</span>
'-UZmqttDiscovery' ; Disable HA discovery
<span class="token key attr-name">monitor_speed</span> <span class="token punctuation">=</span> <span class="token value attr-value">115200</span>
<span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">env:nodemcuv2-pilight-bme280-ota</span><span class="token punctuation">]</span></span>
<span class="token key attr-name">extends</span> <span class="token punctuation">=</span> <span class="token value attr-value">env:nodemcuv2-pilight-bme280</span>
<span class="token key attr-name">upload_protocol</span> <span class="token punctuation">=</span> <span class="token value attr-value">espota</span>
<span class="token key attr-name">upload_port</span> <span class="token punctuation">=</span> <span class="token value attr-value">OpenMQTTGateway.local</span>
<span class="token key attr-name">upload_flags</span> <span class="token punctuation">=</span>
<span class="token key attr-name">--auth</span><span class="token punctuation">=</span><span class="token value attr-value">otapassword</span>
<span class="token key attr-name">--port</span><span class="token punctuation">=</span><span class="token value attr-value">8266</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br></div></div><div class="custom-block warning"><p class="custom-block-title">Note</p> <p>Adding manual WiFi and MQTT credentials to an environment also requires to define
<code>'-DESPWifiManualSetup=true'</code>
for the credentials to be registered correctly.</p></div> <div class="custom-block warning"><p class="custom-block-title">Note</p> <p>Manual network configuration (IP, netmask, gateway, DNS) requires to define
<code>'-DNetworkAdvancedSetup=true'</code>
and related network parameters, e.g.:</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>'-DNET_IP=&quot;192.168.1.99&quot;'
'-DNET_MASK=&quot;255.255.255.0&quot;'
'-DNET_GW=&quot;192.168.1.1&quot;'
'-DNET_DNS=&quot;1.1.1.1&quot;'
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div></div> <p>The first new environment we create, <code>nodemcuv2-pilight-bme280</code>, inherits the default <code>nodemcuv2-pilight</code> environment in <code>platformio.ini</code> with the <code>extends = env:nodemcuv2-pilight</code> line. In the <code>lib_deps</code> section, it imports all the <code>lib_deps</code> of <code>nodemcuv2-pilight</code> with the <code>${env:nodemcuv2-pilight.lib_deps}</code> line, and adds BME280 on top of it. (Since the environment we're extending already has this <code>lib_deps</code> attribute, specifying it again would normally replace it completely with our new attribute; instead, to keep its value but simply append to it, we import the original in the beginning of our <code>lib_deps</code> attribute.) In the <code>build_flags</code> section, it again imports all the <code>build_flags</code> of <code>nodemcuv2-pilight</code> and many of its own overrides, e.g. changing <code>Base_Topic</code> found in <code>User_config.h</code> from the default to &quot;rf/&quot; by using the <code>'-DBase_Topic=&quot;rf/&quot;'</code> line. It also unsets previously set configurations (i.e. <code>mqttDiscovery</code>) by using <code>'-UZmqttDiscovery'</code>. This environment will work over serial upload.</p> <p>The second new environment, <code>nodemcuv2-pilight-bme280-ota</code>, inherits everything we specified in the first environment (with the line <code>extends = env:nodemcuv2-pilight-bme280</code>), but modifies it to upload over OTA (Wi-Fi). We also specified this as the <code>default_env</code> in the beginning of the file, so PlatformIO will choose this environment to build and upload if we don't specify otherwise.</p> <p>The first time we're flashing OMG to the board, we can use the command <code>pio run --target upload --environment nodemcuv2-pilight-bme280</code> to specify that we want to build and run the <code>nodemcuv2-pilight-bme280</code> environment (over USB serial). Afterwards, we don't have to specify <code>--environment</code> (e.g. just run <code>pio run --target upload</code>) to run the default <code>nodemcuv2-pilight-bme280-ota</code> environment and update the code over the air.</p> <h3 id="option-b-editing-files-directly"><a href="#option-b-editing-files-directly" class="header-anchor">#</a> <em>(Option B)</em> Editing files directly</h3> <p>You can also modify the <code>User_config.h</code> file and your modules' <code>config_XX.h</code> files to your liking, and then edit the <code>platformio.ini</code> file to uncomment the <code>default_envs</code> lines corresponding to your board and chosen modules, like below:</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token comment">;default_envs = sonoff-basic-rfr3</span>
<span class="token comment">;default_envs = rfbridge</span>
<span class="token comment">;default_envs = esp32dev-all</span>
<span class="token key attr-name">default_envs</span> <span class="token punctuation">=</span> <span class="token value attr-value">esp32dev-rf</span>
<span class="token comment">;default_envs = esp32dev-ir</span>
<span class="token comment">;default_envs = esp32dev-ble</span>
<span class="token comment">;default_envs = ttgo-lora32-v1</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div><p>If you don't know which <code>env</code> to activate, you can refer to <a href="../prerequisites/devices">devices</a>.</p> <p>If you want to add more sensors or gateways to one <code>default_envs</code> you can add the modules directly into your environment definition of your <code>.ini</code> files or uncomment them in <a href="https://github.com/1technophile/OpenMQTTGateway/blob/d2dd6138558909b71cc44f69665340247bd5f356/main/User_config.h#L84" target="_blank" rel="noopener noreferrer"><code>User_config.h</code><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>.</p> <p>Example to add IR to <code>esp32dev-rf</code> add the <code>build_flags</code> below to the env definition:</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code> <span class="token key attr-name">'-DZgatewayIR</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;IR&quot;'</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">env:esp32dev-rf</span><span class="token punctuation">]</span></span>
<span class="token key attr-name">platform</span> <span class="token punctuation">=</span> <span class="token value attr-value">${com.esp32_platform}</span>
<span class="token key attr-name">platform_packages</span> <span class="token punctuation">=</span> <span class="token value attr-value">${com.esp32_platform_packages}</span>
<span class="token key attr-name">board</span> <span class="token punctuation">=</span> <span class="token value attr-value">esp32dev</span>
<span class="token key attr-name">lib_deps</span> <span class="token punctuation">=</span>
${com-esp.lib_deps}
${libraries.rc-switch}
<span class="token key attr-name">build_flags</span> <span class="token punctuation">=</span>
${com-esp.build_flags}
<span class="token key attr-name">'-DZgatewayRF</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;RF&quot;'</span>
<span class="token key attr-name">'-DZgatewayIR</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;IR&quot;'</span>
<span class="token key attr-name">'-DGateway_Name</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;OpenMQTTGateway_ESP32_RF_IR&quot;'</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br></div></div><p>Once your configuration is done you can upload the program to your board by clicking on the white arrow at the blue bottom bar of your PIO editor or with the following command:
<code>pio run --target upload</code></p> <p>PIO will download the necessaries platform and libraries with the correct versions, build the code and upload it.</p> <p>If you encounter errors the first thing to do is to clean your environment by using the white dust bin in the blue bottom bar of your PIO editor or with the following command:
<code>pio run --target clean</code></p> <p>With some ESP it could be necessary to push the reset button when the upload begin.</p> <p>If you want to erase the settings stored in the ESP memory use:
<code>pio run --target erase</code>
This can be useful especially before the first upload or when you change the board partitions sizing.</p> <p>Once done the gateway should connect to your network and your broker, you should see it into the broker in the form of the following messages:</p> <div class="language- line-numbers-mode"><pre class="language-text"><code>home/OpenMQTTGateway/LWT Online
home/OpenMQTTGateway/version
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>With PIO you can also upload the firmware through Over the Air, so as to do that you can add the upload options flags used below, <code>upload_port</code> is the IP address of your ESP:</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">env:esp32-ble</span><span class="token punctuation">]</span></span>
<span class="token key attr-name">platform</span> <span class="token punctuation">=</span> <span class="token value attr-value">${com.esp32_platform}</span>
<span class="token key attr-name">platform_packages</span> <span class="token punctuation">=</span> <span class="token value attr-value">${com.esp32_platform_packages}</span>
<span class="token key attr-name">board</span> <span class="token punctuation">=</span> <span class="token value attr-value">esp32dev</span>
<span class="token key attr-name">board_build.partitions</span> <span class="token punctuation">=</span> <span class="token value attr-value">min_spiffs.csv</span>
<span class="token key attr-name">lib_deps</span> <span class="token punctuation">=</span>
${com-esp.lib_deps}
${libraries.ble}
<span class="token key attr-name">build_flags</span> <span class="token punctuation">=</span>
${com-esp.build_flags}
<span class="token key attr-name">'-DZgatewayBT</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;BT&quot;'</span>
<span class="token key attr-name">'-DGateway_Name</span><span class="token punctuation">=</span><span class="token value attr-value">&quot;OpenMQTTGateway_ESP32&quot;'</span>
<span class="token key attr-name">upload_protocol</span> <span class="token punctuation">=</span> <span class="token value attr-value">espota</span>
<span class="token key attr-name">upload_port</span> <span class="token punctuation">=</span> <span class="token value attr-value">192.168.1.22</span>
<span class="token key attr-name">upload_flags</span> <span class="token punctuation">=</span>
<span class="token key attr-name">--auth</span><span class="token punctuation">=</span><span class="token value attr-value">OTAPASSWORD</span>
<span class="token key attr-name">--port</span><span class="token punctuation">=</span><span class="token value attr-value">8266</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br></div></div><h2 id="api"><a href="#api" class="header-anchor">#</a> API</h2> <p>With the V0.9 we added the support of json for receiving and publishing.
Per default Json reception and Json publication is activated, the previous simple reception mode is also activated to avoid regression on commands.</p> <p>You can deactivate Json or simple mode following theses instructions:</p> <div class="language-cpp line-numbers-mode"><pre class="language-cpp"><code><span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name">jsonPublishing</span> <span class="token expression"><span class="token boolean">true</span> </span><span class="token comment">//define false if you don't want to use Json publishing (one topic for all the parameters)</span></span>
<span class="token comment">//example home/OpenMQTTGateway_ESP32_DEVKIT/BTtoMQTT/4XXXXXXXXXX4 {&quot;rssi&quot;:-63,&quot;servicedata&quot;:&quot;fe0000000000000000000000000000000000000000&quot;}</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name">simplePublishing</span> <span class="token expression"><span class="token boolean">false</span> </span><span class="token comment">//define true if you want to use simple publishing (one topic for one parameter)</span></span>
<span class="token comment">//example</span>
<span class="token comment">// home/OpenMQTTGateway_ESP32_DEVKIT/BTtoMQTT/4XXXXXXXXXX4/rssi -63.0</span>
<span class="token comment">// home/OpenMQTTGateway_ESP32_DEVKIT/BTtoMQTT/4XXXXXXXXXX4/servicedata fe0000000000000000000000000000000000000000</span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name">simpleReceiving</span> <span class="token expression"><span class="token boolean">true</span> </span><span class="token comment">//define false if you don't want to use old way reception analysis</span></span>
<span class="token macro property"><span class="token directive-hash">#</span><span class="token directive keyword">define</span> <span class="token macro-name">jsonReceiving</span> <span class="token expression"><span class="token boolean">true</span> </span><span class="token comment">//define false if you don't want to use Json reception analysis</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br></div></div><p>If you are using platformio you can also comment the definitions above and define your parameters into platformio.ini file by setting the following <code>build_flags</code>:</p> <div class="language-cpp line-numbers-mode"><pre class="language-cpp"><code> <span class="token char">'-DjsonPublishing=true'</span>
<span class="token char">'-DjsonReceiving=true'</span>
<span class="token char">'-DsimpleReceiving=true'</span>
<span class="token char">'-DsimplePublishing=true'</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br></div></div><p>Note that depending on the environment the default platformio.ini has common option defined see sections:</p> <div class="language-ini line-numbers-mode"><pre class="language-ini"><code><span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">com-arduino</span><span class="token punctuation">]</span></span>
<span class="token section"><span class="token punctuation">[</span><span class="token section-name selector">com-esp</span><span class="token punctuation">]</span></span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p>If you want to use HASS MQTT discovery you need to have
<code>#define jsonPublishing true</code>
&amp;
<code>#define ZmqttDiscovery &quot;HADiscovery&quot;</code>
uncommented.
Added to that auto discovery box should be selected into your Home Assistant MQTT integration configuration.</p> <p>With an ESP if you did not set your network and MQTT parameters manually you can now open the <a href="/dev/upload/portal.html">web portal configuration</a>.</p> <div class="custom-block warning"><p class="custom-block-title">Note</p> <p>simpleReceiving on Arduino boards doesn't accept 64 bits MQTT values, you can only send 32bits values from the MQTT broker.</p></div> <p><a href="https://hits.seeyoufarm.com" target="_blank" rel="noopener noreferrer"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fdocs.openmqttgateway.com%2Fupload%2Fbuilds.html&amp;count_bg=%2379C83D&amp;title_bg=%23555555&amp;icon=&amp;icon_color=%23E7E7E7&amp;title=hits&amp;edge_flat=false" alt="Hits"><span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/1technophile/OpenMQTTGateway/edit/development/docs/upload/builds.md" target="_blank" rel="noopener noreferrer">Edit this page</a> <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></div> <div class="last-updated"><span class="prefix">Last Updated:</span> <span class="time">12/7/2025, 4:27:01 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
<a href="/dev/upload/binaries.html" class="prev">
(Option 2) Upload ready-to-go binaries
</a></span> <span class="next"><a href="/dev/upload/gitpod.html">
(Option 4) Build from the web
</a>
</span></p></div> </main></div><div class="global-ui"></div></div>
<script src="/dev/assets/js/app.33921e4a.js" defer></script><script src="/dev/assets/js/2.f90febc1.js" defer></script><script src="/dev/assets/js/1.848070c7.js" defer></script><script src="/dev/assets/js/59.fc715049.js" defer></script>
</body>
</html>