8 Commits
Author SHA1 Message Date
rich 01c49d7bdd Add firmware version tracking and on-device history backfill
Repeaters now report their firmware version (REQ_TYPE_GET_OWNER_INFO),
checked daily and after a reboot, into meshcore_repeater_info. Firmware
changes show as Grafana annotations and in the web UI node list.

Repeaters on keymind/Cascade firmware keep 7 days of half-hourly battery
voltage and MCU temperature. With history = true and an admin login, the
collector fetches enough days via the remote CLI to fill gaps after
missed polls, writing them to meshcore_repeater_history.
2026-10-13 22:35:12 -04:00
richandClaude Opus 5.5 70f6cd37d6 Map: show one point per node at its most recent position
Companions with location enabled appeared twice on the map: once at
their advert position and once at their GPS telemetry position.

- write GPS telemetry positions to meshcore_node_location too, tagged
  source=gps, alongside advert positions (source=advert)
- timestamp each location point with when the position was observed
  (poll time for GPS; when the advert was first seen for adverts)
- map queries group by node only, so last() picks the newest position
  whichever source it came from; drop the separate GPS layer
- table shows the position's source and age

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:00:38 -04:00
richandClaude Opus 5.5 738509024f Add node map dashboard and companion selector
Collector:
- record node positions from adverts in the companion's contact list
  (plus its own advertised position) as meshcore_node_location every
  location_interval_seconds (default 900; no airtime)

Grafana:
- new MeshCore Node Map dashboard: Geomap with layers for repeaters,
  companions, rooms/sensors, this server and shared companion GPS, plus
  a table of located nodes
- mesh dashboard: Companion selector filtering the remote companion
  panels, a panel for other shared sensors (e.g. illuminance), and a
  link to the map

Web UI: location interval in Polling defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 14:31:07 -04:00
richandClaude Opus 5.5 280428296f Add self-advert controls and contact-card QR code
So other companions can add this one (a prerequisite for them sharing
telemetry with it):
- web UI: send a zero-hop or flood advert on demand
- optional automatic adverts ([advert] interval_hours, 3-168 h like the
  repeater firmware; flood or zero-hop), timer persisted in advert.json
  and restarted by a successful manual advert of the same kind
- the companion's own contact card (export_contact) shown as a QR code
  (segno) and copyable meshcore:// link
- UI and README explain that telemetry must be allowed for the contact;
  the favourite flag alone doesn't grant it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 14:05:10 -04:00
richandClaude Opus 5.5 3f10a58e42 Add local companion stats and remote companion telemetry
Local companion (the radio attached to the server):
- collect CMD_GET_STATS core/radio/packets, self telemetry and contact
  counts every local_stats_interval_seconds (default 60; no airtime)
- written to meshcore_local_stats / meshcore_local_telemetry; stats the
  firmware doesn't support are reported in the UI and skipped

Remote companions (other people's chat nodes):
- new [[companion]] node type: telemetry-only request, no login, with
  location requested only when enabled per companion (permission mask)
- shares scheduling, low-battery back-off and poll-now with repeaters
- written to meshcore_companion_telemetry / meshcore_companion_poll

Web UI: Repeaters tab becomes Nodes (repeaters + companions), add-node
dialog with type choice, one-click add for heard companions, live local
companion stats. API moves to /api/nodes.

Grafana: new rows for the local companion and remote companions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 13:54:27 -04:00
richandClaude Opus 5.5 279b6ad754 install.sh: pick the newest Python >= 3.10 instead of the first python3 in PATH
A custom older python3 in /usr/local/bin hid the distro's 3.11 and made
the installer abort.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:23:11 -04:00
richandClaude Opus 5.5 90ab75d3a8 Add web UI for managing repeaters and InfluxDB, plus systemd installer
Web UI (aiohttp, served by the collector process on :8080):
- repeater status, poll-now, add/edit/delete with per-repeater overrides
- companion radio settings with serial port detection and a list of
  heard contacts for one-click repeater setup
- InfluxDB settings with a test write; polling defaults; logs; password
- password login (scrypt hash), SameSite=Strict session cookie, JSON-only
  mutations, secrets never sent to the browser

Collector changes:
- Collector class owns config, radio and schedule; config changes apply
  live and are written back to config.toml (also reloaded when edited
  on disk)
- shutdown cancels an in-flight poll after a short grace period
- Python 3.10 support via tomli fallback; dry runs don't persist state

install.sh installs to /opt/meshcore-influx as a hardened systemd
service running as a 'meshcore' system user, writes a starter config,
prompts for the web password, and supports upgrade and --uninstall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 22:22:03 -04:00
richandClaude Opus 5.5 f2c285f939 Add MeshCore repeater telemetry collector for InfluxDB with Grafana dashboard
Polls MeshCore repeaters over the mesh via a local companion radio
(serial/TCP/BLE): status counters, CayenneLPP telemetry and the
neighbour table, written to InfluxDB along with per-poll health.

Includes a low-battery back-off for solar nodes (hysteresis between
low and recover thresholds, slower interval, optional request skips),
persisted state so --once works from cron, and an InfluxQL Grafana
dashboard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:48:53 -04:00