Files
OpenMQTTGateway/dev/use/displays.html
2026-01-23 00:50:46 +00:00

137 lines
28 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Displays | Theengs OpenMQTTGateway DEVELOPMENT SHA:497dc8 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.2701250f.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/63.118c24b3.js" as="script"><link rel="prefetch" href="/dev/assets/js/10.da69edf3.js"><link rel="prefetch" href="/dev/assets/js/11.6556d787.js"><link rel="prefetch" href="/dev/assets/js/12.1e6cb39c.js"><link rel="prefetch" href="/dev/assets/js/13.efb7256d.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.74c01ec1.js"><link rel="prefetch" href="/dev/assets/js/17.8dcf617b.js"><link rel="prefetch" href="/dev/assets/js/18.bb4184c5.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.4ca97ce3.js"><link rel="prefetch" href="/dev/assets/js/27.8d8ada9a.js"><link rel="prefetch" href="/dev/assets/js/28.afe597be.js"><link rel="prefetch" href="/dev/assets/js/29.ee885138.js"><link rel="prefetch" href="/dev/assets/js/3.2fb8cc22.js"><link rel="prefetch" href="/dev/assets/js/30.f2afadfe.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.8c8c3249.js"><link rel="prefetch" href="/dev/assets/js/35.de5ccc4f.js"><link rel="prefetch" href="/dev/assets/js/36.1f7a3de9.js"><link rel="prefetch" href="/dev/assets/js/37.83508dbe.js"><link rel="prefetch" href="/dev/assets/js/38.55a68009.js"><link rel="prefetch" href="/dev/assets/js/39.20ae555e.js"><link rel="prefetch" href="/dev/assets/js/4.ee469e2f.js"><link rel="prefetch" href="/dev/assets/js/40.eb26a150.js"><link rel="prefetch" href="/dev/assets/js/41.c56bed06.js"><link rel="prefetch" href="/dev/assets/js/42.31ca9dd3.js"><link rel="prefetch" href="/dev/assets/js/43.2b960116.js"><link rel="prefetch" href="/dev/assets/js/44.790d8d70.js"><link rel="prefetch" href="/dev/assets/js/45.690ecbfb.js"><link rel="prefetch" href="/dev/assets/js/46.f4cf083c.js"><link rel="prefetch" href="/dev/assets/js/47.39d975c4.js"><link rel="prefetch" href="/dev/assets/js/48.bfb4afae.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.891c9f1b.js"><link rel="prefetch" href="/dev/assets/js/51.f851c3ef.js"><link rel="prefetch" href="/dev/assets/js/52.33ace286.js"><link rel="prefetch" href="/dev/assets/js/53.3adb747e.js"><link rel="prefetch" href="/dev/assets/js/54.0bae6b28.js"><link rel="prefetch" href="/dev/assets/js/55.482aace6.js"><link rel="prefetch" href="/dev/assets/js/56.1fe4be81.js"><link rel="prefetch" href="/dev/assets/js/57.27eb5af9.js"><link rel="prefetch" href="/dev/assets/js/58.06281c56.js"><link rel="prefetch" href="/dev/assets/js/59.8265bd7e.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.5d8381b6.js"><link rel="prefetch" href="/dev/assets/js/62.d32662df.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:497dc8 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"><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">Bluetooth 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" class="sidebar-link">LoRa gateway</a></li><li><a href="/dev/use/gsm.html" class="sidebar-link">GSM 2G gateway</a></li><li><a href="/dev/use/serial.html" class="sidebar-link">RS232/Serial 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" aria-current="page" class="active sidebar-link">Displays</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/dev/use/displays.html#ssd1306-display-heltec-sx127x-lilygo®-lora32-boards-generic-ssd1306-displays" class="sidebar-link">SSD1306 Display (Heltec SX127X, LILYGO® LoRa32 boards, generic SSD1306 displays)</a></li></ul></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="displays"><a href="#displays" class="header-anchor">#</a> Displays</h1> <h2 id="ssd1306-display-heltec-sx127x-lilygo®-lora32-boards-generic-ssd1306-displays"><a href="#ssd1306-display-heltec-sx127x-lilygo®-lora32-boards-generic-ssd1306-displays" class="header-anchor">#</a> SSD1306 Display (Heltec SX127X, LILYGO® LoRa32 boards, generic SSD1306 displays)</h2> <p>Several options are available for the display of information on the SSD1306 display. Some options are exclusive to each other, and when a different option is enabled, the current option is disabled.</p> <p>The current SSD1306 display states are being published to the <code>SSD1306toMQTT</code> topic, e.g.</p> <p><code>{&quot;onstate&quot;:true,&quot;brightness&quot;:50,&quot;display-flip&quot;:true,&quot;idlelogo&quot;:true,&quot;log-oled&quot;:false,&quot;json-oled&quot;:true}</code></p> <h3 id="display-on-off"><a href="#display-on-off" class="header-anchor">#</a> Display ON/OFF</h3> <p>To turn the SSD1306 display on or off.</p> <p>This can be enabled with the compiler directive <code>-DDISPLAY_STATE=true</code>.</p> <p>MQTT Display OFF command:</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {&quot;onstate&quot;:false}</code></p> <p>MQTT Display ON command:</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {&quot;onstate&quot;:true}</code></p> <h4 id="usage-of-a-touch-gpio-display-blanking"><a href="#usage-of-a-touch-gpio-display-blanking" class="header-anchor">#</a> Usage of a touch GPIO display blanking</h4> <p>Support can be enabled to use a GPIO pin as a simple touch sensor to enable the display. When enabled, the display will blank after 30 seconds, and when GPIO 2 is touched, the display will enable for 30 seconds. For testing a wire was connected to the GPIO pin.</p> <p>This can be enabled with the compiler directive <code>-DDISPLAY_BLANKING=true</code></p> <p>Blanking Compiler Directives</p> <table><thead><tr><th>Directive</th> <th>Default</th> <th>Description</th></tr></thead> <tbody><tr><td>DISPLAY_BLANKING</td> <td>false</td> <td>Enables touch based display blanking</td></tr> <tr><td>DISPLAY_BLANKING_TOUCH_GPIO</td> <td>2</td> <td>GPIO pin to use the touch. Must be a touch supported GPIO pin</td></tr> <tr><td>DISPLAY_BLANKING_START</td> <td>30</td> <td>Seconds to wait before disabling the display</td></tr></tbody></table> <h3 id="brightness"><a href="#brightness" class="header-anchor">#</a> Brightness</h3> <p>The display brightness can be set between 0-100%.</p> <p>It is recommended to set a value lower than 100 to extend the life of the OLED display. The default setting is 50.</p> <p>This can be set with the compiler directive <code>-DDISPLAY_BRIGHTNESS=50</code>.</p> <p>or with the runtime command</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {&quot;brightness&quot;:50}</code></p> <h3 id="metric-or-imperial-property-units"><a href="#metric-or-imperial-property-units" class="header-anchor">#</a> Metric or Imperial property units</h3> <p>To have applicable device properties displayed in Imperial units, e.g. °F for temperature.</p> <p>This can be set with the compiler directive <code>-DDISPLAY_METRIC=false</code>.</p> <p>As the display Metric setting is being defined in the WebUI part of OpenMQTTGateway changes need to be sent there with the runtime command</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoWebUI/config -m {&quot;displayMetric&quot;:false}</code></p> <h3 id="rotating-the-display-by-180-degrees"><a href="#rotating-the-display-by-180-degrees" class="header-anchor">#</a> Rotating the display by 180 degrees</h3> <p>This can be set with the compiler directive <code>-DDISPLAY_FLIP=false</code>.</p> <p>or with the runtime command</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {&quot;display-flip&quot;:false}</code></p> <h3 id="display-idle-logo"><a href="#display-idle-logo" class="header-anchor">#</a> Display idle Logo</h3> <p>To display the OpenMQTTGateway logo during device display idle time. This reduces the likelihood of burn-in.</p> <p>This can be set with the compiler directive <code>-DDISPLAY_IDLE_LOGO=true</code>.</p> <p>or at runtime with</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m {&quot;idlelogo&quot;:true}</code></p> <h3 id="setting-the-log-output"><a href="#setting-the-log-output" class="header-anchor">#</a> Setting the log output</h3> <p>The display of serial log messages to the display can be enabled via compiler directive <code>-DLOG_TO_OLED=true</code> or via MQTT commands.</p> <p>For example if you want to set the serial log to OLED</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{&quot;log-oled&quot;:true}'</code></p> <p>you can also revert it back with</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{&quot;log-oled&quot;:false}'</code></p> <p>The log level of the messages displayed is Errors and Warnings, and this can only be changed via the compiler directive <code>-DLOG_LEVEL_OLED=LOG_LEVEL_NOTICE</code>.</p> <h3 id="displaying-module-json-messages-default"><a href="#displaying-module-json-messages-default" class="header-anchor">#</a> Displaying Module json messages (default)</h3> <p>The display of messages from various modules is also supported. Currently supported modules include <code>ZgatewayRTL_433</code>, <code>ZgatewayBT</code> and <code>ZsensorBME280</code>.</p> <p>This can be enabled with the compiler directive <code>-DJSON_TO_OLED=true</code>.</p> <p>You can also change it by MQTT. For example if you want to display module json messages:</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{&quot;json-oled&quot;:true}'</code></p> <p>And to disable the display of module json messages:</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{&quot;display-json&quot;:false}'</code></p> <h3 id="store-the-current-display-configuration-in-the-gateway"><a href="#store-the-current-display-configuration-in-the-gateway" class="header-anchor">#</a> Store the current display configuration in the gateway</h3> <p>To store the running display configuration into non-volatile storage on the gateway use the following command. This assures persistence across restarts.</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{&quot;save&quot;:true}'</code></p> <p>At any time, you can reload the stored configuration with the command:</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{&quot;load&quot;:true}'</code></p> <p>If you want to erase the stored configuration, use the command:</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{&quot;erase&quot;:true}'</code></p> <p>Note that this will not change the running configuration, it only ensures that the default configuration is used at next startup.</p> <p>If you want to load the default configuration use the command:</p> <p><code>mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoSSD1306/config -m '{&quot;init&quot;:true}'</code></p> <p>Note that this will not change the stored configuration, <code>erase</code> or <code>save</code> is still needed to overwrite the saved configuration.</p> <h3 id="connecting-a-generic-ssd1306-display-to-esp32"><a href="#connecting-a-generic-ssd1306-display-to-esp32" class="header-anchor">#</a> Connecting a generic SSD1306 display to ESP32</h3> <p>It is possible to connect a generic SSD1306 display with resolution 128*64 to the hardware setups.
This example describes how to do it with the ESP32 board.</p> <ul><li>Connect the display to the ESP32 (display → ESP32):
<ul><li>VCC → 5V (or 3.3V, check your display documentation)</li> <li>GND → GND</li> <li>SCL → pin 22</li> <li>SDA → pin 21</li></ul></li> <li>Modify the environment definition in <code>environments.ini</code>.
<ul><li>Add the display library:<div class="language- line-numbers-mode"><pre class="language-text"><code>lib_deps =
${com-esp32.lib_deps}
...
${libraries.ssd1306}
</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></li> <li>Add relevant build flags:<div class="language- line-numbers-mode"><pre class="language-text"><code>build_flags =
${com-esp32.build_flags}
...
; *** Generic SSD1306 OLED Options **
'-DZdisplaySSD1306=&quot;GenericSSD1306&quot;'
'-DOLED_SDA=21' ; SSD1306 pin SDA
'-DOLED_SCL=22' ; SSD1306 pin SCL
'-DGenericSSD1306=true'
'-DJSON_TO_OLED=true'
'-DDISPLAY_PAGE_INTERVAL=30'
; '-DLOG_TO_OLED=true' ; Enable log to OLED
; '-DLOG_LEVEL_OLED=LOG_LEVEL_NOTICE'
; '-DDISPLAY_IDLE_LOGO=false'
; '-DDISPLAY_BRIGHTNESS=80'
; '-DDISPLAY_METRIC=false'
; '-DDISPLAY_FLIP=false'
</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></div></div></li></ul></li></ul></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/1technophile/OpenMQTTGateway/edit/development/docs/use/displays.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">1/22/2026, 1:16:34 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
<a href="/dev/use/boards.html" class="prev">
Boards
</a></span> <span class="next"><a href="/dev/use/gateway.html">
System commands (ESP only)
</a>
</span></p></div> </main></div><div class="global-ui"></div></div>
<script src="/dev/assets/js/app.2701250f.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/63.118c24b3.js" defer></script>
</body>
</html>