@alteriom/painlessmesh 1.7.7 → 1.7.9

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 (40) hide show
  1. package/CHANGELOG.md +115 -1
  2. package/README.md +21 -11
  3. package/RELEASE_GUIDE.md +57 -8
  4. package/docs/API_DESIGN_GUIDELINES.md +414 -0
  5. package/docs/BOOLEAN_NAMING_CONVENTION.md +235 -0
  6. package/docs/README.md +2 -1
  7. package/docs/RELEASE_AGENT_SUMMARY.md +386 -0
  8. package/docs/alteriom/overview.md +23 -0
  9. package/docs/releases/RELEASE_SUMMARY_v1.7.7.md +1 -1
  10. package/docs/troubleshooting/ESP32_C6_COMPATIBILITY.md +157 -0
  11. package/docs/troubleshooting/common-issues.md +28 -0
  12. package/docs/v1.7.7_MQTT_IMPROVEMENTS.md +21 -3
  13. package/examples/alteriom/README.md +13 -1
  14. package/examples/alteriom/alteriom_sensor_package.hpp +377 -3
  15. package/examples/alteriom/platformio.ini +1 -1
  16. package/examples/alteriomImproved/platformio.ini +1 -1
  17. package/examples/alteriomMetricsHealth/metrics_health_node.ino +18 -7
  18. package/examples/alteriomMetricsHealth/platformio.ini +1 -1
  19. package/examples/alteriomPhase1/platformio.ini +1 -1
  20. package/examples/alteriomPhase2/platformio.ini +1 -1
  21. package/examples/alteriomSensorNode/platformio.ini +1 -1
  22. package/examples/basic/platformio.ini +1 -1
  23. package/examples/bridge/alteriom_sensor_package.hpp +1170 -0
  24. package/examples/bridge/bridge.ino +2 -2
  25. package/examples/bridge/enhanced_mqtt_bridge.hpp +1 -1
  26. package/examples/bridge/mqtt_command_bridge.hpp +2 -2
  27. package/examples/bridge/platformio.ini +2 -1
  28. package/examples/echoNode/platformio.ini +1 -1
  29. package/examples/logClient/platformio.ini +1 -1
  30. package/examples/logServer/platformio.ini +1 -1
  31. package/examples/mqttStatusBridge/platformio.ini +1 -1
  32. package/examples/namedMesh/platformio.ini +1 -1
  33. package/examples/otaReceiver/platformio.ini +1 -1
  34. package/examples/startHere/platformio.ini +1 -1
  35. package/examples/webServer/platformio.ini +1 -1
  36. package/library.json +93 -53
  37. package/library.properties +1 -1
  38. package/package.json +2 -2
  39. package/src/arduino/wifi.hpp +9 -0
  40. package/src/painlessMeshSTA.cpp +5 -0
@@ -26,8 +26,8 @@ void setup() {
26
26
  ERROR | STARTUP |
27
27
  CONNECTION); // set before init() so that you can see startup messages
28
28
 
29
- // Channel set to 6. Make sure to use the same channel for your mesh and for
30
- // you other network (STATION_SSID)
29
+ // Initialize mesh network in AP+STA mode on channel 1
30
+ // stationManual() will automatically handle channel switching if needed
31
31
  mesh.init(MESH_PREFIX, MESH_PASSWORD, MESH_PORT, WIFI_AP_STA, 1);
32
32
  // Setup over the air update support
33
33
  mesh.initOTAReceive("bridge");
@@ -29,7 +29,7 @@
29
29
  #include <Arduino.h>
30
30
  #include <painlessMesh.h>
31
31
  #include <PubSubClient.h>
32
- #include "alteriom/alteriom_sensor_package.hpp"
32
+ #include "alteriom_sensor_package.hpp"
33
33
 
34
34
  using namespace alteriom;
35
35
 
@@ -3,8 +3,8 @@
3
3
 
4
4
  #include "painlessMesh.h"
5
5
  #include <PubSubClient.h>
6
- #include "examples/alteriom/alteriom_sensor_package.hpp"
7
- #include "examples/bridge/mesh_topology_reporter.hpp"
6
+ #include "alteriom_sensor_package.hpp"
7
+ #include "mesh_topology_reporter.hpp"
8
8
 
9
9
  using namespace alteriom;
10
10
 
@@ -5,6 +5,7 @@ src_dir = .
5
5
  lib_deps =
6
6
  bblanchon/ArduinoJson
7
7
  arkhipenko/TaskScheduler
8
+ knolleary/PubSubClient
8
9
 
9
10
  lib_ldf_mode = deep+
10
11
  [env:esp8266]
@@ -14,7 +15,7 @@ framework = arduino
14
15
  lib_extra_dirs = ../../
15
16
  lib_deps =
16
17
  ${env.lib_deps} ; Inherit common dependencies
17
- esp32async/ESPAsyncTCP ; Only for ESP8266
18
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
18
19
 
19
20
  [env:esp32]
20
21
  platform = espressif32
@@ -14,7 +14,7 @@ framework = arduino
14
14
  lib_extra_dirs = ../../
15
15
  lib_deps =
16
16
  ${env.lib_deps} ; Inherit common dependencies
17
- esp32async/ESPAsyncTCP ; Only for ESP8266
17
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
18
18
 
19
19
  [env:esp32]
20
20
  platform = espressif32
@@ -14,7 +14,7 @@ framework = arduino
14
14
  lib_extra_dirs = ../../
15
15
  lib_deps =
16
16
  ${env.lib_deps} ; Inherit common dependencies
17
- esp32async/ESPAsyncTCP ; Only for ESP8266
17
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
18
18
 
19
19
  [env:esp32]
20
20
  platform = espressif32
@@ -14,7 +14,7 @@ framework = arduino
14
14
  lib_extra_dirs = ../../
15
15
  lib_deps =
16
16
  ${env.lib_deps} ; Inherit common dependencies
17
- esp32async/ESPAsyncTCP ; Only for ESP8266
17
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
18
18
 
19
19
  [env:esp32]
20
20
  platform = espressif32
@@ -15,7 +15,7 @@ framework = arduino
15
15
  lib_extra_dirs = ../../ ; Load the local copy of painlessmesh
16
16
  lib_deps =
17
17
  ${env.lib_deps} ; Inherit common dependencies
18
- esp32async/ESPAsyncTCP ; Only for ESP8266
18
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
19
19
 
20
20
  [env:esp32]
21
21
  platform = espressif32
@@ -14,7 +14,7 @@ framework = arduino
14
14
  lib_extra_dirs = ../../
15
15
  lib_deps =
16
16
  ${env.lib_deps} ; Inherit common dependencies
17
- esp32async/ESPAsyncTCP ; Only for ESP8266
17
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
18
18
 
19
19
  [env:esp32]
20
20
  platform = espressif32
@@ -14,7 +14,7 @@ framework = arduino
14
14
  lib_extra_dirs = ../../
15
15
  lib_deps =
16
16
  ${env.lib_deps} ; Inherit common dependencies
17
- esp32async/ESPAsyncTCP ; Only for ESP8266
17
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
18
18
 
19
19
  [env:esp32]
20
20
  platform = espressif32
@@ -14,7 +14,7 @@ framework = arduino
14
14
  lib_extra_dirs = ../../ ; Load the local copy of painlessmesh. For your own example add painlessmesh to the lib_deps
15
15
  lib_deps =
16
16
  ${env.lib_deps} ; Inherit common dependencies
17
- esp32async/ESPAsyncTCP ; Only for ESP8266
17
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
18
18
 
19
19
  [env:esp32]
20
20
  platform = espressif32
@@ -15,7 +15,7 @@ framework = arduino
15
15
  lib_extra_dirs = ../../
16
16
  lib_deps =
17
17
  ${env.lib_deps} ; Inherit common dependencies
18
- esp32async/ESPAsyncTCP ; Only for ESP8266
18
+ esp32async/ESPAsyncTCP@^2.0.0 ; Only for ESP8266
19
19
 
20
20
  [env:esp32]
21
21
  platform = espressif32
package/library.json CHANGED
@@ -1,55 +1,95 @@
1
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.7",
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
- ]
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.9",
10
+ "frameworks": [
11
+ "arduino"
12
+ ],
13
+ "platforms": [
14
+ "espressif8266",
15
+ "espressif32"
16
+ ],
17
+ "srcDir": "src",
18
+ "includeDir": "src",
19
+ "dependencies": [
20
+ {
21
+ "owner": "esp32async",
22
+ "name": "AsyncTCP",
23
+ "version": "^3.4.7",
24
+ "platforms": [
25
+ "espressif32"
26
+ ]
27
+ },
28
+ {
29
+ "owner": "esp32async",
30
+ "name": "ESPAsyncTCP",
31
+ "version": "^2.0.0",
32
+ "platforms": [
33
+ "espressif8266"
34
+ ]
35
+ },
36
+ {
37
+ "owner": "bblanchon",
38
+ "name": "ArduinoJson",
39
+ "version": "^7.4.2"
40
+ },
41
+ {
42
+ "owner": "arkhipenko",
43
+ "name": "TaskScheduler",
44
+ "version": "^4.0.0"
45
+ }
46
+ ],
47
+ "authors": [
48
+ {
49
+ "name": "Scotty Franzyshen"
50
+ },
51
+ {
52
+ "name": "Coopdis",
53
+ "url": "https://github.com/Coopdis"
54
+ },
55
+ {
56
+ "name": "Edwin van Leeuwen"
57
+ },
58
+ {
59
+ "name": "Germán Martín"
60
+ },
61
+ {
62
+ "name": "Maximilian Schwarz"
63
+ },
64
+ {
65
+ "name": "Doanh Doanh"
66
+ },
67
+ {
68
+ "name": "Alteriom",
69
+ "url": "https://github.com/Alteriom",
70
+ "maintainer": true
71
+ }
72
+ ],
73
+ "license": "LGPL-3.0",
74
+ "homepage": "https://github.com/Alteriom/painlessMesh",
75
+ "headers": [
76
+ "painlessMesh.h",
77
+ "AlteriomPainlessMesh.h"
78
+ ],
79
+ "examples": [
80
+ "examples/alteriom/alteriom.ino",
81
+ "examples/alteriom/alteriom_sensor_node.ino",
82
+ "examples/alteriom/improved_sensor_node.ino",
83
+ "examples/basic/basic.ino",
84
+ "examples/bridge/bridge.ino",
85
+ "examples/echoNode/echoNode.ino",
86
+ "examples/logClient/logClient.ino",
87
+ "examples/logServer/logServer.ino",
88
+ "examples/mqttBridge/mqttBridge.ino",
89
+ "examples/namedMesh/namedMesh.ino",
90
+ "examples/otaReceiver/otaReceiver.ino",
91
+ "examples/otaSender/otaSender.ino",
92
+ "examples/startHere/startHere.ino",
93
+ "examples/webServer/webServer.ino"
94
+ ]
55
95
  }
@@ -1,5 +1,5 @@
1
1
  name=AlteriomPainlessMesh
2
- version=1.7.7
2
+ version=1.7.9
3
3
  author=Coopdis,Scotty Franzyshen,Edwin van Leeuwen,Germán Martín,Maximilian Schwarz,Doanh Doanh,Alteriom
4
4
  maintainer=Alteriom
5
5
  sentence=A painless way to setup a mesh with ESP8266 and ESP32 devices with Alteriom extensions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alteriom/painlessmesh",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
4
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
5
  "keywords": [
6
6
  "arduino",
@@ -39,7 +39,7 @@
39
39
  "url": "https://github.com/Alteriom/painlessMesh/issues"
40
40
  },
41
41
  "devDependencies": {
42
- "@alteriom/mqtt-schema": "^0.7.2",
42
+ "@alteriom/mqtt-schema": "^0.7.3",
43
43
  "@eslint/js": "^9.0.0",
44
44
  "ajv": "^8.17.1",
45
45
  "ajv-formats": "^3.0.1",
@@ -63,6 +63,7 @@ class Mesh : public painlessmesh::Mesh<Connection> {
63
63
  _meshSSID = ssid;
64
64
  _meshPassword = password;
65
65
  _meshChannel = channel;
66
+ Log(STARTUP, "init(): Mesh channel set to %d\n", _meshChannel);
66
67
  _meshHidden = hidden;
67
68
  _meshMaxConn = maxconn;
68
69
  _meshPort = port;
@@ -128,13 +129,21 @@ class Mesh : public painlessmesh::Mesh<Connection> {
128
129
  */
129
130
  void stationManual(TSTRING ssid, TSTRING password, uint16_t port = 0,
130
131
  IPAddress remote_ip = IPAddress(0, 0, 0, 0)) {
132
+ using namespace logger;
131
133
  // Set station config
132
134
  stationScan.manualIP = remote_ip;
133
135
 
136
+ Log(STARTUP, "stationManual(): Connecting to %s\n", ssid.c_str());
137
+
134
138
  // Start scan
135
139
  stationScan.init(this, ssid, password, port, _meshChannel,
136
140
  static_cast<bool>(_meshHidden));
137
141
  stationScan.manual = true;
142
+
143
+ // Directly initiate connection - ESP will auto-detect router's channel
144
+ WiFi.begin(ssid.c_str(), password.c_str());
145
+
146
+ Log(STARTUP, "stationManual(): Connection initiated\n");
138
147
  }
139
148
 
140
149
  void initStation() {
@@ -145,6 +145,11 @@ void ICACHE_FLASH_ATTR StationScan::requestIP(WiFi_AP_Record_t &ap) {
145
145
  using namespace painlessmesh::logger;
146
146
  Log(CONNECTION, "connectToAP(): Best AP is %u<---\n",
147
147
  painlessmesh::tcp::encodeNodeId(ap.bssid));
148
+ Log(CONNECTION, "requestIP(): Connecting to %s (channel: %d, BSSID: %02X:%02X:%02X:%02X:%02X:%02X)\n",
149
+ ap.ssid.c_str(),
150
+ mesh->_meshChannel,
151
+ ap.bssid[0], ap.bssid[1], ap.bssid[2],
152
+ ap.bssid[3], ap.bssid[4], ap.bssid[5]);
148
153
  WiFi.begin(ap.ssid.c_str(), password.c_str(), mesh->_meshChannel, ap.bssid);
149
154
  return;
150
155
  }