@alteriom/painlessmesh 1.6.1 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +380 -143
  2. package/LICENSE +674 -674
  3. package/README.md +477 -434
  4. package/RELEASE_GUIDE.md +504 -418
  5. package/docs/DOCUMENTATION_MIGRATION_PLAN.md +175 -175
  6. package/docs/IMPLEMENTATION_PLAN_MESH_TOPOLOGY.md +1062 -0
  7. package/docs/MESH_TOPOLOGY_GUIDE.md +992 -0
  8. package/docs/MESH_TOPOLOGY_PROGRESS.md +422 -0
  9. package/docs/MQTT_BRIDGE_COMMANDS.md +894 -0
  10. package/docs/MQTT_BRIDGE_IMPLEMENTATION_SUMMARY.md +324 -0
  11. package/docs/MQTT_COMMAND_SCHEMA_PROPOSAL.md +576 -0
  12. package/docs/MQTT_SCHEMA_COMPLIANCE.md +285 -0
  13. package/docs/MQTT_SCHEMA_PROPOSALS.md +446 -0
  14. package/docs/MQTT_SCHEMA_REVIEW.md +690 -0
  15. package/docs/OTA_COMMANDS_REFERENCE.md +554 -0
  16. package/docs/PHASE1_GUIDE.md +349 -0
  17. package/docs/PHASE2_GUIDE.md +543 -0
  18. package/docs/README.md +77 -70
  19. package/docs/SCHEMA_VALIDATION_CHECKLIST.md +222 -0
  20. package/docs/alteriom/overview.md +507 -507
  21. package/docs/api/core-api.md +606 -606
  22. package/docs/architecture/mesh-architecture.md +378 -378
  23. package/docs/architecture/plugin-system.md +516 -516
  24. package/docs/getting-started/first-mesh.md +409 -409
  25. package/docs/getting-started/installation.md +274 -274
  26. package/docs/getting-started/quickstart.md +157 -157
  27. package/docs/improvements/FEATURE_PROPOSALS.md +337 -0
  28. package/docs/improvements/PHASE1_IMPLEMENTATION.md +325 -0
  29. package/docs/improvements/PHASE2_IMPLEMENTATION.md +567 -0
  30. package/docs/improvements/README.md +86 -68
  31. package/docs/improvements/ota-and-status-enhancements.md +911 -0
  32. package/docs/improvements/ota-status-architecture-diagrams.md +658 -0
  33. package/docs/improvements/ota-status-quick-reference.md +284 -0
  34. package/docs/platformio-publishing.md +255 -0
  35. package/docs/platformio-setup-summary.md +121 -0
  36. package/docs/troubleshooting/common-issues.md +520 -520
  37. package/docs/troubleshooting/faq.md +472 -472
  38. package/docs/tutorials/basic-examples.md +717 -717
  39. package/docs/wiki/API-Reference.md +245 -245
  40. package/docs/wiki/Complete-Documentation.md +122 -122
  41. package/examples/alteriom/README.md +139 -81
  42. package/examples/alteriom/alteriom.ino +186 -185
  43. package/examples/alteriom/alteriom_sensor_package.hpp +240 -127
  44. package/examples/alteriom/platformio.ini +24 -24
  45. package/examples/alteriomImproved/alteriom_sensor_package.hpp +224 -0
  46. package/examples/{alteriom → alteriomImproved}/improved_sensor_node.ino +245 -245
  47. package/examples/alteriomImproved/platformio.ini +25 -0
  48. package/examples/alteriomPhase1/alteriom_sensor_package.hpp +224 -0
  49. package/examples/alteriomPhase1/phase1_features.ino +242 -0
  50. package/examples/alteriomPhase1/platformio.ini +25 -0
  51. package/examples/alteriomPhase2/alteriom_sensor_package.hpp +224 -0
  52. package/examples/alteriomPhase2/phase2_features.ino +186 -0
  53. package/examples/alteriomPhase2/platformio.ini +25 -0
  54. package/examples/{alteriom → alteriomSensorNode}/alteriom_sensor_node.ino +183 -183
  55. package/examples/alteriomSensorNode/alteriom_sensor_package.hpp +224 -0
  56. package/examples/alteriomSensorNode/platformio.ini +25 -0
  57. package/examples/basic/basic.ino +66 -66
  58. package/examples/basic/platformio.ini +25 -25
  59. package/examples/bridge/bridge.ino +51 -51
  60. package/examples/bridge/mesh_event_publisher.hpp +253 -0
  61. package/examples/bridge/mesh_topology_reporter.hpp +303 -0
  62. package/examples/bridge/mqtt_command_bridge.hpp +459 -0
  63. package/examples/bridge/mqtt_status_bridge.hpp +519 -0
  64. package/examples/bridge/platformio.ini +25 -25
  65. package/examples/echoNode/echoNode.ino +33 -33
  66. package/examples/echoNode/platformio.ini +25 -25
  67. package/examples/logClient/logClient.ino +109 -109
  68. package/examples/logClient/platformio.ini +25 -25
  69. package/examples/logServer/logServer.ino +81 -81
  70. package/examples/logServer/platformio.ini +25 -25
  71. package/examples/meshCommandNode/alteriom_sensor_package.hpp +235 -0
  72. package/examples/meshCommandNode/meshCommandNode.ino +263 -0
  73. package/examples/meshCommandNode/platformio.ini +25 -0
  74. package/examples/mqttBridge/mqttBridge.ino +118 -118
  75. package/examples/mqttBridge/platformio.ini +26 -26
  76. package/examples/mqttCommandBridge/alteriom_sensor_package.hpp +235 -0
  77. package/examples/mqttCommandBridge/mesh_event_publisher.hpp +253 -0
  78. package/examples/mqttCommandBridge/mesh_topology_reporter.hpp +303 -0
  79. package/examples/mqttCommandBridge/mqttCommandBridge.ino +252 -0
  80. package/examples/mqttCommandBridge/mqtt_command_bridge.hpp +459 -0
  81. package/examples/mqttCommandBridge/platformio.ini +26 -0
  82. package/examples/mqttStatusBridge/mqttStatusBridge.ino +216 -0
  83. package/examples/mqttStatusBridge/mqtt_status_bridge.hpp +522 -0
  84. package/examples/mqttStatusBridge/platformio.ini +26 -0
  85. package/examples/mqttTopologyTest/README.md +467 -0
  86. package/examples/mqttTopologyTest/mqttTopologyTest.ino +748 -0
  87. package/examples/mqttTopologyTest/platformio.ini +26 -0
  88. package/examples/namedMesh/namedMesh.ino +97 -97
  89. package/examples/namedMesh/platformio.ini +25 -25
  90. package/examples/otaReceiver/otaReceiver.ino +79 -79
  91. package/examples/otaReceiver/platformio.ini +25 -25
  92. package/examples/otaSender/otaSender.ino +160 -151
  93. package/examples/otaSender/platformio.ini +25 -25
  94. package/examples/startHere/platformio.ini +25 -25
  95. package/examples/startHere/startHere.ino +159 -159
  96. package/examples/webServer/platformio.ini +27 -27
  97. package/examples/webServer/webServer.ino +89 -89
  98. package/keywords.txt +48 -48
  99. package/library.json +55 -34
  100. package/library.properties +10 -10
  101. package/package.json +86 -78
  102. package/src/AlteriomPainlessMesh.h +97 -97
  103. package/src/arduino/wifi.hpp +365 -365
  104. package/src/boost/asynctcp.hpp +279 -279
  105. package/src/painlessMesh.h +70 -70
  106. package/src/painlessMeshSTA.cpp +236 -236
  107. package/src/painlessMeshSTA.h +58 -58
  108. package/src/painlessTaskOptions.h +4 -4
  109. package/src/painlessmesh/base64.hpp +111 -111
  110. package/src/painlessmesh/buffer.hpp +229 -229
  111. package/src/painlessmesh/callback.hpp +91 -91
  112. package/src/painlessmesh/configuration.hpp +77 -77
  113. package/src/painlessmesh/connection.hpp +192 -192
  114. package/src/painlessmesh/layout.hpp +188 -188
  115. package/src/painlessmesh/logger.hpp +158 -158
  116. package/src/painlessmesh/memory.hpp +119 -119
  117. package/src/painlessmesh/mesh.hpp +761 -560
  118. package/src/painlessmesh/metrics.hpp +322 -322
  119. package/src/painlessmesh/ntp.hpp +263 -263
  120. package/src/painlessmesh/ota.hpp +582 -553
  121. package/src/painlessmesh/plugin.hpp +188 -188
  122. package/src/painlessmesh/protocol.hpp +813 -813
  123. package/src/painlessmesh/router.hpp +322 -322
  124. package/src/painlessmesh/tcp.hpp +71 -71
  125. package/src/painlessmesh/validation.hpp +238 -238
  126. package/src/plugin/performance.hpp +214 -214
  127. package/src/plugin/remote.hpp +64 -64
  128. package/src/scheduler.cpp +10 -10
  129. package/src/wifi.cpp +2 -2
package/library.json CHANGED
@@ -1,34 +1,55 @@
1
- {
2
- "name": "painlessMesh",
3
- "keywords": "ethernet, m2m, iot, mesh, alteriom, sensor",
4
- "description": "painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices. This Alteriom fork includes additional packages for sensor data (SensorPackage), device commands (CommandPackage), and status monitoring (StatusPackage). It handles routing and network management automatically, so you can focus on your application. The library uses JSON-based messaging and syncs time across all nodes, making it ideal for coordinated behaviour like synchronized light displays or sensor networks reporting to a central node.",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/Alteriom/painlessMesh"
8
- },
9
- "version": "1.6.1",
10
- "frameworks": "arduino",
11
- "platforms": "espressif8266, espressif32",
12
- "dependencies": [
13
- { "owner": "esp32async", "name": "AsyncTCP", "version": "^3.4.7", "platforms" : ["espressif32"] },
14
- { "owner": "esp32async", "name": "ESPAsyncTCP", "version": "^2.0.0", "platforms" : ["espressif8266"] },
15
- { "owner": "bblanchon", "name": "ArduinoJson", "version": "^7.4.2" },
16
- { "owner": "arkhipenko", "name": "TaskScheduler", "version": "^3.8.5" }
17
- ],
18
- "authors": [
19
- { "name": "Scotty Franzyshen" },
20
- {
21
- "name": "Coopdis",
22
- "url": "https://github.com/Coopdis"
23
- },
24
- { "name": "Edwin van Leeuwen" },
25
- { "name": "Germán Martín" },
26
- { "name": "Maximilian Schwarz" },
27
- { "name": "Doanh Doanh" },
28
- {
29
- "name": "Alteriom",
30
- "url": "https://github.com/Alteriom"
31
- }
32
- ],
33
- "headers": "painlessMesh.h"
34
- }
1
+ {
2
+ "name": "AlteriomPainlessMesh",
3
+ "keywords": "ethernet, m2m, iot, mesh, alteriom, sensor, esp32, esp8266, json, time-sync, wireless, communication",
4
+ "description": "painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices. This Alteriom fork includes additional packages for sensor data (SensorPackage), device commands (CommandPackage), and status monitoring (StatusPackage). It handles routing and network management automatically, so you can focus on your application. The library uses JSON-based messaging and syncs time across all nodes, making it ideal for coordinated behaviour like synchronized light displays or sensor networks reporting to a central node.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Alteriom/painlessMesh"
8
+ },
9
+ "version": "1.7.2",
10
+ "frameworks": ["arduino"],
11
+ "platforms": ["espressif8266", "espressif32"],
12
+ "srcDir": "src",
13
+ "includeDir": "src",
14
+ "dependencies": [
15
+ { "owner": "esp32async", "name": "AsyncTCP", "version": "^3.4.7", "platforms" : ["espressif32"] },
16
+ { "owner": "esp32async", "name": "ESPAsyncTCP", "version": "^2.0.0", "platforms" : ["espressif8266"] },
17
+ { "owner": "bblanchon", "name": "ArduinoJson", "version": "^7.4.2" },
18
+ { "owner": "arkhipenko", "name": "TaskScheduler", "version": "^4.0.0" }
19
+ ],
20
+ "authors": [
21
+ { "name": "Scotty Franzyshen" },
22
+ {
23
+ "name": "Coopdis",
24
+ "url": "https://github.com/Coopdis"
25
+ },
26
+ { "name": "Edwin van Leeuwen" },
27
+ { "name": "Germán Martín" },
28
+ { "name": "Maximilian Schwarz" },
29
+ { "name": "Doanh Doanh" },
30
+ {
31
+ "name": "Alteriom",
32
+ "url": "https://github.com/Alteriom",
33
+ "maintainer": true
34
+ }
35
+ ],
36
+ "license": "LGPL-3.0",
37
+ "homepage": "https://github.com/Alteriom/painlessMesh",
38
+ "headers": ["painlessMesh.h", "AlteriomPainlessMesh.h"],
39
+ "examples": [
40
+ "examples/alteriom/alteriom.ino",
41
+ "examples/alteriom/alteriom_sensor_node.ino",
42
+ "examples/alteriom/improved_sensor_node.ino",
43
+ "examples/basic/basic.ino",
44
+ "examples/bridge/bridge.ino",
45
+ "examples/echoNode/echoNode.ino",
46
+ "examples/logClient/logClient.ino",
47
+ "examples/logServer/logServer.ino",
48
+ "examples/mqttBridge/mqttBridge.ino",
49
+ "examples/namedMesh/namedMesh.ino",
50
+ "examples/otaReceiver/otaReceiver.ino",
51
+ "examples/otaSender/otaSender.ino",
52
+ "examples/startHere/startHere.ino",
53
+ "examples/webServer/webServer.ino"
54
+ ]
55
+ }
@@ -1,11 +1,11 @@
1
- name=AlteriomPainlessMesh
2
- version=1.6.1
3
- author=Coopdis,Scotty Franzyshen,Edwin van Leeuwen,Germán Martín,Maximilian Schwarz,Doanh Doanh,Alteriom
4
- maintainer=Alteriom
5
- sentence=A painless way to setup a mesh with ESP8266 and ESP32 devices with Alteriom extensions
6
- paragraph=painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices. This Alteriom fork includes additional packages for sensor data (SensorPackage), device commands (CommandPackage), and status monitoring (StatusPackage). It handles routing and network management automatically, so you can focus on your application. The library uses JSON-based messaging and syncs time across all nodes, making it ideal for coordinated behaviour like synchronized light displays or sensor networks reporting to a central node.
7
- category=Communication
8
- url=https://github.com/Alteriom/painlessMesh
9
- architectures=esp8266,esp32
10
- includes=AlteriomPainlessMesh.h
1
+ name=AlteriomPainlessMesh
2
+ version=1.7.2
3
+ author=Coopdis,Scotty Franzyshen,Edwin van Leeuwen,Germán Martín,Maximilian Schwarz,Doanh Doanh,Alteriom
4
+ maintainer=Alteriom
5
+ sentence=A painless way to setup a mesh with ESP8266 and ESP32 devices with Alteriom extensions
6
+ paragraph=painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices. This Alteriom fork includes additional packages for sensor data (SensorPackage), device commands (CommandPackage), and status monitoring (StatusPackage). It handles routing and network management automatically, so you can focus on your application. The library uses JSON-based messaging and syncs time across all nodes, making it ideal for coordinated behaviour like synchronized light displays or sensor networks reporting to a central node.
7
+ category=Communication
8
+ url=https://github.com/Alteriom/painlessMesh
9
+ architectures=esp8266,esp32
10
+ includes=painlessMesh.h
11
11
  depends=ArduinoJson, TaskScheduler
package/package.json CHANGED
@@ -1,78 +1,86 @@
1
- {
2
- "name": "@alteriom/painlessmesh",
3
- "version": "1.6.1",
4
- "description": "painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices. This Alteriom fork includes additional packages for sensor data (SensorPackage), device commands (CommandPackage), and status monitoring (StatusPackage). It handles routing and network management automatically, so you can focus on your application. The library uses JSON-based messaging and syncs time across all nodes, making it ideal for coordinated behaviour like synchronized light displays or sensor networks reporting to a central node.",
5
- "keywords": [
6
- "arduino",
7
- "mesh",
8
- "esp32",
9
- "esp8266",
10
- "embedded",
11
- "iot",
12
- "wireless",
13
- "alteriom",
14
- "sensor",
15
- "painlessmesh",
16
- "mcp-server",
17
- "github-copilot",
18
- "json",
19
- "time-sync",
20
- "mesh-networking"
21
- ],
22
- "author": {
23
- "name": "Coopdis",
24
- "url": "https://github.com/Coopdis"
25
- },
26
- "maintainers": [
27
- {
28
- "name": "Alteriom",
29
- "url": "https://github.com/Alteriom"
30
- }
31
- ],
32
- "license": "LGPL-3.0",
33
- "homepage": "https://github.com/Alteriom/painlessMesh",
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/Alteriom/painlessMesh.git"
37
- },
38
- "bugs": {
39
- "url": "https://github.com/Alteriom/painlessMesh/issues"
40
- },
41
- "devDependencies": {
42
- "@eslint/js": "^9.0.0",
43
- "prettier": "^3.0.0"
44
- },
45
- "scripts": {
46
- "test": "run-parts --regex catch_ bin/ || echo 'Tests completed'",
47
- "build": "cmake -G Ninja . && ninja",
48
- "validate-library": "./scripts/validate-release.sh",
49
- "postpublish": "echo 'Package published successfully to NPM!'",
50
- "prebuild": "git submodule update --init"
51
- },
52
- "engines": {
53
- "node": ">=14.0.0"
54
- },
55
- "config": {
56
- "arduino": {
57
- "library": true,
58
- "platforms": ["arduino", "esp32", "esp8266"]
59
- }
60
- },
61
- "directories": {
62
- "example": "examples",
63
- "test": "test",
64
- "doc": "docs"
65
- },
66
- "files": [
67
- "src/",
68
- "examples/",
69
- "docs/",
70
- "library.properties",
71
- "library.json",
72
- "keywords.txt",
73
- "README.md",
74
- "LICENSE",
75
- "CHANGELOG.md",
76
- "RELEASE_GUIDE.md"
77
- ]
78
- }
1
+ {
2
+ "name": "@alteriom/painlessmesh",
3
+ "version": "1.7.2",
4
+ "description": "painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices. This Alteriom fork includes additional packages for sensor data (SensorPackage), device commands (CommandPackage), and status monitoring (StatusPackage). It handles routing and network management automatically, so you can focus on your application. The library uses JSON-based messaging and syncs time across all nodes, making it ideal for coordinated behaviour like synchronized light displays or sensor networks reporting to a central node.",
5
+ "keywords": [
6
+ "arduino",
7
+ "mesh",
8
+ "esp32",
9
+ "esp8266",
10
+ "embedded",
11
+ "iot",
12
+ "wireless",
13
+ "alteriom",
14
+ "sensor",
15
+ "painlessmesh",
16
+ "mcp-server",
17
+ "github-copilot",
18
+ "json",
19
+ "time-sync",
20
+ "mesh-networking"
21
+ ],
22
+ "author": {
23
+ "name": "Coopdis",
24
+ "url": "https://github.com/Coopdis"
25
+ },
26
+ "maintainers": [
27
+ {
28
+ "name": "Alteriom",
29
+ "url": "https://github.com/Alteriom"
30
+ }
31
+ ],
32
+ "license": "LGPL-3.0",
33
+ "homepage": "https://github.com/Alteriom/painlessMesh",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/Alteriom/painlessMesh.git"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/Alteriom/painlessMesh/issues"
40
+ },
41
+ "devDependencies": {
42
+ "@alteriom/mqtt-schema": "^0.5.0",
43
+ "@eslint/js": "^9.0.0",
44
+ "ajv": "^8.17.1",
45
+ "ajv-formats": "^3.0.1",
46
+ "prettier": "^3.0.0"
47
+ },
48
+ "scripts": {
49
+ "test": "run-parts --regex catch_ bin/ || echo 'Tests completed'",
50
+ "dev:build": "cmake -G Ninja . && ninja",
51
+ "dev:prebuild": "git submodule update --init",
52
+ "validate-library": "./scripts/validate-release.sh",
53
+ "prepublishOnly": "npm run validate-library",
54
+ "postpublish": "echo 'Package published successfully to NPM!'"
55
+ },
56
+ "engines": {
57
+ "node": ">=14.0.0"
58
+ },
59
+ "config": {
60
+ "arduino": {
61
+ "library": true,
62
+ "platforms": [
63
+ "arduino",
64
+ "esp32",
65
+ "esp8266"
66
+ ]
67
+ }
68
+ },
69
+ "directories": {
70
+ "example": "examples",
71
+ "test": "test",
72
+ "doc": "docs"
73
+ },
74
+ "files": [
75
+ "src/",
76
+ "examples/",
77
+ "docs/",
78
+ "library.properties",
79
+ "library.json",
80
+ "keywords.txt",
81
+ "README.md",
82
+ "LICENSE",
83
+ "CHANGELOG.md",
84
+ "RELEASE_GUIDE.md"
85
+ ]
86
+ }
@@ -1,98 +1,98 @@
1
- #ifndef ALTERIOM_PAINLESS_MESH_H
2
- #define ALTERIOM_PAINLESS_MESH_H
3
-
4
- /**
5
- * @file AlteriomPainlessMesh.h
6
- * @brief Main header file for AlteriomPainlessMesh library
7
- *
8
- * This is the primary header file that includes all necessary components
9
- * for the AlteriomPainlessMesh library, including the core painlessMesh
10
- * functionality and Alteriom-specific extensions.
11
- */
12
-
13
- // Include the core painlessMesh library
14
- #include "painlessMesh.h"
15
-
16
- // Include Alteriom extensions
17
- #include "examples/alteriom/alteriom_sensor_package.hpp"
18
-
19
- /**
20
- * @namespace alteriom
21
- * @brief Namespace containing Alteriom-specific extensions for painlessMesh
22
- *
23
- * This namespace includes production-ready packages for common IoT scenarios:
24
- * - SensorPackage: Environmental sensor data broadcasting
25
- * - CommandPackage: Device control and configuration
26
- * - StatusPackage: Device health and operational status
27
- */
28
-
29
- /**
30
- * @brief AlteriomPainlessMesh library version information
31
- */
32
- #define ALTERIOM_PAINLESS_MESH_VERSION "1.6.1"
33
- #define ALTERIOM_PAINLESS_MESH_VERSION_MAJOR 1
34
- #define ALTERIOM_PAINLESS_MESH_VERSION_MINOR 6
35
- #define ALTERIOM_PAINLESS_MESH_VERSION_PATCH 1
36
-
37
- /**
38
- * @brief Library description and usage information
39
- *
40
- * AlteriomPainlessMesh is an enhanced fork of the popular painlessMesh library
41
- * that adds production-ready, type-safe packages for common IoT communication
42
- * patterns. It provides:
43
- *
44
- * - Automatic mesh network formation and management
45
- * - Type-safe messaging with compile-time validation
46
- * - Pre-built packages for sensors, commands, and status reporting
47
- * - Cross-platform compatibility (ESP32, ESP8266, desktop)
48
- * - Time synchronization across all mesh nodes
49
- *
50
- * @section quick_start Quick Start
51
- *
52
- * @code{.cpp}
53
- * #include "AlteriomPainlessMesh.h"
54
- *
55
- * #define MESH_PREFIX "MyMesh"
56
- * #define MESH_PASSWORD "MyPassword"
57
- * #define MESH_PORT 5555
58
- *
59
- * Scheduler userScheduler;
60
- * painlessMesh mesh;
61
- *
62
- * void setup() {
63
- * Serial.begin(115200);
64
- *
65
- * mesh.setDebugMsgTypes(ERROR | STARTUP | CONNECTION);
66
- * mesh.init(MESH_PREFIX, MESH_PASSWORD, &userScheduler, MESH_PORT);
67
- *
68
- * mesh.onReceive([](uint32_t from, String& msg) {
69
- * Serial.printf("Received: %s\n", msg.c_str());
70
- * });
71
- * }
72
- *
73
- * void loop() {
74
- * mesh.update();
75
- * }
76
- * @endcode
77
- *
78
- * @section alteriom_packages Alteriom Packages
79
- *
80
- * @code{.cpp}
81
- * using namespace alteriom;
82
- *
83
- * // Send sensor data
84
- * SensorPackage sensor;
85
- * sensor.temperature = 25.5;
86
- * sensor.humidity = 60.0;
87
- * mesh.sendPackage(&sensor);
88
- *
89
- * // Handle received sensor data
90
- * mesh.onPackage(200, [](protocol::Variant& variant) {
91
- * SensorPackage data = variant.to<SensorPackage>();
92
- * Serial.printf("Temperature: %.1f°C\n", data.temperature);
93
- * return true;
94
- * });
95
- * @endcode
96
- */
97
-
1
+ #ifndef ALTERIOM_PAINLESS_MESH_H
2
+ #define ALTERIOM_PAINLESS_MESH_H
3
+
4
+ /**
5
+ * @file AlteriomPainlessMesh.h
6
+ * @brief Main header file for AlteriomPainlessMesh library
7
+ *
8
+ * This is the primary header file that includes all necessary components
9
+ * for the AlteriomPainlessMesh library, including the core painlessMesh
10
+ * functionality and Alteriom-specific extensions.
11
+ */
12
+
13
+ // Include the core painlessMesh library
14
+ #include "painlessMesh.h"
15
+
16
+ // Note: Alteriom extensions (alteriom_sensor_package.hpp) are provided as examples
17
+ // and should be included directly in your sketch when needed
18
+
19
+ /**
20
+ * @namespace alteriom
21
+ * @brief Namespace containing Alteriom-specific extensions for painlessMesh
22
+ *
23
+ * This namespace includes production-ready packages for common IoT scenarios:
24
+ * - SensorPackage: Environmental sensor data broadcasting
25
+ * - CommandPackage: Device control and configuration
26
+ * - StatusPackage: Device health and operational status
27
+ */
28
+
29
+ /**
30
+ * @brief AlteriomPainlessMesh library version information
31
+ */
32
+ #define ALTERIOM_PAINLESS_MESH_VERSION "1.6.1"
33
+ #define ALTERIOM_PAINLESS_MESH_VERSION_MAJOR 1
34
+ #define ALTERIOM_PAINLESS_MESH_VERSION_MINOR 6
35
+ #define ALTERIOM_PAINLESS_MESH_VERSION_PATCH 1
36
+
37
+ /**
38
+ * @brief Library description and usage information
39
+ *
40
+ * AlteriomPainlessMesh is an enhanced fork of the popular painlessMesh library
41
+ * that adds production-ready, type-safe packages for common IoT communication
42
+ * patterns. It provides:
43
+ *
44
+ * - Automatic mesh network formation and management
45
+ * - Type-safe messaging with compile-time validation
46
+ * - Pre-built packages for sensors, commands, and status reporting
47
+ * - Cross-platform compatibility (ESP32, ESP8266, desktop)
48
+ * - Time synchronization across all mesh nodes
49
+ *
50
+ * @section quick_start Quick Start
51
+ *
52
+ * @code{.cpp}
53
+ * #include "AlteriomPainlessMesh.h"
54
+ *
55
+ * #define MESH_PREFIX "MyMesh"
56
+ * #define MESH_PASSWORD "MyPassword"
57
+ * #define MESH_PORT 5555
58
+ *
59
+ * Scheduler userScheduler;
60
+ * painlessMesh mesh;
61
+ *
62
+ * void setup() {
63
+ * Serial.begin(115200);
64
+ *
65
+ * mesh.setDebugMsgTypes(ERROR | STARTUP | CONNECTION);
66
+ * mesh.init(MESH_PREFIX, MESH_PASSWORD, &userScheduler, MESH_PORT);
67
+ *
68
+ * mesh.onReceive([](uint32_t from, String& msg) {
69
+ * Serial.printf("Received: %s\n", msg.c_str());
70
+ * });
71
+ * }
72
+ *
73
+ * void loop() {
74
+ * mesh.update();
75
+ * }
76
+ * @endcode
77
+ *
78
+ * @section alteriom_packages Alteriom Packages
79
+ *
80
+ * @code{.cpp}
81
+ * using namespace alteriom;
82
+ *
83
+ * // Send sensor data
84
+ * SensorPackage sensor;
85
+ * sensor.temperature = 25.5;
86
+ * sensor.humidity = 60.0;
87
+ * mesh.sendPackage(&sensor);
88
+ *
89
+ * // Handle received sensor data
90
+ * mesh.onPackage(200, [](protocol::Variant& variant) {
91
+ * SensorPackage data = variant.to<SensorPackage>();
92
+ * Serial.printf("Temperature: %.1f°C\n", data.temperature);
93
+ * return true;
94
+ * });
95
+ * @endcode
96
+ */
97
+
98
98
  #endif // ALTERIOM_PAINLESS_MESH_H