Files
OpenMQTTGateway/dev/integrate/openhab3.html
DigiH 8889d3720e deploy: 296248f64b
deploy: 2440c143c0

deploy: 2440c143c0

deploy: 296248f64b

deploy: 296248f64b

deploy: a0919bbba4

deploy: 6a4b38a0cb

deploy: 4c633da151

deploy: 5a07020144

deploy: 25af43bdeb

deploy: 771b792484

deploy: 771b792484

deploy: 7db2e93c28

deploy: 5421f0e995

deploy: 5421f0e995

deploy: 5421f0e995

deploy: 5421f0e995

deploy: 5421f0e995

deploy: fb42293631

deploy: fb42293631

deploy: fb42293631

deploy: fb42293631

deploy: fb42293631

deploy: 87b26c867f

deploy: 2fcfc0f6d2

deploy: 2fcfc0f6d2

deploy: 2fcfc0f6d2

deploy: 2fcfc0f6d2

deploy: 54b0eaeebf

deploy: 28b97183be

deploy: cf21aed90c

deploy: 5a36034a2f

deploy: 811bc1f608

deploy: 811bc1f608

deploy: 673a895d44

deploy: 673a895d44

deploy: ca9ef664ab

deploy: ca9ef664ab

deploy: 10d7f7465ddd65a1ddcb1bc32504889d85602c4b

deploy: 495e1ce6b42f0293e4cf35c41a6bdb0bd229fa07

deploy: ca9ef664ab

deploy: ca9ef664ab

deploy: ca9ef664ab

deploy: 5e01f40829

deploy: 5e01f40829

deploy: 5e01f40829

deploy: 5e01f40829

deploy: 5e01f40829

deploy: 7a8e8483fd

deploy: 3984656712

deploy: 3984656712

deploy: 3984656712

deploy: 3984656712

deploy: 3984656712

deploy: 3984656712

deploy: 3984656712

deploy: 3984656712

deploy: 3984656712

deploy: 3984656712

deploy: dfa94588d6

deploy: dfa94588d6

deploy: dfa94588d6

deploy: dfa94588d6

deploy: e27e055bf8

deploy: cbec4292de
2024-02-19 12:44:47 -06:00

72 lines
23 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Integrate OPENHAB 3/4 | OpenMQTTGateway DEVELOPMENT SHA:2440c1 TEST ONLY</title>
<meta name="generator" content="VuePress 1.9.8">
<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="icon" href="/dev/img/Openmqttgateway_logo_mini.png">
<link rel="manifest" href="/dev/manifest.json">
<link rel="apple-touch-icon" sizes="180x180" href="/dev/apple-touch-icon.png">
<link rel="mask-icon" href="/dev/icons/safari-pinned-tab.svg" color="#3eaf7c">
<script type="module" src="https://unpkg.com/esp-web-tools@3.4.2/dist/web/install-button.js?module"></script>
<meta name="description" content="One gateway, many technologies: MQTT gateway for ESP8266, ESP32, Sonoff RF Bridge or Arduino with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, beacons detection, mi flora / mi jia / LYWSD02/ Mi Scale compatibility, SMS &amp; LORA.">
<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.a0b2d6bb.css" as="style"><link rel="preload" href="/dev/assets/js/app.37616211.js" as="script"><link rel="preload" href="/dev/assets/js/2.fdf4d158.js" as="script"><link rel="preload" href="/dev/assets/js/5.805ba45a.js" as="script"><link rel="prefetch" href="/dev/assets/js/10.dd089e98.js"><link rel="prefetch" href="/dev/assets/js/11.d490c4a0.js"><link rel="prefetch" href="/dev/assets/js/12.3d9627b5.js"><link rel="prefetch" href="/dev/assets/js/13.8fdadc95.js"><link rel="prefetch" href="/dev/assets/js/14.53be8b0a.js"><link rel="prefetch" href="/dev/assets/js/15.9e7f640d.js"><link rel="prefetch" href="/dev/assets/js/16.167136e7.js"><link rel="prefetch" href="/dev/assets/js/17.1b24f802.js"><link rel="prefetch" href="/dev/assets/js/18.6002f660.js"><link rel="prefetch" href="/dev/assets/js/19.367029ed.js"><link rel="prefetch" href="/dev/assets/js/20.ea752e98.js"><link rel="prefetch" href="/dev/assets/js/21.18d93d02.js"><link rel="prefetch" href="/dev/assets/js/22.fe03e80f.js"><link rel="prefetch" href="/dev/assets/js/23.b3fe4fb1.js"><link rel="prefetch" href="/dev/assets/js/24.7aba9723.js"><link rel="prefetch" href="/dev/assets/js/25.3066b3ef.js"><link rel="prefetch" href="/dev/assets/js/26.69e1040e.js"><link rel="prefetch" href="/dev/assets/js/27.470891bf.js"><link rel="prefetch" href="/dev/assets/js/28.7bb3bf3e.js"><link rel="prefetch" href="/dev/assets/js/29.2c556663.js"><link rel="prefetch" href="/dev/assets/js/3.34967994.js"><link rel="prefetch" href="/dev/assets/js/30.ce1f59b8.js"><link rel="prefetch" href="/dev/assets/js/31.5f0a3678.js"><link rel="prefetch" href="/dev/assets/js/32.245763a7.js"><link rel="prefetch" href="/dev/assets/js/33.1eca4c74.js"><link rel="prefetch" href="/dev/assets/js/34.e9ee0ad9.js"><link rel="prefetch" href="/dev/assets/js/35.27d21c4b.js"><link rel="prefetch" href="/dev/assets/js/36.f55fd62f.js"><link rel="prefetch" href="/dev/assets/js/37.07a9d001.js"><link rel="prefetch" href="/dev/assets/js/38.4e8718a0.js"><link rel="prefetch" href="/dev/assets/js/39.e533c21d.js"><link rel="prefetch" href="/dev/assets/js/4.0b272843.js"><link rel="prefetch" href="/dev/assets/js/40.7e581684.js"><link rel="prefetch" href="/dev/assets/js/41.81202049.js"><link rel="prefetch" href="/dev/assets/js/42.ef29de3b.js"><link rel="prefetch" href="/dev/assets/js/43.9da33982.js"><link rel="prefetch" href="/dev/assets/js/44.24c08f06.js"><link rel="prefetch" href="/dev/assets/js/45.26e87af9.js"><link rel="prefetch" href="/dev/assets/js/46.39554abd.js"><link rel="prefetch" href="/dev/assets/js/47.7be7d795.js"><link rel="prefetch" href="/dev/assets/js/48.4984bc04.js"><link rel="prefetch" href="/dev/assets/js/49.c8f0c8da.js"><link rel="prefetch" href="/dev/assets/js/50.88b3398c.js"><link rel="prefetch" href="/dev/assets/js/51.7fb4b9e4.js"><link rel="prefetch" href="/dev/assets/js/52.547bcf23.js"><link rel="prefetch" href="/dev/assets/js/6.a203e05b.js"><link rel="prefetch" href="/dev/assets/js/7.bfb27966.js"><link rel="prefetch" href="/dev/assets/js/8.237c9201.js"><link rel="prefetch" href="/dev/assets/js/9.9ace8522.js">
<link rel="stylesheet" href="/dev/assets/css/0.styles.a0b2d6bb.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">OpenMQTTGateway DEVELOPMENT SHA:2440c1 TEST ONLY</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="https://shop.theengs.io/" target="_blank" rel="noopener noreferrer" class="nav-link external">
Shop🆕
<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></div><div class="nav-item"><a href="https://1technophile.blogspot.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
Blog
<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></div><div class="nav-item"><a href="/dev/" class="nav-link">
Docs
</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://compatible.openmqttgateway.com/index.php/devices" target="_self" class="nav-link external">
Devices
<!----></a></div><div class="nav-item"><a href="/dev/upload/web-install.html" class="nav-link">
Upload
</a></div><div class="nav-item"><a href="https://app.theengs.io/" target="_blank" rel="noopener noreferrer" class="nav-link external">
Theengs
<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></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://shop.theengs.io/" target="_blank" rel="noopener noreferrer" class="nav-link external">
Shop🆕
<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></div><div class="nav-item"><a href="https://1technophile.blogspot.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
Blog
<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></div><div class="nav-item"><a href="/dev/" class="nav-link">
Docs
</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://compatible.openmqttgateway.com/index.php/devices" target="_self" class="nav-link external">
Devices
<!----></a></div><div class="nav-item"><a href="/dev/upload/web-install.html" class="nav-link">
Upload
</a></div><div class="nav-item"><a href="https://app.theengs.io/" target="_blank" rel="noopener noreferrer" class="nav-link external">
Theengs
<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></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"><span>3 - Upload ➡️</span> <span class="arrow right"></span></p> <!----></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 open"><span>5 - Integrate 🎉</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/dev/integrate/openhab2.html" class="sidebar-link">Integrate OPENHAB2</a></li><li><a href="/dev/integrate/openhab3.html" aria-current="page" class="active sidebar-link">Integrate OPENHAB 3/4</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/dev/integrate/openhab3.html#prerequisites" class="sidebar-link">Prerequisites</a></li><li class="sidebar-sub-header"><a href="/dev/integrate/openhab3.html#ip-address-if-your-broker-is-installed-on-the-same-server-as-openhab" class="sidebar-link">IP address (if your broker is installed on the same server as OpenHAB)</a></li><li class="sidebar-sub-header"><a href="/dev/integrate/openhab3.html#install-the-mqtt-binding" class="sidebar-link">Install the MQTT binding</a></li><li class="sidebar-sub-header"><a href="/dev/integrate/openhab3.html#install-jinja-and-jsonpath-transformations" class="sidebar-link">Install Jinja and JSONPath Transformations</a></li><li class="sidebar-sub-header"><a href="/dev/integrate/openhab3.html#upload-openmqttgateway-to-an-esp32" class="sidebar-link">Upload OpenMQTTGateway to an ESP32</a></li><li class="sidebar-sub-header"><a href="/dev/integrate/openhab3.html#configure-openmqttgateway-from-the-web-portal" class="sidebar-link">Configure OpenMQTTGateway from the web portal</a></li><li class="sidebar-sub-header"><a href="/dev/integrate/openhab3.html#adding-the-things" class="sidebar-link">Adding the things</a></li></ul></li><li><a href="/dev/integrate/home_assistant.html" class="sidebar-link">Integrate Home Assistant</a></li><li><a href="/dev/integrate/node_red.html" class="sidebar-link">Integrate Node-Red</a></li><li><a href="/dev/integrate/aws_iot.html" class="sidebar-link">Integrate AWS IOT</a></li><li><a href="/dev/integrate/jeedom.html" class="sidebar-link">Integrate Jeedom</a></li></ul></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="integrate-openhab-3-4"><a href="#integrate-openhab-3-4" class="header-anchor">#</a> Integrate OPENHAB 3/4</h1> <p>This tutorial will show how to integrate the BLE gateway to OpenHAB 3 or 4 leveraging the auto discovery functionality.
After this tutorial, you should see your Bluetooth Low Energy devices in OpenHAB without any file based manual configuration.</p> <h2 id="prerequisites"><a href="#prerequisites" class="header-anchor">#</a> Prerequisites</h2> <ul><li>OpenHAB 3.3 or higher</li> <li>MQTT broker installed with or without authentication</li> <li>A location defined in the &quot;Model&quot; section under &quot;Settings&quot;</li></ul> <h2 id="ip-address-if-your-broker-is-installed-on-the-same-server-as-openhab"><a href="#ip-address-if-your-broker-is-installed-on-the-same-server-as-openhab" class="header-anchor">#</a> IP address (if your broker is installed on the same server as OpenHAB)</h2> <p>The goal is to disable the IPv6 address of the broker server, so that the gateway can connect through IPv4.</p> <ol><li>From the Administration click on Settings</li> <li>Click on Network Settings</li> <li>Click on Show Advanced</li> <li>Disable IPv6</li> <li>Click on Save</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-ip.64868e1f.png" alt="OpenHAB integration"></p> <div class="custom-block warning"><p class="custom-block-title">Note</p> <p>If the broker is installed on another server you will also need to configure it with an IPv4 address.</p></div> <h2 id="install-the-mqtt-binding"><a href="#install-the-mqtt-binding" class="header-anchor">#</a> Install the MQTT binding</h2> <ol><li>From the Administration click on Settings</li> <li>Click on Bindings</li> <li>Install the MQTT binding (you can search at the bottom right)</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-binding.8789907b.png" alt="OpenHAB integration"></p> <ol start="4"><li>Once installed click on Things under Settings</li> <li>Click on the + at the bottom right</li> <li>Click on MQTT Binding</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-binding2.27222f76.png" alt="OpenHAB integration"></p> <ol start="7"><li>Click on MQTT broker</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-binding3.9ea3c10c.png" alt="OpenHAB integration"></p> <ol start="8"><li>Enter for the &quot;Broker Hostname/IP&quot; field, the IP address of your broker, if it is installed on the same server you can enter <code>localhost</code></li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-binding4.0f0bb3a2.png" alt="OpenHAB integration"></p> <ol start="9"><li>Click on &quot;Show Advanced&quot; if your broker has authentication activated, if not you can go to step 11</li> <li>Enter the broker credentials: username and password</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-binding5.21edc73e.png" alt="OpenHAB integration"></p> <ol start="11"><li>Click on Create Thing at the bottom, you should see your MQTT Broker in the Things list with the status &quot;online&quot;</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-binding6.0f2993f1.png" alt="OpenHAB integration"></p> <p>Bravo👏, second step done! Now let's add the Jinja transformation service.</p> <h2 id="install-jinja-and-jsonpath-transformations"><a href="#install-jinja-and-jsonpath-transformations" class="header-anchor">#</a> Install Jinja and JSONPath Transformations</h2> <ol><li>From the Administration click on Settings</li> <li>Click on Bindings</li> <li>Install Jinja Transformation (you can search at the bottom right)</li> <li>Install JSONPath Transformation</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-jinja.1c611c34.png" alt="OpenHAB integration"></p> <p>Second step done!</p> <h2 id="upload-openmqttgateway-to-an-esp32"><a href="#upload-openmqttgateway-to-an-esp32" class="header-anchor">#</a> Upload OpenMQTTGateway to an ESP32</h2> <p><a href="/dev/upload/web-install.html">Upload OpenMQTTGateway from the web</a> by selecting the environment corresponding to your need.</p> <p>Or use another upload method from the Upload section.</p> <h2 id="configure-openmqttgateway-from-the-web-portal"><a href="#configure-openmqttgateway-from-the-web-portal" class="header-anchor">#</a> Configure OpenMQTTGateway from the web portal</h2> <p><a href="/dev/upload/portal.html">Wifi and MQTT configuration</a></p> <p>Or use another upload method from the Upload section that requires credentials before the build.</p> <p>You should see the gateway connected to your broker by checking with an MQTT client like MQTT Explorer.</p> <p>To make the auto discovery compatible with OpenHAB you have to send the following command with a retain flag.</p> <p><code>mosquitto_pub -t &quot;home/OpenMQTTGateway/commands/MQTTtoSYS/config&quot; -m '{&quot;ohdisc&quot;:true}'</code></p> <p>You can also activate OpenHAB auto discovery by adding the gateway as a Thing, Model, and switching the button to ON. The name of the channel to add is &quot;SYS: OpenHAB discovery&quot;.
Once activated restart OpenMQTTGateway.</p> <h2 id="adding-the-things"><a href="#adding-the-things" class="header-anchor">#</a> Adding the things</h2> <ol><li>From the Administration click on &quot;Things&quot; under &quot;Settings&quot;, you should see a number in the INBOX button</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-things.abb5bd4b.png" alt="OpenHAB integration"></p> <ol start="2"><li>Click on INBOX, you should see your BLE devices and the gateway</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-things2.2e6e9d16.png" alt="OpenHAB integration"></p> <ol start="3"><li>Click on a device, a pop up &quot;Add as Thing&quot; should appear</li> <li>Rename it if you need, and click OK, repeat for each Thing discovered. The devices should appears as online progressively.</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-things3.c8683e56.png" alt="OpenHAB integration"></p> <ol start="5"><li>Click on Model</li> <li>Select the location of where you want to create the Equipment</li> <li>Click on &quot;Create Equipment from Thing&quot;</li> <li>Click on Thing</li> <li>Select a Thing</li> <li>Rename your Equipment if you need</li> <li>Select the Channels</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-things4.b8d0101e.png" alt="OpenHAB integration"></p> <ol start="12"><li>Click on &quot;Add to Model&quot;</li> <li>Go to Model, if you unfold your location and Equipment you should be able to see values</li></ol> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt-things5.c84ba146.png" alt="OpenHAB integration"></p> <p>Congratulation🎉! You were able to get data from your BLE sensors into OpenHAB. You can now add the others and use the data to build pages, leverage rules and enjoy all the function of your Home Automation controller with BLE devices.</p> <p><img src="/dev/assets/img/OpenMQTTGateway-OpenHAB-Theengs-mqtt.79c99c28.png" alt="OpenHAB integration"></p></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/1technophile/OpenMQTTGateway/edit/development/docs/integrate/openhab3.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/12/2023, 8:03:11 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
<a href="/dev/integrate/openhab2.html" class="prev">
Integrate OPENHAB2
</a></span> <span class="next"><a href="/dev/integrate/home_assistant.html">
Integrate Home Assistant
</a>
</span></p></div> </main></div><div class="global-ui"></div></div>
<script src="/dev/assets/js/app.37616211.js" defer></script><script src="/dev/assets/js/2.fdf4d158.js" defer></script><script src="/dev/assets/js/5.805ba45a.js" defer></script>
</body>
</html>