@alteriom/painlessmesh 1.6.1 → 1.7.3

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 (152) hide show
  1. package/CHANGELOG.md +435 -144
  2. package/LICENSE +674 -674
  3. package/README.md +491 -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 +130 -71
  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/archive/DOCUSAURUS_DEPLOYMENT.md +166 -0
  25. package/docs/archive/FEATURE_PROPOSALS.md +337 -0
  26. package/docs/archive/LIBRARY_JSON_FIX.md +98 -0
  27. package/docs/archive/LIBRARY_STRUCTURE_FIX.md +215 -0
  28. package/docs/archive/PHASE1_IMPLEMENTATION.md +325 -0
  29. package/docs/archive/PHASE2_IMPLEMENTATION.md +567 -0
  30. package/docs/archive/RELEASE_SUMMARY.md +173 -0
  31. package/docs/archive/SCONS_BUILD_FIX.md +313 -0
  32. package/docs/archive/TRIGGER_RELEASE.md +280 -0
  33. package/docs/archive/VECTOR_INCLUDE_FIX.md +129 -0
  34. package/docs/archive/ota-and-status-enhancements.md +911 -0
  35. package/docs/archive/ota-status-architecture-diagrams.md +658 -0
  36. package/docs/archive/ota-status-quick-reference.md +284 -0
  37. package/docs/development/ARDUINO_COMPLIANCE_SUMMARY.md +71 -0
  38. package/docs/development/CODE_REFACTORING_RECOMMENDATIONS.md +1011 -0
  39. package/docs/development/DOCKER_TESTING.md +196 -0
  40. package/docs/development/PLATFORMIO_USAGE.md +180 -0
  41. package/docs/development/TESTING_SUMMARY.md +126 -0
  42. package/docs/development/contributing.md +301 -0
  43. package/docs/development/documentation.md +583 -0
  44. package/docs/getting-started/first-mesh.md +409 -409
  45. package/docs/getting-started/installation.md +274 -274
  46. package/docs/getting-started/quickstart.md +157 -157
  47. package/docs/improvements/FUTURE_PROPOSALS.md +1016 -0
  48. package/docs/improvements/IMPLEMENTATION_HISTORY.md +1091 -0
  49. package/docs/improvements/OTA_STATUS_ENHANCEMENTS.md +709 -0
  50. package/docs/improvements/README.md +212 -69
  51. package/docs/platformio-publishing.md +255 -0
  52. package/docs/platformio-setup-summary.md +121 -0
  53. package/docs/releases/FEATURE_HISTORY.md +543 -0
  54. package/docs/releases/PATCH_v1.7.3.md +262 -0
  55. package/docs/releases/PHASE1_SUMMARY.md +246 -0
  56. package/docs/releases/PHASE2_SUMMARY.md +499 -0
  57. package/docs/releases/RELEASE_NOTES_1.7.0.md +539 -0
  58. package/docs/troubleshooting/common-issues.md +520 -520
  59. package/docs/troubleshooting/debugging.md +455 -0
  60. package/docs/troubleshooting/faq.md +472 -472
  61. package/docs/tutorials/basic-examples.md +717 -717
  62. package/docs/wiki/API-Reference.md +245 -245
  63. package/docs/wiki/Complete-Documentation.md +122 -122
  64. package/examples/alteriom/README.md +139 -81
  65. package/examples/alteriom/alteriom.ino +186 -185
  66. package/examples/alteriom/alteriom_sensor_package.hpp +240 -127
  67. package/examples/alteriom/platformio.ini +24 -24
  68. package/examples/alteriomImproved/alteriom_sensor_package.hpp +224 -0
  69. package/examples/{alteriom → alteriomImproved}/improved_sensor_node.ino +245 -245
  70. package/examples/alteriomImproved/platformio.ini +25 -0
  71. package/examples/alteriomPhase1/alteriom_sensor_package.hpp +224 -0
  72. package/examples/alteriomPhase1/phase1_features.ino +242 -0
  73. package/examples/alteriomPhase1/platformio.ini +25 -0
  74. package/examples/alteriomPhase2/alteriom_sensor_package.hpp +224 -0
  75. package/examples/alteriomPhase2/phase2_features.ino +186 -0
  76. package/examples/alteriomPhase2/platformio.ini +25 -0
  77. package/examples/{alteriom → alteriomSensorNode}/alteriom_sensor_node.ino +183 -183
  78. package/examples/alteriomSensorNode/alteriom_sensor_package.hpp +224 -0
  79. package/examples/alteriomSensorNode/platformio.ini +25 -0
  80. package/examples/basic/basic.ino +66 -66
  81. package/examples/basic/platformio.ini +25 -25
  82. package/examples/bridge/bridge.ino +51 -51
  83. package/examples/bridge/mesh_event_publisher.hpp +253 -0
  84. package/examples/bridge/mesh_topology_reporter.hpp +303 -0
  85. package/examples/bridge/mqtt_command_bridge.hpp +459 -0
  86. package/examples/bridge/mqtt_status_bridge.hpp +519 -0
  87. package/examples/bridge/platformio.ini +25 -25
  88. package/examples/echoNode/echoNode.ino +33 -33
  89. package/examples/echoNode/platformio.ini +25 -25
  90. package/examples/logClient/logClient.ino +109 -109
  91. package/examples/logClient/platformio.ini +25 -25
  92. package/examples/logServer/logServer.ino +81 -81
  93. package/examples/logServer/platformio.ini +25 -25
  94. package/examples/meshCommandNode/alteriom_sensor_package.hpp +235 -0
  95. package/examples/meshCommandNode/meshCommandNode.ino +263 -0
  96. package/examples/meshCommandNode/platformio.ini +25 -0
  97. package/examples/mqttBridge/mqttBridge.ino +118 -118
  98. package/examples/mqttBridge/platformio.ini +26 -26
  99. package/examples/mqttCommandBridge/alteriom_sensor_package.hpp +235 -0
  100. package/examples/mqttCommandBridge/mesh_event_publisher.hpp +253 -0
  101. package/examples/mqttCommandBridge/mesh_topology_reporter.hpp +303 -0
  102. package/examples/mqttCommandBridge/mqttCommandBridge.ino +252 -0
  103. package/examples/mqttCommandBridge/mqtt_command_bridge.hpp +459 -0
  104. package/examples/mqttCommandBridge/platformio.ini +26 -0
  105. package/examples/mqttStatusBridge/mqttStatusBridge.ino +216 -0
  106. package/examples/mqttStatusBridge/mqtt_status_bridge.hpp +522 -0
  107. package/examples/mqttStatusBridge/platformio.ini +26 -0
  108. package/examples/mqttTopologyTest/README.md +467 -0
  109. package/examples/mqttTopologyTest/mqttTopologyTest.ino +748 -0
  110. package/examples/mqttTopologyTest/platformio.ini +26 -0
  111. package/examples/namedMesh/namedMesh.ino +97 -97
  112. package/examples/namedMesh/platformio.ini +25 -25
  113. package/examples/otaReceiver/otaReceiver.ino +79 -79
  114. package/examples/otaReceiver/platformio.ini +25 -25
  115. package/examples/otaSender/otaSender.ino +160 -151
  116. package/examples/otaSender/platformio.ini +25 -25
  117. package/examples/startHere/platformio.ini +25 -25
  118. package/examples/startHere/startHere.ino +159 -159
  119. package/examples/webServer/platformio.ini +27 -27
  120. package/examples/webServer/webServer.ino +89 -89
  121. package/keywords.txt +48 -48
  122. package/library.json +55 -34
  123. package/library.properties +10 -10
  124. package/package.json +86 -78
  125. package/src/AlteriomPainlessMesh.h +97 -97
  126. package/src/arduino/wifi.hpp +365 -365
  127. package/src/boost/asynctcp.hpp +279 -279
  128. package/src/painlessMesh.h +70 -70
  129. package/src/painlessMeshSTA.cpp +236 -236
  130. package/src/painlessMeshSTA.h +58 -58
  131. package/src/painlessTaskOptions.h +4 -4
  132. package/src/painlessmesh/base64.hpp +111 -111
  133. package/src/painlessmesh/buffer.hpp +229 -229
  134. package/src/painlessmesh/callback.hpp +91 -91
  135. package/src/painlessmesh/configuration.hpp +77 -77
  136. package/src/painlessmesh/connection.hpp +192 -192
  137. package/src/painlessmesh/layout.hpp +188 -188
  138. package/src/painlessmesh/logger.hpp +158 -158
  139. package/src/painlessmesh/memory.hpp +119 -119
  140. package/src/painlessmesh/mesh.hpp +761 -560
  141. package/src/painlessmesh/metrics.hpp +322 -322
  142. package/src/painlessmesh/ntp.hpp +263 -263
  143. package/src/painlessmesh/ota.hpp +582 -553
  144. package/src/painlessmesh/plugin.hpp +188 -188
  145. package/src/painlessmesh/protocol.hpp +813 -813
  146. package/src/painlessmesh/router.hpp +338 -322
  147. package/src/painlessmesh/tcp.hpp +71 -71
  148. package/src/painlessmesh/validation.hpp +238 -238
  149. package/src/plugin/performance.hpp +214 -214
  150. package/src/plugin/remote.hpp +64 -64
  151. package/src/scheduler.cpp +10 -10
  152. 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.3",
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.3
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.3",
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