@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/CHANGELOG.md CHANGED
@@ -1,144 +1,435 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [Unreleased]
9
-
10
- ### Added
11
-
12
- - TBD
13
-
14
- ### Changed
15
-
16
- - TBD
17
-
18
- ### Fixed
19
-
20
- - TBD
21
-
22
- ## [1.6.1] - 2025-09-29
23
-
24
- ### Added
25
-
26
- - **Arduino Library Manager Support**: Updated library name to "Alteriom PainlessMesh" for better discoverability
27
- - **NPM Package Publishing**: Complete NPM publication setup with dual registry support
28
- - Public NPM registry: `@alteriom/painlessmesh`
29
- - GitHub Packages registry: `@alteriom/painlessmesh` (scoped)
30
- - Automated version consistency across library.properties, library.json, and package.json
31
- - **GitHub Wiki Automation**: Automatic wiki synchronization on releases
32
- - Home page generated from README.md
33
- - API Reference with auto-generated documentation
34
- - Examples page with links to repository examples
35
- - Installation guide for multiple platforms
36
- - **Enhanced Release Workflow**: Comprehensive publication automation
37
- - NPM publishing to both public and GitHub Packages registries
38
- - GitHub Wiki updates with structured documentation
39
- - Arduino Library Manager submission instructions
40
- - Release validation with multi-file version consistency
41
- - **Arduino IDE Support**: Added keywords.txt for syntax highlighting
42
- - **Distribution Documentation**: Complete guides for all publication channels
43
- - RELEASE_SUMMARY.md template for release notes
44
- - TRIGGER_RELEASE.md for step-by-step release instructions
45
- - Enhanced RELEASE_GUIDE.md with comprehensive publication workflow
46
- - **Version Management**: Enhanced bump-version script
47
- - Updates all three version files simultaneously (library.properties, library.json, package.json)
48
- - Comprehensive version consistency validation
49
- - Clear instructions for NPM and GitHub Packages publication
50
-
51
- ### Changed
52
- - **Library Name**: Updated from "Painless Mesh" to "Alteriom PainlessMesh" for Arduino Library Manager
53
- - **Release Process**: Streamlined to support multiple package managers
54
- - Single commit with "release:" prefix triggers full publication pipeline
55
- - Automated testing, building, and publishing across all channels
56
- - Wiki documentation automatically synchronized
57
- - **CI/CD Pipeline**: Enhanced with NPM publication capabilities
58
- - Dual NPM registry publishing (public + GitHub Packages)
59
- - Automated wiki updates with generated content
60
- - Comprehensive pre-release validation
61
- - **Documentation Structure**: Reorganized for multi-channel distribution
62
- - Clear separation between automatic and manual processes
63
- - Platform-specific installation instructions
64
- - Troubleshooting guides for each distribution channel
65
-
66
- ### Fixed
67
- - **NPM Publishing**: Fixed registry configuration issues that prevented NPM publication
68
- - **GitHub Pages**: Improved workflow to handle cases where Pages is not configured
69
- - **PlatformIO Build**: Fixed include paths in improved_sensor_node.ino example
70
- - **Package Configuration**: Consistent version management across all package files
71
- - **Release Documentation**: Complete coverage of all distribution channels
72
- - **Version Validation**: Prevents releases with inconsistent version numbers
73
-
74
- ## [1.6.0] - 2025-09-29
75
-
76
- ### Added
77
- - Enhanced Alteriom-specific package documentation and examples
78
- - Updated repository URLs and metadata for Alteriom fork
79
- - Improved release process documentation
80
- - Fixed deprecated GitHub Actions in release workflow
81
- - Added concurrency controls to prevent duplicate workflow runs
82
- - Comprehensive Alteriom package documentation and quick start guide
83
-
84
- ### Changed
85
- - Migrated from deprecated `actions/create-release@v1` to GitHub CLI for releases
86
- - Updated library.properties and library.json to reflect Alteriom ownership
87
- - Enhanced package descriptions to highlight Alteriom extensions
88
-
89
- ### Fixed
90
- - Fixed deprecated GitHub Actions in release workflow
91
- - Corrected undefined variable references in upload workflow steps
92
- - Updated repository URLs from GitLab to GitHub in library files
93
-
94
- ## [1.5.6] - Current Release
95
-
96
- ### Features
97
- - painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices
98
- - Automatic routing and network management
99
- - JSON-based messaging system
100
- - Time synchronization across all nodes
101
- - Support for coordinated behaviors like synchronized displays
102
- - Sensor network patterns for IoT applications
103
-
104
- ### Platforms Supported
105
- - ESP32 (espressif32)
106
- - ESP8266 (espressif8266)
107
-
108
- ### Dependencies
109
- - ArduinoJson ^7.4.2
110
- - TaskScheduler ^3.8.5
111
- - AsyncTCP ^3.4.7 (ESP32)
112
- - ESPAsyncTCP ^2.0.0 (ESP8266)
113
-
114
- ### Alteriom Extensions
115
- - SensorPackage for environmental monitoring
116
- - CommandPackage for device control
117
- - StatusPackage for health monitoring
118
- - Type-safe message handling
119
-
120
- ---
121
-
122
- ## Release Notes
123
-
124
- ### How to Release
125
-
126
- 1. Update version in both `library.properties` and `library.json`
127
- 2. Add changes to this CHANGELOG.md under the new version
128
- 3. Commit with message starting with `release:` (e.g., `release: v1.6.0`)
129
- 4. Push to main branch
130
- 5. GitHub Actions will automatically:
131
- - Create a git tag
132
- - Generate GitHub release
133
- - Package library for distribution
134
- - Update documentation
135
-
136
- ### Version Numbering
137
-
138
- This project follows [Semantic Versioning](https://semver.org/):
139
-
140
- - **MAJOR** version when you make incompatible API changes
141
- - **MINOR** version when you add functionality in a backwards compatible manner
142
- - **PATCH** version when you make backwards compatible bug fixes
143
-
144
- Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+
12
+ - TBD
13
+
14
+ ### Changed
15
+
16
+ - TBD
17
+
18
+ ### Fixed
19
+
20
+ - TBD
21
+
22
+ ## [1.7.3] - 2025-10-16
23
+
24
+ ### Fixed
25
+
26
+ - **Router Memory Safety**: Replaced dangerous escalating memory allocation workaround with safe pre-calculated capacity
27
+ - Removed static `baseCapacity` variable that grew indefinitely (512B 20KB)
28
+ - Implemented single-allocation strategy with pre-calculated capacity based on message size and nesting depth
29
+ - Added 8KB safety cap to protect ESP8266 devices from OOM crashes
30
+ - Support for both ArduinoJson v6 and v7 with version-aware capacity calculation
31
+
32
+ ### Performance
33
+
34
+ - **Small messages (50B)**: +512B predictable overhead (vs. variable 512B-20KB in v1.7.0)
35
+ - **Medium messages (500B)**: -3596B saved by eliminating retry allocations
36
+ - **Large messages (2KB)**: -17KB saved by preventing escalation to 20KB
37
+
38
+ ### Added
39
+
40
+ - **Tests**: New comprehensive memory safety test suite (`test/catch/catch_router_memory.cpp`)
41
+ - Simple message parsing tests
42
+ - Deeply nested JSON structure tests (10+ levels)
43
+ - Oversized message handling tests
44
+ - Predictable capacity allocation verification
45
+ - 14 new assertions, all passing
46
+
47
+ ### Documentation
48
+
49
+ - **CODE_REFACTORING_RECOMMENDATIONS.md**: Comprehensive code analysis document with 8 prioritized refactoring recommendations (P0-P3)
50
+ - **PATCH_v1.7.3.md**: Complete release notes with before/after comparison, performance metrics, and migration guide
51
+
52
+ ### Technical Details
53
+
54
+ - Fixes issue #521: ArduinoJson copy constructor segmentation fault workaround
55
+ - All 710+ test assertions passing across 18 test suites
56
+ - Docker-based testing on Linux x86_64 with CMake + Ninja
57
+
58
+ ## [1.7.2] - 2025-10-15
59
+
60
+ ### Fixed
61
+
62
+ - **NPM Configuration**: Updated `.npmrc` to use public NPM registry instead of GitHub Packages
63
+ - **Dependencies**: Moved `@alteriom/mqtt-schema` back to `devDependencies` now that it's publicly available
64
+ - **Automated Releases**: Fixed npm install failures during automated release workflow
65
+ - **Package Availability**: Package now accessible at <https://www.npmjs.com/package/@alteriom/mqtt-schema>
66
+
67
+ ## [1.7.1] - 2025-10-15
68
+
69
+ ### Fixed
70
+
71
+ - **mqttStatusBridge**: Fixed scheduler access by using external `Scheduler` reference instead of protected `mScheduler` member
72
+ - **mqttStatusBridge**: Corrected Task handling - `publishTask` is an object, not a pointer
73
+ - **mqttStatusBridge**: Fixed node list iteration using proper iterators instead of array-style indexing
74
+ - **alteriomSensorNode**: Updated to ArduinoJson v7 API - replaced deprecated `DynamicJsonDocument` with `JsonDocument`
75
+ - **alteriomSensorNode**: Removed usage of deprecated `jsonObjectSize()` method
76
+ - Resolved compilation errors preventing ESP32/ESP8266 builds
77
+
78
+ ### Technical Details
79
+
80
+ - `mesh.getNodeList()` returns `std::list<uint32_t>` which doesn't support `operator[]` indexing
81
+ - Changed from `mesh.mScheduler.addTask()` to `scheduler.addTask()` with external scheduler
82
+ - Changed from `DynamicJsonDocument doc(size)` to `JsonDocument doc` for ArduinoJson v7 compatibility
83
+
84
+ ## [1.7.0] - 2025-10-15
85
+
86
+ ### 🚀 Major Features
87
+
88
+ #### Phase 2: Broadcast OTA & MQTT Status Bridge
89
+
90
+ **Broadcast OTA Distribution**
91
+
92
+ - **Broadcast Mode OTA**: True mesh-wide firmware distribution with ~98% network traffic reduction for 50+ node meshes
93
+ - 📡 **Parallel Updates**: All nodes receive firmware chunks simultaneously instead of sequential unicast
94
+ - **Performance**: ~50x faster for 50-node mesh, ~100x faster for 100-node mesh
95
+ - 🔧 **Simple API**: Single parameter change: `mesh.offerOTA(..., true)` enables broadcast mode
96
+ - 🔄 **Backward Compatible**: Defaults to unicast mode (Phase 1), no breaking changes
97
+ - 📊 **Scalability**: Efficiently handles 50-100+ node meshes with minimal overhead
98
+
99
+ **MQTT Status Bridge**
100
+
101
+ - 🌉 **Professional Monitoring**: Complete MQTT bridge for publishing mesh status to monitoring tools
102
+ - 📈 **Multiple Topics**: Publishes topology, metrics, alerts, and per-node status
103
+ - 🔗 **Tool Integration**: Ready for Grafana, InfluxDB, Prometheus, Home Assistant, Node-RED
104
+ - ⚙️ **Configurable**: Adjustable publish intervals, enable/disable features per need
105
+ - 🎯 **Production Ready**: Designed for enterprise IoT and commercial deployments
106
+ - 📋 **Schema Compliant**: Uses @alteriom/mqtt-schema v0.5.0 for standardized messaging
107
+
108
+ #### Mesh Topology Visualization
109
+
110
+ - 📊 **Visualization Guide**: Comprehensive 980-line guide for building web dashboards (docs/MESH_TOPOLOGY_GUIDE.md)
111
+ - 🎨 **D3.js Examples**: Complete force-directed graph visualization (200+ lines)
112
+ - 🕸️ **Cytoscape.js Examples**: Network topology view (150+ lines)
113
+ - 🔴 **Node.js Dashboard**: Real-time dashboard with Express + Socket.IO
114
+ - 🐍 **Python Monitor**: Console monitoring with Rich library
115
+ - 🔄 **Node-RED Flows**: Ready-to-import flow JSON for rapid development
116
+ - 🛠️ **Troubleshooting Guide**: Common issues and performance tuning
117
+
118
+ ### 🐛 Critical Bug Fixes
119
+
120
+ #### Compilation & Build Fixes
121
+
122
+ - 🔧 **Fixed Missing `#include <vector>`**: Added missing C++ standard library header to `src/painlessmesh/mesh.hpp`
123
+ - **Impact**: Fixes compilation errors: "'vector' in namespace 'std' does not name a template type"
124
+ - **Affected**: All projects using getConnectionDetails() or latencySamples
125
+ - **File**: src/painlessmesh/mesh.hpp (line 4)
126
+ - **Documentation**: VECTOR_INCLUDE_FIX.md
127
+
128
+ - 📦 **PlatformIO Library Structure**: Fixed SCons build errors for external projects
129
+ - Added explicit `srcDir` and `includeDir` to library.json
130
+ - Removed conflicting `export.include` section
131
+ - Fixed header references in library.properties (painlessMesh.h)
132
+ - **Impact**: Fixes "cannot resolve directory for painlessMeshSTA.cpp" errors
133
+ - **Documentation**: LIBRARY_STRUCTURE_FIX.md, PLATFORMIO_USAGE.md, SCONS_BUILD_FIX.md
134
+
135
+ - 📝 **npm Build Scripts**: Fixed UnboundLocalError during `npm link`
136
+ - Renamed `build` → `dev:build` and `prebuild` → `dev:prebuild`
137
+ - Prevents automatic build execution during package installation
138
+ - **Impact**: Fixes Python errors when using library as npm dependency
139
+
140
+ ### 📚 Documentation
141
+
142
+ #### New Documentation Files (7 files)
143
+
144
+ 1. **docs/MESH_TOPOLOGY_GUIDE.md** (980 lines)
145
+ - Complete visualization guide with 5 working examples
146
+ - D3.js, Cytoscape.js, Python, Node-RED implementations
147
+ - Performance considerations and troubleshooting
148
+
149
+ 2. **docs/PHASE2_GUIDE.md** (~500 lines)
150
+ - Complete API reference for Phase 2 features
151
+ - Usage examples and performance benchmarks
152
+ - Integration guides for monitoring tools
153
+ - Migration guide from Phase 1
154
+
155
+ 3. **docs/improvements/PHASE2_IMPLEMENTATION.md** (~600 lines)
156
+ - Technical architecture and implementation details
157
+ - MQTT topic schema documentation
158
+ - Performance analysis and testing strategy
159
+
160
+ 4. **LIBRARY_STRUCTURE_FIX.md**
161
+ - PlatformIO library structure improvements
162
+ - Validation checklist and testing guide
163
+
164
+ 5. **PLATFORMIO_USAGE.md**
165
+ - Quick start guide for PlatformIO users
166
+ - Common issues and solutions
167
+
168
+ 6. **SCONS_BUILD_FIX.md**
169
+ - Comprehensive troubleshooting for PlatformIO builds
170
+ - Step-by-step diagnostic procedures
171
+
172
+ 7. **VECTOR_INCLUDE_FIX.md**
173
+ - Documentation of missing C++ header fix
174
+ - Testing and verification instructions
175
+
176
+ #### Updated Documentation
177
+
178
+ - **README.md**: Enhanced with Phase 2 features and schema v0.5.0
179
+ - **docs/MQTT_BRIDGE_COMMANDS.md**: Updated version references
180
+ - **examples/**: New Phase 2 examples added
181
+
182
+ ### 🛠️ New Tools & Scripts
183
+
184
+ - **scripts/validate_library_structure.py** (250+ lines)
185
+ - Automated validation of PlatformIO library structure
186
+ - 8 comprehensive checks (all passing)
187
+ - Detects common configuration issues
188
+
189
+ ### 🔄 Enhanced Examples
190
+
191
+ - **examples/alteriom/phase2_features.ino**: Demonstrates broadcast OTA
192
+ - **examples/bridge/mqtt_status_bridge.hpp**: Complete MQTT bridge implementation
193
+ - **examples/bridge/mqtt_status_bridge_example.ino**: Full working bridge example
194
+
195
+ ### ⚙️ Configuration Changes
196
+
197
+ **library.json**
198
+
199
+ - Added `"srcDir": "src"` for explicit source directory
200
+ - Added `"includeDir": "src"` for explicit include directory
201
+ - Removed conflicting `"export": {"include": "src"}` section
202
+
203
+ **library.properties**
204
+
205
+ - Updated `includes=painlessMesh.h` (was AlteriomPainlessMesh.h)
206
+
207
+ **package.json**
208
+
209
+ - Renamed `build` → `dev:build` (prevents auto-execution)
210
+ - Renamed `prebuild` → `dev:prebuild` (prevents auto-execution)
211
+ - Updated to @alteriom/mqtt-schema v0.5.0
212
+
213
+ ### 📊 Performance Improvements
214
+
215
+ **Broadcast OTA Performance**
216
+
217
+ - **Network Traffic**: 90% reduction (10 nodes), 98% reduction (50 nodes), 99% reduction (100 nodes)
218
+ - **Update Speed**: ~N times faster (parallel vs sequential)
219
+ - **Example**: 150-chunk firmware to 50 nodes
220
+ - Unicast: 7,500 transmissions
221
+ - Broadcast: 150 transmissions
222
+ - **Savings: 98% (7,350 transmissions)**
223
+
224
+ **Memory Impact**
225
+
226
+ - Broadcast OTA: +2-5KB per node (chunk tracking)
227
+ - MQTT Bridge: +5-8KB (root node only)
228
+ - Minimal overhead for ESP32, acceptable for ESP8266
229
+
230
+ ### 🔐 Schema Compliance
231
+
232
+ - ✅ Fully compliant with @alteriom/mqtt-schema v0.5.0
233
+ - ✅ Topology messages include all required envelope fields
234
+ - ✅ Node objects include firmware_version, uptime_seconds, connection_count
235
+ - ✅ Schema versioning for forward compatibility
236
+
237
+ ### ⚠️ Breaking Changes
238
+
239
+ **None** - This release is 100% backward compatible with v1.6.x
240
+
241
+ - Broadcast OTA defaults to `false` (unicast mode preserved)
242
+ - MQTT bridge is optional add-on
243
+ - All Phase 1 APIs unchanged
244
+ - Existing sketches work without modification
245
+
246
+ ### 🔄 Migration Guide
247
+
248
+ **No migration required** for existing code. To adopt new features:
249
+
250
+ **Enable Broadcast OTA:**
251
+
252
+ ```cpp
253
+ // Before (v1.6.x)
254
+ mesh.offerOTA(role, hw, md5, parts, false, false, true);
255
+
256
+ // After (v1.7.0) - add broadcast parameter
257
+ mesh.offerOTA(role, hw, md5, parts, false, true, true);
258
+ // ^^^^ broadcast
259
+ ```
260
+
261
+ **Add MQTT Status Bridge:**
262
+
263
+ ```cpp
264
+ #include "examples/bridge/mqtt_status_bridge.hpp"
265
+
266
+ MqttStatusBridge bridge(mesh, mqttClient);
267
+ bridge.setPublishInterval(30000);
268
+ bridge.begin();
269
+ ```
270
+
271
+ ### 🎯 Recommended For
272
+
273
+ - ✅ Production IoT deployments with 10-100+ nodes
274
+ - ✅ Commercial systems requiring professional monitoring
275
+ - ✅ Enterprise environments needing Grafana/Prometheus integration
276
+ - ✅ Projects with limited network bandwidth
277
+ - ✅ Systems requiring rapid firmware distribution
278
+
279
+ ### 📖 Complete Documentation
280
+
281
+ - [Phase 2 User Guide](docs/PHASE2_GUIDE.md) - API reference and usage
282
+ - [Phase 2 Implementation](docs/improvements/PHASE2_IMPLEMENTATION.md) - Technical details
283
+ - [Mesh Topology Guide](docs/MESH_TOPOLOGY_GUIDE.md) - Visualization examples
284
+ - [MQTT Bridge Commands](docs/MQTT_BRIDGE_COMMANDS.md) - Command reference
285
+ - [Library Structure Fix](LIBRARY_STRUCTURE_FIX.md) - Build system improvements
286
+ - [Vector Include Fix](VECTOR_INCLUDE_FIX.md) - Compilation fix details
287
+
288
+ ### 🧪 Testing
289
+
290
+ - ✅ All Phase 1 tests passing (80 assertions in 7 test cases)
291
+ - ✅ Backward compatibility verified
292
+ - ✅ No regressions introduced
293
+ - ✅ Library structure validation: 8/8 checks passing
294
+ - ✅ Compilation successful on ESP32 and ESP8266
295
+
296
+ ### 🙏 Acknowledgments
297
+
298
+ This release includes contributions from Phase 2 implementation, bug fixes discovered by the community, and comprehensive documentation improvements based on user feedback.
299
+
300
+ **Next**: Phase 3 features (progressive rollout OTA, real-time telemetry streams) as outlined in FEATURE_PROPOSALS.md
301
+
302
+ ---
303
+
304
+ ## [1.6.1] - 2025-09-29
305
+
306
+ ### Added
307
+
308
+ - **Arduino Library Manager Support**: Updated library name to "Alteriom PainlessMesh" for better discoverability
309
+ - **NPM Package Publishing**: Complete NPM publication setup with dual registry support
310
+ - Public NPM registry: `@alteriom/painlessmesh`
311
+ - GitHub Packages registry: `@alteriom/painlessmesh` (scoped)
312
+ - Automated version consistency across library.properties, library.json, and package.json
313
+ - **GitHub Wiki Automation**: Automatic wiki synchronization on releases
314
+ - Home page generated from README.md
315
+ - API Reference with auto-generated documentation
316
+ - Examples page with links to repository examples
317
+ - Installation guide for multiple platforms
318
+ - **Enhanced Release Workflow**: Comprehensive publication automation
319
+ - NPM publishing to both public and GitHub Packages registries
320
+ - GitHub Wiki updates with structured documentation
321
+ - Arduino Library Manager submission instructions
322
+ - Release validation with multi-file version consistency
323
+ - **Arduino IDE Support**: Added keywords.txt for syntax highlighting
324
+ - **Distribution Documentation**: Complete guides for all publication channels
325
+ - docs/archive/RELEASE_SUMMARY.md template for release notes (archived)
326
+ - docs/archive/TRIGGER_RELEASE.md for step-by-step release instructions (archived, see RELEASE_GUIDE.md)
327
+ - Enhanced RELEASE_GUIDE.md with comprehensive publication workflow
328
+ - **Version Management**: Enhanced bump-version script
329
+ - Updates all three version files simultaneously (library.properties, library.json, package.json)
330
+ - Comprehensive version consistency validation
331
+ - Clear instructions for NPM and GitHub Packages publication
332
+
333
+ ### Changed
334
+
335
+ - **Library Name**: Updated from "Painless Mesh" to "Alteriom PainlessMesh" for Arduino Library Manager
336
+ - **Release Process**: Streamlined to support multiple package managers
337
+ - Single commit with "release:" prefix triggers full publication pipeline
338
+ - Automated testing, building, and publishing across all channels
339
+ - Wiki documentation automatically synchronized
340
+ - **CI/CD Pipeline**: Enhanced with NPM publication capabilities
341
+ - Dual NPM registry publishing (public + GitHub Packages)
342
+ - Automated wiki updates with generated content
343
+ - Comprehensive pre-release validation
344
+ - **Documentation Structure**: Reorganized for multi-channel distribution
345
+ - Clear separation between automatic and manual processes
346
+ - Platform-specific installation instructions
347
+ - Troubleshooting guides for each distribution channel
348
+
349
+ ### Fixed
350
+
351
+ - **NPM Publishing**: Fixed registry configuration issues that prevented NPM publication
352
+ - **GitHub Pages**: Improved workflow to handle cases where Pages is not configured
353
+ - **PlatformIO Build**: Fixed include paths in improved_sensor_node.ino example
354
+ - **Package Configuration**: Consistent version management across all package files
355
+ - **Release Documentation**: Complete coverage of all distribution channels
356
+ - **Version Validation**: Prevents releases with inconsistent version numbers
357
+
358
+ ## [1.6.0] - 2025-09-29
359
+
360
+ ### Added
361
+
362
+ - Enhanced Alteriom-specific package documentation and examples
363
+ - Updated repository URLs and metadata for Alteriom fork
364
+ - Improved release process documentation
365
+ - Fixed deprecated GitHub Actions in release workflow
366
+ - Added concurrency controls to prevent duplicate workflow runs
367
+ - Comprehensive Alteriom package documentation and quick start guide
368
+
369
+ ### Changed
370
+
371
+ - Migrated from deprecated `actions/create-release@v1` to GitHub CLI for releases
372
+ - Updated library.properties and library.json to reflect Alteriom ownership
373
+ - Enhanced package descriptions to highlight Alteriom extensions
374
+
375
+ ### Fixed
376
+
377
+ - Fixed deprecated GitHub Actions in release workflow
378
+ - Corrected undefined variable references in upload workflow steps
379
+ - Updated repository URLs from GitLab to GitHub in library files
380
+
381
+ ## [1.5.6] - Current Release
382
+
383
+ ### Features
384
+
385
+ - painlessMesh is a user-friendly library for creating mesh networks with ESP8266 and ESP32 devices
386
+ - Automatic routing and network management
387
+ - JSON-based messaging system
388
+ - Time synchronization across all nodes
389
+ - Support for coordinated behaviors like synchronized displays
390
+ - Sensor network patterns for IoT applications
391
+
392
+ ### Platforms Supported
393
+
394
+ - ESP32 (espressif32)
395
+ - ESP8266 (espressif8266)
396
+
397
+ ### Dependencies
398
+
399
+ - ArduinoJson ^7.4.2
400
+ - TaskScheduler ^3.8.5
401
+ - AsyncTCP ^3.4.7 (ESP32)
402
+ - ESPAsyncTCP ^2.0.0 (ESP8266)
403
+
404
+ ### Alteriom Extensions
405
+
406
+ - SensorPackage for environmental monitoring
407
+ - CommandPackage for device control
408
+ - StatusPackage for health monitoring
409
+ - Type-safe message handling
410
+
411
+ ---
412
+
413
+ ## Release Notes
414
+
415
+ ### How to Release
416
+
417
+ 1. Update version in both `library.properties` and `library.json`
418
+ 2. Add changes to this CHANGELOG.md under the new version
419
+ 3. Commit with message starting with `release:` (e.g., `release: v1.6.0`)
420
+ 4. Push to main branch
421
+ 5. GitHub Actions will automatically:
422
+ - Create a git tag
423
+ - Generate GitHub release
424
+ - Package library for distribution
425
+ - Update documentation
426
+
427
+ ### Version Numbering
428
+
429
+ This project follows [Semantic Versioning](https://semver.org/):
430
+
431
+ - **MAJOR** version when you make incompatible API changes
432
+ - **MINOR** version when you add functionality in a backwards compatible manner
433
+ - **PATCH** version when you make backwards compatible bug fixes
434
+
435
+ Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.