mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-06-01 20:14:04 +00:00
317b59ab10
## Summary - Adds configurable GPS polygon areas to `config.json`; nodes are attributed to an area if their last-known position falls inside the polygon - New `Area: …` dropdown filter (matching the existing region filter style) appears on all analytics, nodes, packets, map, and live screens when areas are configured - Backend resolves area membership with a 30s TTL cache; area filter bypasses the 500-node cap on `/api/bulk-health` so all area nodes are always returned - Includes a polygon builder tool (`/area-map.html`) for drawing and exporting area boundaries ## Changes **Backend** - `AreaEntry` type + `Areas` config field - `GetNodePubkeysInArea` DB query + `resolveAreaNodes` (30s TTL, `areaNodeMu` RWMutex) - `PacketQuery.Area` + `filterPackets` polygon check - `?area=` param propagated through all analytics, topology, clock-health, and bulk-health routes - `/api/config/areas` endpoint **Frontend** - `area-filter.js`: single-select dropdown, persists to localStorage, cleans up stale keys on load - Wired into analytics, nodes, packets, channels, map, and live pages - Live map clears node markers on area change **Docs & tools** - `docs/user-guide/area-filter.md` — configuration and usage guide - `docs/api-spec.md` — updated with new endpoint and `?area=` param table - `tools/area-map.html` — polygon builder for defining area boundaries - Demo areas added to `config.example.json` ## Test plan - [x] No areas configured → filter dropdown does not appear on any page - [x] Areas configured → dropdown appears, "All" selected by default - [x] Selecting an area filters nodes/packets/topology/map correctly - [x] Selecting "All" restores unfiltered view - [x] Selection persists across page reloads (localStorage) - [x] Stale localStorage key (area removed from config) is cleared on load - [x] `/api/bulk-health?area=X` returns all nodes in area (no 500-node cap) - [x] `/api/config/areas` returns correct list 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Kpa-clawbot <kpaclawbot@outlook.com> Co-authored-by: openclaw-bot <bot@openclaw.local>
93 lines
3.0 KiB
Markdown
93 lines
3.0 KiB
Markdown
# Analytics
|
|
|
|
The Analytics page provides deep-dive charts and tables about your mesh network. Select a tab to explore different aspects.
|
|
|
|
[Screenshot: analytics page with tab bar]
|
|
|
|
## Overview
|
|
|
|
Summary dashboard with key network metrics at a glance. Quick sparklines and counts across all data dimensions.
|
|
|
|
## RF / Signal
|
|
|
|
Radio frequency analysis:
|
|
|
|
- **SNR distribution** — histogram of signal-to-noise ratios across all packets
|
|
- **RSSI distribution** — histogram of received signal strength
|
|
- **SNR by observer** — which observers are getting the best signals
|
|
- **Signal trends** — how signal quality changes over time
|
|
|
|
Use this to identify weak links or noisy observers.
|
|
|
|
## Topology
|
|
|
|
Network structure analysis:
|
|
|
|
- **Hop count distribution** — how many relay hops packets typically take
|
|
- **Top relay nodes** — which repeaters handle the most traffic
|
|
- **Node connectivity** — how well-connected each node is
|
|
|
|
## Channels
|
|
|
|
Channel message statistics:
|
|
|
|
- **Messages per channel** — which channels are most active
|
|
- **Channel activity over time** — traffic trends by channel
|
|
- **Top senders** — most active nodes per channel
|
|
|
|
## Hash Stats
|
|
|
|
Mesh hash size analysis:
|
|
|
|
- **Hash size distribution** — how many bytes nodes use for addressing
|
|
- **Hash sizes by role** — do repeaters use different hash sizes than companions?
|
|
|
|
## Hash Issues
|
|
|
|
Potential hash collision detection:
|
|
|
|
- **Collision pairs** — nodes whose short hash prefixes overlap
|
|
- **Risk assessment** — how likely collisions are at current hash sizes
|
|
|
|
Hash collisions can cause packet misrouting. If you see collisions here, consider increasing hash sizes on affected nodes.
|
|
|
|
## Route Patterns (Subpaths)
|
|
|
|
Common routing paths through the mesh:
|
|
|
|
- **Frequent subpaths** — which relay chains appear most often
|
|
- **Path reliability** — how consistently each path is used
|
|
- **Path detail** — click a subpath to see every packet that used it
|
|
|
|
## Nodes
|
|
|
|
Per-node analytics with sortable metrics across the fleet.
|
|
|
|
## Distance
|
|
|
|
Estimated distances between nodes based on GPS coordinates, correlated with signal quality.
|
|
|
|
## Neighbor Graph
|
|
|
|
Interactive visualization of which nodes can directly hear each other. Shows the mesh topology as a network graph.
|
|
|
|
## RF Health
|
|
|
|
Per-observer signal health over time. Identifies observers with degrading reception.
|
|
|
|
## Prefix Tool
|
|
|
|
Test hash prefix lengths to see how many collisions different sizes would produce. Useful for deciding on hash_size settings.
|
|
|
|
## Region filter
|
|
|
|
All analytics tabs respect the **region filter** at the top. Select a region to scope the data to observers in that area.
|
|
|
|
## Area filter
|
|
|
|
If [areas are configured](area-filter.md), an area pill bar also appears. Selecting an area scopes all analytics to nodes whose GPS position falls within that area. This is based on the transmitting node's own coordinates — not the observer's location — so it avoids cross-region pollution from distant observers.
|
|
|
|
## Deep linking
|
|
|
|
Each tab is deep-linkable. Share a URL like `#/analytics?tab=collisions` to point someone directly at hash issues.
|