@alteriom/painlessmesh 1.9.18 → 1.9.19

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 CHANGED
@@ -13,6 +13,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Fixed
15
15
 
16
+ ## [1.9.19] - 2025-12-21
17
+
18
+ ### Fixed
19
+
20
+ - **Gateway Connectivity Error Non-Retryable Fix** - Infrastructure errors no longer waste time with futile retries
21
+ - Gateway connectivity errors ("Router has no internet", "Gateway WiFi not connected") are now non-retryable
22
+ - Distinguishes between infrastructure issues (need user fix) and transient errors (can retry)
23
+ - Provides immediate failure feedback instead of retrying for ~14+ seconds
24
+ - Saves battery and network resources by avoiding retries that can't succeed
25
+ - Clear error messages help users identify and fix infrastructure problems quickly
26
+ - Transient errors (HTTP 203, 5xx, 429, timeouts) still retry with exponential backoff
27
+ - New comprehensive test suite with 25 assertions covering retry logic
28
+ - Documentation: ISSUE_GATEWAY_CONNECTIVITY_NON_RETRYABLE_FIX.md
29
+ - Fully backward compatible: No API changes required
30
+
16
31
  ## [1.9.18] - 2025-12-21
17
32
 
18
33
  ### Added
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <div align="center">
6
6
 
7
- **Version 1.9.18** - Internet connectivity check enhancement with DNS resolution verification
7
+ **Version 1.9.19** - Gateway connectivity error non-retryable fix for infrastructure issues
8
8
 
9
9
  [![CI/CD Pipeline](https://github.com/Alteriom/painlessMesh/actions/workflows/ci.yml/badge.svg)](https://github.com/Alteriom/painlessMesh/actions/workflows/ci.yml)
10
10
  [![Documentation](https://github.com/Alteriom/painlessMesh/actions/workflows/docs.yml/badge.svg)](https://github.com/Alteriom/painlessMesh/actions/workflows/docs.yml)
package/library.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "type": "git",
7
7
  "url": "https://github.com/Alteriom/painlessMesh"
8
8
  },
9
- "version": "1.9.18",
9
+ "version": "1.9.19",
10
10
  "frameworks": [
11
11
  "arduino"
12
12
  ],
@@ -1,5 +1,5 @@
1
1
  name=Alteriom PainlessMesh
2
- version=1.9.18
2
+ version=1.9.19
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.9.18",
3
+ "version": "1.9.19",
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",
@@ -29,10 +29,10 @@
29
29
  /**
30
30
  * @brief AlteriomPainlessMesh library version information
31
31
  */
32
- #define ALTERIOM_PAINLESS_MESH_VERSION "1.9.18"
32
+ #define ALTERIOM_PAINLESS_MESH_VERSION "1.9.19"
33
33
  #define ALTERIOM_PAINLESS_MESH_VERSION_MAJOR 1
34
34
  #define ALTERIOM_PAINLESS_MESH_VERSION_MINOR 9
35
- #define ALTERIOM_PAINLESS_MESH_VERSION_PATCH 18
35
+ #define ALTERIOM_PAINLESS_MESH_VERSION_PATCH 19
36
36
 
37
37
  /**
38
38
  * @brief Library description and usage information
@@ -5,7 +5,7 @@
5
5
  * @file painlessMesh.h
6
6
  * @brief Main header file for Alteriom painlessMesh library
7
7
  *
8
- * @version 1.9.18
8
+ * @version 1.9.19
9
9
  * @date 2025-12-21
10
10
  *
11
11
  * painlessMesh is a user-friendly library for creating mesh networks with
@@ -1532,10 +1532,38 @@ class Mesh : public ntp::MeshTime, public plugin::PackageHandler<T> {
1532
1532
  isRetryable = true;
1533
1533
  Log(COMMUNICATION, "handleGatewayAck(): HTTP 429 rate limit, marking as retryable\n");
1534
1534
  }
1535
- // Network errors (httpStatus == 0) are retryable
1535
+ // Network errors (httpStatus == 0) EXCEPT gateway connectivity errors
1536
+ // Gateway connectivity errors are infrastructure issues (not transient)
1536
1537
  else if (ack.httpStatus == 0) {
1537
- isRetryable = true;
1538
- Log(COMMUNICATION, "handleGatewayAck(): Network error, marking as retryable\n");
1538
+ // Check if this is a gateway-level connectivity error (non-retryable)
1539
+ bool isGatewayConnectivityError = false;
1540
+
1541
+ // These errors indicate infrastructure issues that won't be fixed by retrying:
1542
+ // - "Router has no internet access" - WAN connection down
1543
+ // - "Gateway WiFi not connected" - ESP not associated with WiFi
1544
+ // Use find() for std::string (test env) or indexOf() for Arduino String
1545
+ bool routerError = false, wifiError = false;
1546
+ #if defined(PAINLESSMESH_BOOST)
1547
+ // Test environment: TSTRING is std::string, use find()
1548
+ routerError = (ack.error.find("Router has no internet") != std::string::npos);
1549
+ wifiError = (ack.error.find("Gateway WiFi not connected") != std::string::npos);
1550
+ #else
1551
+ // Arduino environment: TSTRING is String, use indexOf()
1552
+ routerError = (ack.error.indexOf("Router has no internet") >= 0);
1553
+ wifiError = (ack.error.indexOf("Gateway WiFi not connected") >= 0);
1554
+ #endif
1555
+
1556
+ if (routerError || wifiError) {
1557
+ isGatewayConnectivityError = true;
1558
+ Log(COMMUNICATION, "handleGatewayAck(): Gateway connectivity error detected (non-retryable): %s\n",
1559
+ ack.error.c_str());
1560
+ }
1561
+
1562
+ // Only mark as retryable if it's NOT a gateway connectivity error
1563
+ if (!isGatewayConnectivityError) {
1564
+ isRetryable = true;
1565
+ Log(COMMUNICATION, "handleGatewayAck(): Network error, marking as retryable\n");
1566
+ }
1539
1567
  }
1540
1568
  // HTTP 4xx client errors (except 429) are NOT retryable
1541
1569
  // HTTP 3xx redirects are NOT retryable (should be followed by HTTPClient)