@alteriom/painlessmesh 1.8.13 → 1.8.14

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
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.8.14] - 2025-11-21
11
+
12
+ ### Fixed
13
+
14
+ - **Bridge Internet Detection** - Fixed `hasInternetConnection()` returning false on bridge nodes immediately after initialization
15
+ - **Root Cause**: Base `hasInternetConnection()` only checked `knownBridges` list; bridge self-registration happens asynchronously
16
+ - Added override in Arduino `wifi::Mesh` to check local WiFi status before checking remote bridges
17
+ - Bridge nodes now immediately report correct internet status via `WiFi.status()` check
18
+ - Fixes issue where internet-dependent features (like WhatsApp messaging) failed on bridge nodes
19
+ - **Impact**: Bridge nodes correctly report internet connectivity immediately after initialization
20
+ - **Affected Components**: Bridge_fallover example, any code using `mesh.hasInternetConnection()` on bridge nodes
21
+ - Core fix in `src/arduino/wifi.hpp` - added WiFi status check override
22
+ - Resolves GitHub issue #159
23
+ - Merged via PR #160
24
+
10
25
  ## [1.8.12] - 2025-11-19
11
26
 
12
27
  ### Changed
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.8.13",
9
+ "version": "1.8.14",
10
10
  "frameworks": [
11
11
  "arduino"
12
12
  ],
@@ -1,5 +1,5 @@
1
1
  name=Alteriom PainlessMesh
2
- version=1.8.13
2
+ version=1.8.14
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.8.13",
3
+ "version": "1.8.14",
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",
@@ -618,6 +618,28 @@ class Mesh : public painlessmesh::Mesh<Connection> {
618
618
  return activeBridges;
619
619
  }
620
620
 
621
+ /**
622
+ * Check if any bridge in the mesh has Internet connectivity
623
+ *
624
+ * Override of base class method to also check if THIS node is a bridge
625
+ * with Internet connectivity, not just other bridges in the mesh.
626
+ *
627
+ * @return true if at least one bridge (including this node) has Internet
628
+ */
629
+ bool hasInternetConnection() {
630
+ // First check if THIS node is a bridge with Internet
631
+ if (this->isBridge()) {
632
+ // Check Internet connectivity: WiFi connected AND valid IP address
633
+ bool hasInternet = (WiFi.status() == WL_CONNECTED) && (WiFi.localIP() != IPAddress(0, 0, 0, 0));
634
+ if (hasInternet) {
635
+ return true;
636
+ }
637
+ }
638
+
639
+ // Then check other bridges in the mesh (call parent implementation)
640
+ return painlessmesh::Mesh<Connection>::hasInternetConnection();
641
+ }
642
+
621
643
  /**
622
644
  * Get recommended bridge for message transmission
623
645
  *