{"id":15063417,"url":"https://github.com/aportela/esp32-server-dashboard","last_synced_at":"2026-01-03T02:05:40.448Z","repository":{"id":248714567,"uuid":"829480381","full_name":"aportela/esp32-server-dashboard","owner":"aportela","description":"Display realtime server stats","archived":false,"fork":false,"pushed_at":"2025-02-22T09:34:09.000Z","size":513,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T10:26:00.290Z","etag":null,"topics":["arduino-ide","dashboard","esp32","mqtt","st7789v","telegraf"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aportela.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-16T14:08:28.000Z","updated_at":"2025-02-22T09:25:22.000Z","dependencies_parsed_at":"2024-09-16T10:53:48.884Z","dependency_job_id":"d9b1df34-7b9d-49c5-8bcf-5d897b12e8ef","html_url":"https://github.com/aportela/esp32-server-dashboard","commit_stats":null,"previous_names":["aportela/esp32-server-dashboard"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aportela%2Fesp32-server-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aportela%2Fesp32-server-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aportela%2Fesp32-server-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aportela%2Fesp32-server-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aportela","download_url":"https://codeload.github.com/aportela/esp32-server-dashboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243761641,"owners_count":20343928,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino-ide","dashboard","esp32","mqtt","st7789v","telegraf"],"created_at":"2024-09-24T23:56:32.806Z","updated_at":"2026-01-03T02:05:40.388Z","avatar_url":"https://github.com/aportela.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esp32-server-dashboard\n\n## Introduction\n\nA small project to display in real time stats (cpu/memory/temperature/network bandwidth usage) of the system (using telegraf to collect data \u0026 mqtt to transport messages) on my servers while I was getting started in microcontroller programming.\n\n## Supported hardware\n\n### Display\n\nAny **SPI** display that is supported by the driver **ST7789V** with a resolution of **240x320**.\n\nI'm using displays like these (the cost is about 3.5 euros):\n\n\u003cimg src=\"https://github.com/user-attachments/assets/83cdd284-0a36-4b31-b1f5-8871a9defa79\" width=\"118\" alt=\"front\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/6a91112b-fccb-408f-8608-26e1bab05a36\" width=\"100\" alt=\"back\" /\u003e\n\n### Microcontroller\n\nIn theory you should be able to use any esp32 as long as it has enough pins.\n\nI'm using these two:\n\nESP32-WROOM-32D (the cost is about 4 euros):\n\n\u003cimg src=\"https://github.com/user-attachments/assets/32d537b2-a7ee-48ea-b386-2d484f4e1792\" width=\"150\" alt=\"front\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/44905c15-85be-4a14-82b4-89ff0571282d\" width=\"185\" alt=\"pinout\" /\u003e\n\nESP32-C3 SuperMini (the cost is about 2 euros):\n\n\u003cimg src=\"https://github.com/user-attachments/assets/55c3a8f9-fd53-4444-91f7-219cf6f70d87\" width=\"224\" alt=\"front\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/d10aa28f-d15f-4f76-9b0d-2c3fa63a687d\" width=\"100\" alt=\"back\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/1b10c2a7-7288-4ec2-89c7-77f9d9c0241b\" width=\"250\" alt=\"pinout\" /\u003e\n\n### Switch / Button (used to switch between screens)\n\nAny button / switch will work\n\n## Install (Hardware)\n\n### ESP32-WROOM-32D\n\n| ESP32-WROOM-32D | ST7789V |\n| --------------- | ------- |\n| PIN 5           | CS      |\n| PIN 4           | RST     |\n| PIN 2           | DC      |\n| PIN 23          | SDA     |\n| PIN 18          | SCL     |\n| GND             | GND     |\n| 3.3V            | VCC     |\n\nSwitch/button contacts are connected to ESP32-C3 SuperMini PIN 16 and GND.\n\n### ESP32-C3 SuperMini\n\n| ESP32-C3 SuperMini | ST7789V |\n| ------------------ | ------- |\n| PIN 5              | CS      |\n| PIN 9              | RST     |\n| PIN 8              | DC      |\n| PIN 6              | SDA     |\n| PIN 4              | SCL     |\n| GND                | GND     |\n| 3.3V               | VCC     |\n\nSwitch/button contacts are connected to ESP32-C3 SuperMini PIN 10 and GND.\n\n## Install (Software)\n\nServices:\n\n- [Mosquitto](https://mosquitto.org/) (should work with any other server/broker)\n\nArduino IDE Board setup:\n\n- ESP32-WROOM-32D: **ESP32-WROOM-DA Module**\n\n  - requires **#define ESP32_WROOM** on esp32-server-dashboard.ino\n\n- ESP32-C3 SuperMini **ESP32C3 Dev Module**\n\n  - Tools =\u003e **USB CDC On Boot** =\u003e \"**Enabled**\" (required for serial communication)\n  - requires **#define ESP32_C3_SUPER_MINI** on esp32-server-dashboard.ino\n\n- [LovyanGFX by lovyan03](https://github.com/lovyan03/LovyanGFX) (ST7789V display driver)\n- [Bounce2 by Thomas Ouellet Fredericks](https://github.com/thomasfredericks/Bounce2) (Debouncing library for Arduino and Wiring)\n\n## Configuration\n\n### MQTT\n\n[Authentication with usernames and passwords](https://mosquitto.org/documentation/authentication-methods/) (esp32-server-dashboard it also works without MQTT authentication)\n\n### Telegraf\n\nConfiguration file (**telegraf.conf**) file using data collection interval = 1s\n\n```\n[global_tags]\n[agent]\n  interval = \"1s\"\n  round_interval = true\n  metric_batch_size = 1000\n  metric_buffer_limit = 10000\n  collection_jitter = \"0s\"\n  flush_interval = \"1s\"\n  flush_jitter = \"0s\"\n  precision = \"0s\"\n  hostname = \"\"\n  omit_hostname = false\n\n[[outputs.mqtt]]\nservers = [\"192.168.1.1:1883\", ]\ntopic = \"telegraf/{{ .Hostname }}/{{ .PluginName }}\"\nusername = \"mqtt_username\"\npassword = \"mqtt_password\"\n\n[[inputs.cpu]]\n  percpu = false\n  totalcpu = true\n  collect_cpu_time = false\n  report_active = false\n  core_tags = false\n\n[[inputs.mem]]\n\n[[inputs.system]]\n\n[[inputs.net]]\n\ninterfaces = [\"enp1s0\"]\n\n# lm-sensors package required for linux systems\n[[inputs.sensors]]\n\n# uncomment this for using with windows (WARNING: telegraf must be run as administrator)\n#[[inputs.temp]]\n\n# uncomment this for using with OPNSense/FreeBSD systems\n#[[inputs.exec]]\n# commands = [\n#   \"sh /usr/local/etc/telegraf-scripts/cputemp-sensors-by-package.sh\",\n# ]\n# timeout = \"5s\"\n# data_format = \"influx\"\n\n```\n\nAlso, this is my script (/usr/local/etc/telegraf-scripts/cputemp-sensors-by-package.sh) for getting/parsing cpu temperatures on OPNSense.\n\n```\n#!/bin/sh\nsysctl hw.acpi.thermal.tz0.temperature | sed 's/hw\\.acpi\\.thermal\\.tz0\\.temperature: /sensors,feature=package_id_0 temp_input=/;s/.$//'\n```\n\n### Microcontroller\n\nConfiguration is done via serial sending string commands. Any serial terminal software like putty or Arduino IDE serial monitor console can be used.\n\nNOTE: \"clear commands\" **require whitespace** (separator without value) at end, ex: clear wifi password =\u003e \"SET_WIFI_PASSWORD \".\n\n| Command                         | Param               | Description                              | Example                                                  |\n| ------------------------------- | ------------------- | ---------------------------------------- | -------------------------------------------------------- |\n| REBOOT                          |                     | Reboot device                            | **REBOOT**                                               |\n| CLEAR_SETTINGS                  |                     | Remove all device settings               | **CLEAR_SETTINGS**                                       |\n| EXPORT_SETTINGS                 |                     | Export all device settings               | **EXPORT_SETTINGS**                                      |\n| CONNECT_WIFI                    |                     | Connect (manually) to WIFI               | **CONNECT_WIFI**                                         |\n| DISCONNECT_WIFI                 |                     | Disconnect (manually) to WIFI            | **DISCONNECT_WIFI**                                      |\n| SET_WIFI_SSID                   | \u003cssid\u003e              | Save WIFI SSID                           | **SET_WIFI_SSID myssid**                                 |\n|                                 |                     | Clear WIFI SSID                          | **SET_WIFI_SSID**                                        |\n| SET_WIFI_PASSWORD               | \u003cpassword\u003e          | Save WIFI password                       | **SET_WIFI_PASSWORD secret**                             |\n|                                 |                     | Clear WIFI password                      | **SET_WIFI_PASSWORD**                                    |\n| SET_MQTT_TELEGRAF_URI           | \u003curi\u003e               | Save MQTT uri                            | **SET_MQTT_TELEGRAF_URI mqtt://192.168.1.1**             |\n|                                 |                     | Clear MQTT uri                           | **SET_MQTT_TELEGRAF_URI**                                |\n| SET_MQTT_USERNAME               | \u003cusername\u003e          | Save MQTT username                       | **SET_MQTT_USERNAME foobar**                             |\n|                                 |                     | Clear MQTT username                      | **SET_MQTT_USERNAME**                                    |\n| SET_MQTT_PASSWORD               | \u003cpassword\u003e          | Save MQTT password                       | **SET_MQTT_PASSWORD secret**                             |\n|                                 |                     | Clear MQTT password                      | **SET_MQTT_PASSWORD**                                    |\n| SET_MQTT_TELEGRAF_GLOBAL_TOPIC  | \u003ctopic\u003e             | Save MQTT topic                          | **SET_MQTT_TELEGRAF_GLOBAL_TOPIC telegraf/myhostname/#** |\n|                                 |                     | Clear MQTT topic                         | **SET_MQTT_TELEGRAF_GLOBAL_TOPIC**                       |\n| TOGGLE_SCREEN                   |                     | Change screen (info/dashboard)           | **TOGGLE_SCREEN**                                        |\n| SET_MAX_DOWNLOAD_BITS_BANDWITH  | \u003cbits\u003e              | Save net download graph fixed max scale  | **SET_MAX_DOWNLOAD_BITS_BANDWITH 1000000000**            |\n|                                 |                     | Clear net download graph fixed max scale | **SET_MAX_DOWNLOAD_BITS_BANDWITH**                       |\n| SET_MAX_UPLOAD_BITS_BANDWITH    | \u003cbits\u003e              | Save net upload graph fixed max scale    | **SET_MAX_UPLOAD_BITS_BANDWITH 1000000000**              |\n|                                 |                     | Clear net upload graph fixed max scale   | **SET_MAX_UPLOAD_BITS_BANDWITH**                         |\n| SET_NETWORK_INTERFACE_ID        | \u003ciface\u003e             | Save network interface id                | **SET_NETWORK_INTERFACE_ID enp1s0**                      |\n|                                 |                     | Clear network interface id               | **SET_NETWORK_INTERFACE_ID**                             |\n| SET_HOSTNAME                    | \u003chostname\u003e          | Save hostname                            | **SET_HOSTNAME myhostname**                              |\n|                                 |                     | Clear hostname                           | **SET_HOSTNAME**                                         |\n| SET_SCREEN_MIRROR_FLIP_VERTICAL | \u003cbool\u003e              | Save screen mirror orientation           | **SET_SCREEN_MIRROR_FLIP_VERTICAL true**                 |\n|                                 | \u003cbool\u003e              | Clear screen mirror orientation          | **SET_SCREEN_MIRROR_FLIP_VERTICAL false**                |\n| SET_DEFAULT_SCREEN              | \u003cscreen\u003e            | Save \"INFO\" as default screen            | **SET_DEFAULT_SCREEN 1**                                 |\n|                                 | \u003cscreen\u003e            | Save \"DASHBOARD\" as default screen       | **SET_DEFAULT_SCREEN 2**                                 |\n| SET_DASHBOARD_BLOCKS            | \u003cindex\u003e \u003citems\u003e     | Set dashboard blocks                     | **SET_DASHBOARD_BLOCKS 3 2,3,6,7,8**                     |\n| SET_DASHBOARD_BLOCKS            | \u003cindex\u003e \u003c0,0,0,0,0\u003e | Clear dashboard blocks                   | **SET_DASHBOARD_BLOCKS 3 0,0,0,0,0**                     |\n\n#### NOTES:\n\n- Clear MQTT username/password configuration values if your mqtt server/broker do not require authentication.\n- SET_MAX_DOWNLOAD_BITS_BANDWITH \u0026\u0026 SET_MAX_UPLOAD_BITS_BANDWITH configuration values are required to use \"NET DOWN\" (27) / \"NET UP\" (28) static, not auto-scale networking blocks (see next section).\n\n#### EXAMPLES:\n\nConfiguration for 4 custom dashboards, network interface name =\u003e pppoe0 \u0026 network interface speed = 1Gbit\n\n```\n# EXPORTED SETTINGS BEGIN\nCLEAR_SETTINGS\nSET_WIFI_SSID YOUR_WIFI_SSID\nSET_WIFI_PASSWORD YOUR_WIFI_PASSWORD\nSET_MQTT_TELEGRAF_URI mqtt://192.168.1.5\nSET_MQTT_USERNAME telegraf_client\nSET_MQTT_PASSWORD telegraf_password\nSET_MQTT_TELEGRAF_GLOBAL_TOPIC telegraf/OPNsense.localdomain/#\nSET_MAX_DOWNLOAD_BITS_BANDWITH 1000000000\nSET_MAX_UPLOAD_BITS_BANDWITH 1000000000\nSET_NETWORK_INTERFACE_ID pppoe0\nSET_HOSTNAME OPNSENSE\nSET_DEFAULT_SCREEN 2\nSET_DASHBOARD_BLOCKS 1 1,25,26,29,30\nSET_DASHBOARD_BLOCKS 2 1,2,3,6,8\nSET_DASHBOARD_BLOCKS 3 25,13,15,16,19\nSET_DASHBOARD_BLOCKS 4 26,27,28,29,30\nREBOOT\n# EXPORTED SETTINGS END\n```\n\nConfiguration without custom dashboards (set by default one dashboard), network interface name =\u003e \"Ethernet\\ 10G\\ (SFP+)\" \u0026 network interface speed = 10Gbit\n\n```\n# EXPORTED SETTINGS BEGIN\nCLEAR_SETTINGS\nSET_WIFI_SSID YOUR_WIFI_SSID\nSET_WIFI_PASSWORD YOUR_WIFI_PASSWORD\nSET_MQTT_TELEGRAF_URI mqtt://192.168.1.5\nSET_MQTT_USERNAME telegraf_client\nSET_MQTT_PASSWORD telegraf_password\nSET_MQTT_TELEGRAF_GLOBAL_TOPIC telegraf/D-I7-11700/#\nSET_MAX_DOWNLOAD_BITS_BANDWITH 10000000000\nSET_MAX_UPLOAD_BITS_BANDWITH 10000000000\nSET_NETWORK_INTERFACE_ID Ethernet\\ 10G\\ (SFP+)\nSET_HOSTNAME WINDOWS10-I7\nSET_DEFAULT_SCREEN 2\nREBOOT\n# EXPORTED SETTINGS END\n```\n\n#### CUSTOMIZE DASHBOARD BLOCKS\n\nEvery dashboard / blocks are customized via serial commands. By default, there is only one dashboard (CPU LOAD, MEM USED, CPU TEMP, DYNAMIC NET DOWN, DYNAMIC NET UPLD) that cannot be deleted but can be modified (block exchange). Dashboard configuration must be sequential (a third one cannot be configured if the second one is not established). To delete a dashboard we only have to specify its index and values ​​0,0,0,0,0\n\nIf you want to add more dashboards and the current limit is not enough (currently 8, defined in src/display/DashboardItemType.hpp) you just have to modify the MAX_DASHBOARDS tag and recompile the project\n\nThe list of supported block types corresponds to these values ​​(defined in the src/display/DashboardItemType.hpp file):\n\n| TYPE               | VALUE | NOTES                                                                            |\n| ------------------ | ----- | -------------------------------------------------------------------------------- |\n| NONE               | 0     | empty value, used for removing block                                             |\n| CPU LOAD           | 1     |                                                                                  |\n| CPU USER           | 2     |                                                                                  |\n| CPU SYSTEM         | 3     |                                                                                  |\n| CPU IDLE           | 4     |                                                                                  |\n| CPU ACTIVE         | 5     |                                                                                  |\n| CPU NICE           | 6     |                                                                                  |\n| CPU IOWAIT         | 7     |                                                                                  |\n| CPU IRQ            | 8     |                                                                                  |\n| CPU SOFT IRQ       | 9     |                                                                                  |\n| CPU STEAL          | 10    |                                                                                  |\n| CPU GUEST          | 11    |                                                                                  |\n| CPU GUEST NICE     | 12    |                                                                                  |\n| MEM ACTIVE         | 13    |                                                                                  |\n| MEM AVAILABLE      | 14    |                                                                                  |\n| MEM BUFFERED       | 15    |                                                                                  |\n| MEM CACHED         | 16    |                                                                                  |\n| MEM DIRTY          | 17    |                                                                                  |\n| MEM FREE           | 18    |                                                                                  |\n| MEM INACTIVE       | 19    |                                                                                  |\n| MEM LAUNDRY        | 20    |                                                                                  |\n| MEM MAPPED         | 21    |                                                                                  |\n| MEM SHARED         | 22    |                                                                                  |\n| MEM SWAP CACHED    | 23    |                                                                                  |\n| MEM SWAP FREE      | 24    |                                                                                  |\n| MEM USED           | 25    |                                                                                  |\n| CPU TEMP           | 26    |                                                                                  |\n| NET DOWN           | 27    | requires having a **bit limit** set with the **SET_MAX_DOWNLOAD_BITS_BANDWITH**  |\n|                    |       | y-axis units are defined in multiples of **bits/sec** (using previous max limit) |\n|                    |       | current value units are defined in multiples of **bytes/sec**                    |\n| NET UP             | 28    | requires having a **bit limit** set with the **SET_MAX_UPLOAD_BITS_BANDWITH**    |\n|                    |       | y-axis units are defined in multiples of **bits/sec** (using previous max limit) |\n|                    |       | current value units are defined in multiples of **bytes/sec**                    |\n| NET DOWN (DYNAMIC) | 29    | y-axis automatically auto-scales with values ​​over time                         |\n|                    |       | y-axis units are defined in multiples of **bytes/sec**                           |\n|                    |       | current value units are defined in multiples of **bytes/sec**                    |\n| NET UP (DYNAMIC)   | 30    | y-axis automatically auto-scales with values ​​over time                         |\n|                    |       | y-axis units are defined in multiples of **bytes/sec**                           |\n|                    |       | current value units are defined in multiples of **bytes/sec**                    |\n\n#### NOTES:\n\n- Not all blocks are supported on all operating systems.\n- All network blocks share the same interface (support for multiple interfaces is not available at this time). If we do not specify a single network interface in the telegraf configuration, data will arrive from several interfaces and if one is not configured via serial commands (SET_NETWORK_INTERFACE_ID), they will all be mixed and the data displayed will be incorrect.\n\n## Working screenshots / photos\n\n\u003cimg src=\"https://github.com/user-attachments/assets/80b8c9d7-9a19-48ca-8666-64d6b4916eb6\" width=\"400\" alt=\"front\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/96fe35ef-6684-4bc2-a7de-d487f830032d\" width=\"400\" alt=\"back\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/a9fe69d1-ba4f-44a1-9da7-592133bb7946\" width=\"400\" alt=\"mounted info screens\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/5b09ed09-5b3a-4f2f-8699-2b766188d886\" width=\"400\" alt=\"mounted dashboard screens\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/5d25049c-14d9-4898-9be4-448c936971bd\" width=\"400\" alt=\"dashboard view\" /\u003e\n\u003cimg src=\"https://github.com/user-attachments/assets/aab87baa-0ce6-44a4-9beb-0d1dafc8224b\" width=\"400\" alt=\"info view\" /\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faportela%2Fesp32-server-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faportela%2Fesp32-server-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faportela%2Fesp32-server-dashboard/lists"}