Files
pyMC_Repeater/tests
agessaman 566498ce7d feat(mqtt): report each radio's own telemetry in the status radio map
The figures in stats are one set for the whole node, so on a two-radio bridge
they cannot say which side is carrying the traffic or which side has gone deaf.
Airtime is summed across channels and utilisation is the highest of them, which
is right for a node-level number and useless for telling the local radio from
the backhaul. Noise floor and errors are the default radio's outright, so the
link radio is simply unreported.

Every radio now carries its own tx_air_secs, rx_air_secs, current_airtime_ms,
utilization_percent, noise_floor and errors in its radios[] entry, under the
same field names stats uses so there is no second vocabulary to learn. The node
already computes all three -- AirtimeBudgets.per_radio_stats, the per-radio
noise floor cache, and the radios' CRC counters -- and /stats has reported the
first two as airtime_radios and noise_floor_radios since per-radio analytics
landed. This is the observer feed catching up.

Additive by construction: radios[] is published only where it already was, on a
node with more than one band, and a consumer that ignores it reads exactly what
it read before. Telemetry is merged into the map rather than gating it, and
each source contributes on its own, so a radio the fabric cannot hand back
keeps its air settings and still attributes its packets.

Two figures worth knowing before comparing them:

  - stats.errors is the *default radio's* CRC count, matching /stats and the
    MeshCore wire response, so on a bridge it does not equal the sum of
    radios[].errors. Making the node scalar a sum would change three readers
    that have always meant one radio, which is a decision of its own.
  - tx/rx_air_secs truncate to whole seconds per radio and again for the node,
    so the per-radio values can sum to one second less than the node's.
2026-09-21 16:14:58 -07:00
..