@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.
- package/CHANGELOG.md +115 -1
- package/README.md +21 -11
- package/RELEASE_GUIDE.md +57 -8
- package/docs/API_DESIGN_GUIDELINES.md +414 -0
- package/docs/BOOLEAN_NAMING_CONVENTION.md +235 -0
- package/docs/README.md +2 -1
- package/docs/RELEASE_AGENT_SUMMARY.md +386 -0
- package/docs/alteriom/overview.md +23 -0
- package/docs/releases/RELEASE_SUMMARY_v1.7.7.md +1 -1
- package/docs/troubleshooting/ESP32_C6_COMPATIBILITY.md +157 -0
- package/docs/troubleshooting/common-issues.md +28 -0
- package/docs/v1.7.7_MQTT_IMPROVEMENTS.md +21 -3
- package/examples/alteriom/README.md +13 -1
- package/examples/alteriom/alteriom_sensor_package.hpp +377 -3
- package/examples/alteriom/platformio.ini +1 -1
- package/examples/alteriomImproved/platformio.ini +1 -1
- package/examples/alteriomMetricsHealth/metrics_health_node.ino +18 -7
- package/examples/alteriomMetricsHealth/platformio.ini +1 -1
- package/examples/alteriomPhase1/platformio.ini +1 -1
- package/examples/alteriomPhase2/platformio.ini +1 -1
- package/examples/alteriomSensorNode/platformio.ini +1 -1
- package/examples/basic/platformio.ini +1 -1
- package/examples/bridge/alteriom_sensor_package.hpp +1170 -0
- package/examples/bridge/bridge.ino +2 -2
- package/examples/bridge/enhanced_mqtt_bridge.hpp +1 -1
- package/examples/bridge/mqtt_command_bridge.hpp +2 -2
- package/examples/bridge/platformio.ini +2 -1
- package/examples/echoNode/platformio.ini +1 -1
- package/examples/logClient/platformio.ini +1 -1
- package/examples/logServer/platformio.ini +1 -1
- package/examples/mqttStatusBridge/platformio.ini +1 -1
- package/examples/namedMesh/platformio.ini +1 -1
- package/examples/otaReceiver/platformio.ini +1 -1
- package/examples/startHere/platformio.ini +1 -1
- package/examples/webServer/platformio.ini +1 -1
- package/library.json +93 -53
- package/library.properties +1 -1
- package/package.json +2 -2
- package/src/arduino/wifi.hpp +9 -0
- 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
|
-
//
|
|
30
|
-
//
|
|
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");
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
#include "painlessMesh.h"
|
|
5
5
|
#include <PubSubClient.h>
|
|
6
|
-
#include "
|
|
7
|
-
#include "
|
|
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
|
|
@@ -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 = ../../ ; 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
|
package/library.json
CHANGED
|
@@ -1,55 +1,95 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
}
|
package/library.properties
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name=AlteriomPainlessMesh
|
|
2
|
-
version=1.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.
|
|
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.
|
|
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",
|
package/src/arduino/wifi.hpp
CHANGED
|
@@ -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() {
|
package/src/painlessMeshSTA.cpp
CHANGED
|
@@ -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
|
}
|