Skip to content

Commit 534a870

Browse files
committed
stabilize esp8266 mqtt path
1 parent 2aa007f commit 534a870

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Added optional offline queue gating in `ZeroHttpPump` and `ZeroMqttPump` so constrained boards can refuse backlog when link or transport is down.
1313
- Reduced scheduler contention in the ESP8266 preset by staggering network task start offsets and lowering idle network task cadence.
1414
- Updated the ESP8266 preset to recommend `kIdleYield` instead of `kIdleSleep`, which materially reduces live timing jitter in the official Wemos validation node.
15+
- Tuned the ESP8266 preset toward MQTT-first delivery with lighter MQTT dispatch pressure, producing a repeatable Wemos run where MQTT delivery stays live while timing remains at or better than baseline.
1516
- Added generic compare workloads for `EnvMonitor`, `TelemetryGateway`, and `IndustrialLoop`.
1617
- Added repeatable ESP32 compare runners plus a cross-target workload compile matrix.
1718
- Improved telemetry gateway tuning so module throughput rises without queue buildup.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Current target maturity:
117117
Recommended board-specific path:
118118

119119
- **ESP32:** use the default network module configs first, then validate against your real endpoint.
120-
- **ESP8266 / Wemos:** start with `ZeroNetProfileEsp8266`. It is a BETA, MQTT-first constrained preset that disables periodic HTTP dispatch by default, prevents offline queue buildup, staggers slower network task cadence, and recommends a lighter idle strategy so constrained boards do not need heavy manual tuning just to stay responsive.
120+
- **ESP8266 / Wemos:** start with `ZeroNetProfileEsp8266`. It is a constrained MQTT-first preset that disables periodic HTTP dispatch by default, prevents offline queue buildup, staggers lighter network task cadence, and recommends a lighter idle strategy. In current validation it is the preferred path for Wemos MQTT delivery, while HTTP remains degraded/off by default.
121121

122122
Current best module tradeoff reference (ESP32, `LEAN_NET`, manual pattern vs module pattern):
123123

docs/wiki/Beta-Modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ They are already useful and validated on desktop plus ESP32 smoke tests, but the
1818

1919
Recommended default:
2020

21-
- For constrained ESP8266 boards, start with `ZeroNetProfileEsp8266`. It is a BETA, MQTT-first constrained preset that keeps HTTP degraded by default, rejects offline queueing, and uses a lighter recommended idle strategy plus staggered network task starts so the board stays more predictable without hand-tuning every interval.
21+
- For constrained ESP8266 boards, start with `ZeroNetProfileEsp8266`. It is the recommended MQTT-first constrained preset: HTTP stays degraded/off by default, offline queueing is rejected, and the preset uses a lighter recommended idle strategy plus staggered network task starts so the board stays more predictable without hand-tuning every interval.
2222

2323
## What BETA Means Here
2424

src/modules/net/ZeroNetProfileEsp8266.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct ZeroNetProfileEsp8266 {
1616
static const unsigned long kSampleTaskIntervalMs = 100UL;
1717
static const unsigned long kWiFiTaskIntervalMs = 250UL;
1818
static const unsigned long kHttpTaskIntervalMs = 250UL;
19-
static const unsigned long kMqttTaskIntervalMs = 500UL;
19+
static const unsigned long kMqttTaskIntervalMs = 250UL;
2020
static const unsigned long kDispatchTaskIntervalMs = 250UL;
2121
static const unsigned long kReportTaskIntervalMs = 250UL;
2222

@@ -54,11 +54,11 @@ struct ZeroNetProfileEsp8266 {
5454

5555
static ZeroMqttPump::Config mqttConfig() {
5656
ZeroMqttPump::Config config;
57-
config.pollIntervalMs = 150UL;
57+
config.pollIntervalMs = 100UL;
5858
config.retryBaseMs = 600UL;
5959
config.retryMaxMs = 3000UL;
6060
config.retryJitterMs = 180UL;
61-
config.idleLoopIntervalMs = 300UL;
61+
config.idleLoopIntervalMs = 150UL;
6262
config.maxRetries = 2;
6363
config.queueWhenTransportDown = false;
6464
return config;

0 commit comments

Comments
 (0)