The status message omitted fields other MeshCore observers publish, so analyzer
UIs showed the model as "MeshCore Repeater" and left Relay, Uptime and Noise
Floor blank. Report the board name as `model`, this node's relay state as the
top-level `repeat` flag, and battery/uptime/noise floor under `stats`, sourced
live from the repeater through a registered callback.
arduino-esp32 2.x's arduino_esp_crt_bundle_attach() verifies nothing until a
bundle has been loaded (setCACertBundle), so every mqtts://, wss:// handshake
failed with -0x7680 (MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED) and no broker ever
connected on ESP-IDF 4. Point the ESP-MQTT config at ESP-IDF's
esp_crt_bundle_attach() on IDF < 5, which falls back to the certificate bundle
embedded in the binary.
`pio project config` prints one line per option, so an env that extends
another emits `extends = env:<base>` as well as its section header. Matching
`env:` anywhere on the line therefore returned that option line as an
environment.
Every observer target in observer_targets.ini extends a repeater env, so
`build.sh list` reported 190 repeater targets instead of 173 — 17 of them
named "extends = <base>_repeater". `build-repeater-firmwares` and
the local release builder then fed those phantoms to `pio run -e` (the
release builder built them one per bogus "platform", serially, and failed).
Only the column-0 section headers are environments: anchor the match.
The esp-tls/MQTT_CLIENT transport errors that a failing or flapping broker
connect produces were printed on the same serial console as the CLI, burying
replies (and confusing any automation reading them). Silence the MQTT client
and PsychicMqttClient log tags; connection state is already visible via the
mqtt* CLI and status feed.
MQTTObserver.cpp is its own translation unit and never saw FIRMWARE_VERSION
(defined in simple_repeater/MyMesh.h), so status/client_version and the JWT
client claim fell back to "unknown" on any build that does not inject the
macro. Pass the version from MyMesh::begin, which already has it.
ParsesAReasonableDate compared its own meshclock::buildEpoch() expansion
against MeshClockSync::buildFloor(). Both parse __TIME__, so when the test
TU and MeshClockSync.cpp compile in different seconds the two values
differ; at -O1 each call site folds per-TU while the -O0 native envs
resolved both through one out-of-line definition. Only the sanitizer suite
could expose it. Check the range via buildFloor(), buildEpoch()'s sole
production caller, and drop the near-vacuous cross-TU equality.
Add MQTT_OBSERVER.md to the guides, examples/mqtt_observer/ + observer_targets.ini
to the code map and fork-owned set, the native_mqtt_observer(-san) envs and the
observer flash target to the build notes, the observer release inclusion, the
observer capture hooks in MyMesh, and the observer-compat invariants.
Restructure MQTT_OBSERVER.md in the FILTER/FLEET user-guide mold: what it does,
firmware targets, quick start, setup (Wi-Fi/time, identity, addresses/TLS,
auth, capture switches, topics), a full command reference, payload schemas,
delivery behaviour, recipes, a status/troubleshooting table, the security
model, and limits. Add an MQTT observer section to README.md pointing at it.
Document the TX uplink and retained offline last will, the reference JWT claim
set (publicKey/aud/iat/exp/client + owner/email, hex signature) that matches
the downstream observers, duplicate publishes from the pre-dedup receive hook,
and the MQO1 config magic that isolates this fork's /mqtt_prefs from the others.
Ship the optional MQTT observer firmware in the same release as the plain
repeaters instead of a separate channel: local-release-build.sh now includes
observer envs in its default target list and drops the --observers flag (use
--filter _repeater_observer to build only observers). Updates the release-target
test and the observer manual.
Register a retained QoS 1 status:"offline" last will on each broker's status
topic so a feed flips the node offline as soon as the broker notices an
unexpected session drop. The will body and topic live in BrokerRuntime because
the library keeps the pointers; the topic/status are reused via a shared
buildStatusMessage() so online and offline share one schema.
Add a shared TX uplink gate (mqtt.tx off|on|advert, default advert) and a
logTx capture hook so a node appears on map/analyzer feeds from its own
adverts without uploading every repeated frame. TX events carry no
SNR/RSSI/score and no raw frame; the packet schema gains direction "tx".
Adds tx_enabled to the observer config (record version 5, payload 1509 B,
no migration - never deployed).
A second TLS client started on a fragmented internal heap aborts a non-PSRAM
ESP32. Gate connect() on free/largest internal-heap bytes (secure slots need
much more than plaintext), deferring and retrying every 30 s instead of
crashing. The decision is a pure policy function so the host suite covers it;
the deferral is never a terminal state, so a broker missed during a heap
squeeze is still retried after a long outage.
Resolve the three overlapping-file conflicts (MyMesh.cpp/.h observer hooks
vs the fleet ack hook and MeshClockSync member; platformio.ini observer vs
mesh-clock native envs) as unions. No observer behavior changes here.
A refused retry previously counted as sent (rtx) and dropped the reply,
silently losing it. Retain the slot and retry after FLEET_ACK_RETRY_BACKOFF_MS,
incrementing rtx only once the resend is queued. sendAlert() now reports the
sender's result instead of always claiming success. Adds regression tests and
documents the backoff.
A fleet !ack reply is re-sent once, byte-identically, when no repeater is
heard repeating it within FLEET_ACK_REPEAT_WINDOW_MS (5 s). The frozen
group-text timestamp makes the retry the same on-air packet, so every node
that already relayed attempt 1 suppresses the copy at the mesh layer: a
retry never duplicates and a healthy fleet still sees one reply per node.
The receive-side detector hooks MyMesh::logRx() (every RX packet, before the
core dedup gate) and matches the sent packet's hash, which covers payload
type + payload (path excluded), requiring at least one hop so a zero-hop
bridge/mirror echo does not confirm. FleetManager now freezes the timestamp
and reports the hash through an extended send callback; FLEET_ACK_RETRY=0
restores the single fire-and-forget send. The status line gains await/rtx;
fleet off / chan clear now cancel queued and awaiting acks too.
Add a BATTERY.md Alerts section (when alerts fire, the enable condition, the
on-air format, relay-while-suspended, RAM-only) and note battery alerts under
FLEET.md's Battery supersession.
MyMesh::loop() drains the gate's pending transition and sends 'BATT SUSPEND
<mv>' / 'BATT RESUME <mv>' via FleetManager::sendAlert, alongside the existing
fleet service glue.
Originate an unsolicited alert as a plain group text on the fleet channel,
reusing the injected sender (name prefix + flood) used by !ack replies. It is a
no-op when fleet is off, has no channel, or the sender is unwired.
Record a one-shot suspend/resume transition in sample() and expose it via
takeStateChange(). The event is RAM-only and cleared by resetToDefaults()/load()
so a reload never alerts late; operator toggles and reconfigures raise none.
filter list now echoes the same predicate syntax as filter get instead of
an opaque <idx><e|d><D|F><digest> token: one readable line per rule,
'<idx>: <body>'. Enabled is implicit; only a disabled rule prints
'disabled'. The header is gone (state and counts live in 'filter'), and
the rule digest is no longer printed anywhere (it stays internal as the
prob-roll salt).
list pages like chan list: a listing cut for space ends with a '...' line
and resumes at 'filter list <last-index + 1>'. A rule too large for its
line is cut at a field boundary and marked '..', never a partial value.
filter get drops the 'r0 en' prefix and moves 'pass=' into the stats tail
(hits=/pass=/air=), so a list entry's body is byte-identical to get's.
Docs: FILTER.md gets the new grammar, the '...'/'..' markers, the
enabled-is-implicit note and the digest removal, plus a troubleshooting
row. Tests: new paging/continuation, abbreviation, empty, bad-start,
disabled-rendering and body-consistency cases; the digest-oracle tests now
compare raw persisted records.
Split the per-rule detail out of cliGet() into formatRuleBody() (enabled
and action words plus predicates) and formatRuleStats() (the counter
tail), so filter list can reuse the same rendering as filter get. Pure
refactor: output is byte-identical and the suite is unchanged.
Upstream now tags each release on the main merge commit (companion-v1.18.0
-> main's "Merge branch 'dev'"), which is not reachable from the dev-based
channel branch. git describe therefore fell back to the previous tag and cut
filter-v1.17.1-dev.19 instead of moving the base to 1.18.0.
Derive the base from the reachable '* version X.Y.Z' commit the tag mirrors,
falling back to the companion-v* tag for trees that lack it.