meshmonitor icon indicating copy to clipboard operation
meshmonitor copied to clipboard

[FEAT] MT local node battery voltage /percentage/power info

Open kokoshell opened this issue 3 months ago • 1 comments

Hi Yeraze,

Can you add on top bar the LEFT side of the "Connected" status 👍 -battery percentage for local node or power plugged icon ... -battery voltage (or plug voltage?) Eventually ChUtil and Air Util ?

Best regards, Kokoshell

Image

Examples from MT app:

Image

kokoshell avatar Aug 25 '26 09:08 kokoshell

Thanks for the request, @kokoshell! I checked for duplicates and didn't find an existing issue covering this specifically (closest related ones are #4908, which reorganized the toolbar's connect/disconnect controls but didn't touch telemetry display, and #1274, about per-minute packet-rate graphs on the Info page — neither overlaps with this ask).

Classification: Feature Request

Alignment check: This fits well with MeshMonitor's goal of surfacing node health at a glance, and mirrors what the official Meshtastic app already shows in its top bar. Good news — the underlying data is already flowing through the app, so this is mostly a UI addition, not new plumbing.

Findings

  • The "Connected" badge lives in src/components/AppHeader/AppHeader.tsx (header-right → connection-status-container → connection-status), rendered from App.tsx. This is exactly the container that #4908 recently cleaned up, so it's a natural, currently-uncluttered insertion point.
  • Local node telemetry (batteryLevel, voltage, channelUtilization, airUtilTx) is already fetched, stored, and available on the frontend via the existing nodes/useNodes() data (deviceMetrics on DeviceInfo). No new API calls or backend work needed — this is purely passive display of data we already receive, so there's no mesh airtime impact.
  • The "which node is local" lookup (nodes.find(n => n.user?.id === currentNodeId)) already exists (duplicated in App.tsx and AppHeader.tsx) — a shared useLocalNode()-style hook would avoid a third copy.
  • There's already a battery-icon pattern to reuse (UiIcon battery/batteryCharging, used in the map popup SignalItems component), including the "plugged in" (battery === 101) special case. Voltage/ChUtil/AirUtil formatting exists as plain text in NodeDetailsBlock.tsx and can be adapted.

Proposed plan

  1. Add a small header widget (e.g. LocalNodeStats) placed left of the connection-status badge, bound to the local node for the currently active source.
  2. Show battery icon (charging variant when plugged in) + percentage, and voltage, by default — matching the Meshtastic app screenshot you shared.
  3. Make ChUtil/AirUtil an optional secondary display (e.g. shown on hover/tooltip, or only above a certain viewport width) rather than always-on, since the header is intentionally compact after #4908's cleanup and these two are secondary ("Eventually...") in your request.
  4. Hide the widget gracefully when the active source has no local-node telemetry yet (e.g. right after connecting, or for MeshCore-only sources where these fields may not apply the same way).
  5. Verify mobile/narrow-viewport behavior, since header space is already tight.

I won't start implementation yet — flagging here in case you'd like to weigh in on scope (e.g., should ChUtil/AirUtil be in scope for v1, or a fast-follow?) before I proceed further.

-- Authored by Roger 🤓


Generated by Claude Code

Yeraze avatar Aug 25 '26 09:08 Yeraze