feat(telemetry): wire up newer AirQualityMetrics fields (#3507)#3517
Conversation
Several newer AirQualityMetrics fields were decoded by firmware but unwired in MeshMonitor — never graphed or labelled: particles_40um (the field that prompted this), pm40_standard, particles_tps, the formaldehyde sensor trio (form_formaldehyde/humidity/temperature), and the PM-sensor extras (pm_temperature/humidity/voc_idx/nox_idx). Add canonical units in telemetryKeys.ts (CANONICAL_TELEMETRY_UNITS) and the frontend label/color/short-label/unit maps (TelemetryChart, TelemetryGraphs, UnifiedTelemetryPage). Because #3506 unified serial ingest onto the canonical normalizer and MQTT_KEY_MIGRATIONS derives from AIR_QUALITY_UNITS, adding the unit is all it takes for both transports to ingest these — including the underscore-before-digit particles_40um. pm40_standard / particles_40um are uint32 → added to INTEGER_TELEMETRY_TYPES; the rest are floats. No DB migration needed (these were never stored before). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review: feat(telemetry): wire up newer AirQualityMetrics fieldsTasks:
Overall AssessmentThis is a clean, well-scoped PR that properly extends AirQualityMetrics support. The architecture is sound — adding entries to Minor Issues
// TYPE_UNITS in UnifiedTelemetryPage.tsx — these entries appear missing:
particles40um: '#/0.1L', // present in AIR_QUALITY_UNITS but missing here
pmVocIdx: 'VOC', // present in AIR_QUALITY_UNITS but missing here
pmNoxIdx: 'NOx', // present in AIR_QUALITY_UNITS but missing hereThe
The new fields are added to Observations
The comment says Test coverage is solid. No security concerns. The changes are entirely UI label/unit mapping and test code, with no external input handling, auth changes, or raw SQL. No DB migration needed — confirmed by the PR description. These fields were never stored before, so there's nothing to backfill. SummaryOne real gap to address: |
…verview (review #3517) UnifiedTelemetryPage's TYPE_UNITS was missing particles40um / pmVocIdx / pmNoxIdx (they'd render with no unit). Mirror AIR_QUALITY_UNITS for the whole particle family (03–100µm) and the two PM-sensor indices so every AQ field shows a unit. Also clarify the INTEGER_TELEMETRY_TYPES comment re: particles40um. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review: feat(telemetry): wire up newer AirQualityMetrics fieldsTasks:
Overall AssessmentThis PR is clean and correct. The previous review's gap (missing What was verified
Tests — comprehensive. Pre-existing minor inconsistencies (not introduced by this PR)These were present before and are out of scope for this PR, but flagged for awareness:
Security / PerformanceNo concerns. All changes are UI label/unit mapping and tests. No external input handling, auth, raw SQL, or performance-sensitive paths are touched. The PR is ready to merge. The gap flagged in the prior review is resolved. |
Finalize the 4.11.0 release (from 4.11.0-rc2) and bring documentation up to date with everything new since 4.10. Version bump across all five files: package.json, package-lock.json, helm/meshmonitor/Chart.yaml, desktop/src-tauri/tauri.conf.json, desktop/package.json. Documentation: - CHANGELOG: finalize the Unreleased section as [4.11.0], adding the previously-missing entries — headline MeshCore virtual node (#3540), MeshCore path-by-repeater-name (#3550), MeshCore map icons + filtering (#3563), per-node Hide from Map (#3565), telemetry time-range selector (#3530), newer AirQualityMetrics fields (#3517), UI/map unification (#3561), plus the bug-fix and documentation changes since 4.10.4. - virtual-node.md: document the new MeshCore Virtual Node alongside the Meshtastic one (default port 5000, per-source enablement, admin-command safety, MeshCore app setup, troubleshooting) + a two-variants intro note. - configuration/index.md, docs/index.md, README.md: mention the MeshCore Virtual Node in the Virtual Node feature blurbs. - CLAUDE.md: refresh stale version header (4.10.0 -> 4.11.0) and migration count (84 -> 92, latest 092_add_hide_from_map_to_nodes). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Closes #3507. Final issue from the protobuf.js
_<digit>field-drop audit (coverage gap, not a regression).Several newer
AirQualityMetricsfields are decoded by firmware but were unwired in MeshMonitor — never graphed or labelled:particles_40um(4.0µm bin — the field that prompted this) andpm40_standard(PM4.0)particles_tps(typical particle size)form_formaldehyde/form_humidity/form_temperaturepm_temperature/pm_humidity/pm_voc_idx/pm_nox_idxWhat changed
telemetryKeys.ts— added canonical units toAIR_QUALITY_UNITS(units sourced from the proto field comments: formaldehyde in ppb, particle bins in #/0.1L, PM in µg/m³, VOC/NOx as dimensionless indices labelled likeiaq, tps in µm).TelemetryChart.tsx(full labels),TelemetryGraphs.tsx(colors +pm40Standardadded toINTEGER_TELEMETRY_TYPES),UnifiedTelemetryPage.tsx(short labels + units).Why this is small
#3506 unified serial ingest onto the canonical normalizer and
MQTT_KEY_MIGRATIONSderives fromAIR_QUALITY_UNITS— so adding a unit is all it takes for both serial and MQTT to ingest these, including the underscore-before-digitparticles_40um. No serial-list edit, no DB migration (these were never stored before).Tests
telemetryKeys.test.ts: assertsparticles_40um→particles40umand all new units.meshtasticManager.airQualityParticles.test.ts: end-to-end —particles_40um/pm40_standard/pm_voc_idxnow flow throughprocessTelemetryMessageProtobufand get stored.Full suite: 6570 passed, 0 failed.
🤖 Generated with Claude Code