Files
OpenMQTTGateway/dev/use/lora.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

81 lines
32 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>LoRa gateway | 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="Explore the LoRa MQTT gateway, designed for integration with devices utilizing LoRa technology, including the MakerFab soil and moisture sensor, devices from PricelessTookit. Unlock long range communication with the power of 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/17.1b24f802.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/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/5.805ba45a.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 open"><span>4 - Use ✈️</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/dev/use/rf.html" class="sidebar-link">RF gateways (RTL_433/RCSwitch/RF/RF2)</a></li><li><a href="/dev/use/ble.html" class="sidebar-link">BLE ESP32 gateway</a></li><li><a href="/dev/use/ir.html" class="sidebar-link">Infrared gateway</a></li><li><a href="/dev/use/lora.html" aria-current="page" class="active sidebar-link">LoRa gateway</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/dev/use/lora.html#what-is-a-lora-gateway" class="sidebar-link">What is a LoRa gateway</a></li><li class="sidebar-sub-header"><a href="/dev/use/lora.html#configuring-the-lora-gateway" class="sidebar-link">Configuring the LoRa gateway</a></li><li class="sidebar-sub-header"><a href="/dev/use/lora.html#receiving-data-from-lora-signal" class="sidebar-link">Receiving data from LoRa signal</a></li><li class="sidebar-sub-header"><a href="/dev/use/lora.html#send-data-by-mqtt-to-convert-it-on-lora-signal" class="sidebar-link">Send data by MQTT to convert it on LoRa signal</a></li><li class="sidebar-sub-header"><a href="/dev/use/lora.html#send-data-by-mqtt-with-advanced-lora-parameters" class="sidebar-link">Send data by MQTT with advanced LoRa parameters</a></li></ul></li><li><a href="/dev/use/gsm.html" class="sidebar-link">GSM 2G gateway</a></li><li><a href="/dev/use/rs232.html" class="sidebar-link">RS232 gateway</a></li><li><a href="/dev/use/rfm69.html" class="sidebar-link">RFM69 gateway</a></li><li><a href="/dev/use/sensors.html" class="sidebar-link">Sensors</a></li><li><a href="/dev/use/actuators.html" class="sidebar-link">Actuators</a></li><li><a href="/dev/use/boards.html" class="sidebar-link">Boards</a></li><li><a href="/dev/use/displays.html" class="sidebar-link">Displays</a></li><li><a href="/dev/use/gateway.html" class="sidebar-link">System commands (ESP only)</a></li><li><a href="/dev/use/webui.html" class="sidebar-link">WebUI</a></li></ul></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="lora-gateway"><a href="#lora-gateway" class="header-anchor">#</a> LoRa gateway</h1> <h2 id="what-is-a-lora-gateway"><a href="#what-is-a-lora-gateway" class="header-anchor">#</a> What is a LoRa gateway</h2> <p>A LoRa (Long Range) gateway is a device that facilitates communication between LoRa nodes and networks, enabling the transmission and reception of data over long distances using the LoRa modulation technique. It's designed to work with devices that utilize LoRa technology, such as the MakerFab soil and moisture sensor, devices from PricelessTookit and DIY sensors.</p> <p>The primary distinction between a LoRa gateway and a LoRaWAN gateway lies in the protocol and network architecture:</p> <p>LoRa gateway: Focuses solely on the physical layer, utilizing the LoRa modulation for communication. It's responsible for receiving and transmitting raw LoRa signals without concerning itself with network protocols or data handling at higher layers. Being focused solely on the physical layer, a LoRa gateway offers greater flexibility for customization and experimentation. The OpenMQTTGateway LoRa gateway receives raw LoRa signals, processes them, and publishes the data to an MQTT topic. Conversely, it can subscribe to MQTT topics and send commands to LoRa devices. This gateway is particularly useful for DIY projects, home automation enthusiasts, and scenarios where direct integration of LoRa devices with MQTT is desired.</p> <p>LoRaWAN gateway: Operates at a higher layer and is part of the LoRaWAN network architecture. LoRaWAN is a protocol specification built on top of the LoRa technology, providing features like adaptive data rate, encryption, and multi-channel/multi-modulation. A LoRaWAN gateway handles the data from multiple LoRa nodes, forwards it to a centralized network server, which then manages the data and communicates back to the nodes.</p> <p>In essence, while both gateways utilize LoRa technology for communication, a LoRaWAN gateway is more sophisticated, offering advanced features and integration with the LoRaWAN network infrastructure. The LoRa gateway, with its simpler architecture, is ideal for small networks of nodes, offering easier setup and configuration, making it an interesting choice for users keen on experimenting with LoRa technology.</p> <h2 id="configuring-the-lora-gateway"><a href="#configuring-the-lora-gateway" class="header-anchor">#</a> Configuring the LoRa gateway</h2> <p>The LoRa gateway can be configured by MQTT commands or by using the WebUI, here are the parameters available, they can be combined with the key &quot;save&quot; or &quot;erase&quot;:</p> <ul><li>txpower: 0 to 14</li> <li>spreadingfactor: 7 to 12</li> <li>frequency: 433000000, 868000000, 915000000</li> <li>signalbandwidth: 7800, 10400, 15500, 20800, 31250, 41700, 62500, 125000, and 250000</li> <li>codingrate: 5 to 8</li> <li>preamblelength: 6 to 65535</li> <li>syncword: byte</li> <li>enablecrc: boolean</li> <li>invertiq: boolean</li> <li>onlyknown: boolean</li></ul> <p>With the WebUI:
<img src="/dev/assets/img/OpenMQTTGateway_LORA_Configuration.b5f0bb4b.png" alt="LoRa configuration page"></p> <p>With MQTT commands:
<code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoLORA/config -m '{&quot;frequency&quot;:&quot;433000000&quot;,&quot;save&quot;:true}'</code></p> <h2 id="receiving-data-from-lora-signal"><a href="#receiving-data-from-lora-signal" class="header-anchor">#</a> Receiving data from LoRa signal</h2> <p>Subscribe to all the messages with mosquitto or open your MQTT client software:</p> <p><code>sudo mosquitto_sub -t +/# -v</code></p> <p>Generate your LoRa signals by using another LoRa module, you can flash the sender program from <a href="/dev/examples/LoraTemperature/">this example</a> to an ESP32 LoRa board, this sample node will generate a LoRa signal containing the ESP32 internal temperature.</p> <p>Once one board flashed with OMG and the other with the sender program you should receive regular packets into <code>home/OpenMQTTGateway_ESP32_LORA_TEST/LORAtoMQTT/AABBCCDDEEFF</code> like below:</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span><span class="token property">&quot;id&quot;</span><span class="token operator">:</span><span class="token string">&quot;AA:BB:CC:DD:EE:FF&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;rssi&quot;</span><span class="token operator">:</span><span class="token number">-16</span><span class="token punctuation">,</span><span class="token property">&quot;snr&quot;</span><span class="token operator">:</span><span class="token number">9.25</span><span class="token punctuation">,</span><span class="token property">&quot;pferror&quot;</span><span class="token operator">:</span><span class="token number">-3598</span><span class="token punctuation">,</span><span class="token property">&quot;packetSize&quot;</span><span class="token operator">:</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token property">&quot;tempc&quot;</span><span class="token operator">:</span><span class="token string">&quot;55.3&quot;</span><span class="token punctuation">}</span>
<span class="token punctuation">{</span><span class="token property">&quot;id&quot;</span><span class="token operator">:</span><span class="token string">&quot;AA:BB:CC:DD:EE:FF&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;rssi&quot;</span><span class="token operator">:</span><span class="token number">-26</span><span class="token punctuation">,</span><span class="token property">&quot;snr&quot;</span><span class="token operator">:</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token property">&quot;pferror&quot;</span><span class="token operator">:</span><span class="token number">-3598</span><span class="token punctuation">,</span><span class="token property">&quot;packetSize&quot;</span><span class="token operator">:</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token property">&quot;tempc&quot;</span><span class="token operator">:</span><span class="token string">&quot;55.4&quot;</span><span class="token punctuation">}</span>
<span class="token punctuation">{</span><span class="token property">&quot;id&quot;</span><span class="token operator">:</span><span class="token string">&quot;AA:BB:CC:DD:EE:FF&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;rssi&quot;</span><span class="token operator">:</span><span class="token number">-16</span><span class="token punctuation">,</span><span class="token property">&quot;snr&quot;</span><span class="token operator">:</span><span class="token number">9.5</span><span class="token punctuation">,</span><span class="token property">&quot;pferror&quot;</span><span class="token operator">:</span><span class="token number">-3581</span><span class="token punctuation">,</span><span class="token property">&quot;packetSize&quot;</span><span class="token operator">:</span><span class="token number">9</span><span class="token punctuation">,</span><span class="token property">&quot;tempc&quot;</span><span class="token operator">:</span><span class="token string">&quot;57&quot;</span><span class="token punctuation">}</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></div></div><p><img src="/dev/assets/img/OpenMQTTgateway_ESP32_LORA_MSG.e5943094.png" alt="LoRa board receiving data"></p> <p>Messages that contain non-printable characters will be converted to hexadecimal and look like this:</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span><span class="token property">&quot;rssi&quot;</span><span class="token operator">:</span><span class="token number">-121</span><span class="token punctuation">,</span><span class="token property">&quot;snr&quot;</span><span class="token operator">:</span><span class="token number">-11.75</span><span class="token punctuation">,</span><span class="token property">&quot;pferror&quot;</span><span class="token operator">:</span><span class="token number">-29116</span><span class="token punctuation">,</span><span class="token property">&quot;packetSize&quot;</span><span class="token operator">:</span><span class="token number">3</span><span class="token punctuation">,</span><span class="token property">&quot;hex&quot;</span><span class="token operator">:</span><span class="token string">&quot;C0FFEE&quot;</span><span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p>They can be filtered by setting the &quot;onlyknown&quot; command to <code>true</code> or by an activation into the WebUI or Home Assistant.</p> <p>And from a supported device (in this case, a WiPhone), looks like this:</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span><span class="token property">&quot;rssi&quot;</span><span class="token operator">:</span><span class="token number">-50</span><span class="token punctuation">,</span><span class="token property">&quot;snr&quot;</span><span class="token operator">:</span><span class="token number">9.25</span><span class="token punctuation">,</span><span class="token property">&quot;pferror&quot;</span><span class="token operator">:</span><span class="token number">20728</span><span class="token punctuation">,</span><span class="token property">&quot;packetSize&quot;</span><span class="token operator">:</span><span class="token number">30</span><span class="token punctuation">,</span><span class="token property">&quot;from&quot;</span><span class="token operator">:</span><span class="token string">&quot;123ABC&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;to&quot;</span><span class="token operator">:</span><span class="token string">&quot;000000&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;message&quot;</span><span class="token operator">:</span><span class="token string">&quot;Hi from WiPhone&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;type&quot;</span><span class="token operator">:</span><span class="token string">&quot;WiPhone&quot;</span><span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="send-data-by-mqtt-to-convert-it-on-lora-signal"><a href="#send-data-by-mqtt-to-convert-it-on-lora-signal" class="header-anchor">#</a> Send data by MQTT to convert it on LoRa signal</h2> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoLORA -m '{&quot;message&quot;:&quot;hello OMG1&quot;}'</code></p> <p>This command will send by LoRa the message &quot;hello OMG1&quot; and use the default parameters defined in <a href="https://github.com/1technophile/OpenMQTTGateway/blob/4b8d28179b63ae3f3d454da57ec8c109c159c386/config_LORA.h#L32" target="_blank" rel="noopener noreferrer">config_LORA.h<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><img src="/dev/assets/img/OpenMQTTGateway_TTGO32_LORA_Receive.ce846ec8.jpg" alt="TTGO Lora receiving packets"></p> <p>If you want to test that your sending works you can use another TTGO LoRa module, you can flash the receiver program from <a href="https://github.com/LilyGO/TTGO-LORA32-V2.0" target="_blank" rel="noopener noreferrer">this repository<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 the SSD1306 library <a href="https://github.com/ThingPulse/esp8266-oled-ssd1306" target="_blank" rel="noopener noreferrer">there<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> <h2 id="send-data-by-mqtt-with-advanced-lora-parameters"><a href="#send-data-by-mqtt-with-advanced-lora-parameters" class="header-anchor">#</a> Send data by MQTT with advanced LoRa parameters</h2> <ul><li>Plain text message: <code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoLORA -m '{&quot;message&quot;:&quot;test8&quot;,&quot;txpower&quot;:17}'</code><br>
will make LoRa use the a txpower of 17 when sending the message &quot;test8&quot;</li> <li>Binary message: <code>mosquitto_pub -t &quot;home/OpenMQTTGateway/commands/MQTTtoLORA&quot; -m '{&quot;hex&quot;:&quot;01C0FFEE&quot;}'</code><br>
will send binary 0x01C0FFEE</li> <li>WiPhone message: <code>mosquitto_pub -t &quot;home/OpenMQTTGateway/commands/MQTTtoLORA&quot; -m '{&quot;message&quot;:&quot;test&quot;,&quot;type&quot;:&quot;WiPhone&quot;,&quot;to&quot;:&quot;123ABC&quot;,&quot;from&quot;:&quot;FFFFFF&quot;}'</code><br>
will send &quot;test&quot; to a WiPhone with chip ID 123ABC</li></ul> <p>More info on where the LoRa library is born <a href="https://github.com/sandeepmistry/arduino-LoRa/blob/master/API.md#radio-parameters" target="_blank" rel="noopener noreferrer">@sandeepmistry<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>Tutorial on how to leverage LoRa for a mailbox sensor from <a href="https://www.youtube.com/channel/UCz75N6inuLHXnRC5tqagNLw" target="_blank" rel="noopener noreferrer">PricelessToolkit<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>:
<iframe width="560" height="315" src="https://www.youtube.com/embed/6DftaHxDawM" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen"></iframe></p></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/1technophile/OpenMQTTGateway/edit/development/docs/use/lora.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/use/ir.html" class="prev">
Infrared gateway
</a></span> <span class="next"><a href="/dev/use/gsm.html">
GSM 2G gateway
</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/17.1b24f802.js" defer></script>
</body>
</html>