Standardized packet recording to SQLite via --record (roadmap: data storage & processing)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
Piste de recherche
The issue itself proposes the entry points: a Recorder class in meshtastic/recorder.py subscribed to the meshtastic.receive pubsub topic, plus a new --record [FILE] CLI flag next to --listen. Read the existing --listen handling in the CLI module and the pubsub publish path first to see where packets arrive. The proposed schema and PRAGMA user_version versioned SQLite tables (packets, nodes) and the 17 offline pytest cases describe what done looks like: storage, dedup by packet_id, NODEINFO name resolution, thread-safe writes, and history-reader ordering/limits. Note the thread is a proposal awaiting maintainer answers on schema shape, flag name, and whether a read side belongs in the same PR, so confirm direction before writing code.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Hi! The roadmap under Call for Contributors lists "data storage &
processing", with a sqlite schema + tools as a possible starting point,
and #566 has discussion along those lines (thebentern: dirt-simple sqlite
makes sense because it's portable and queryable). I'd like to propose a
concrete minimal shape and hear whether this is wanted before I open a PR.
The gap I kept hitting: --listen shows packets once and forgets them.
Third-party tools keep their own history instead (MeshMonitor has a full db,
pdxlocations/contact stores messages in its own sqlite), so every tool
reinvents storage differently. On top of that the device-side queue only
holds ~30 packets, so whatever a client misses while disconnected is gone
unless an S&F server happens to be running.
What I've been running locally while testing (works well):
- meshtastic/recorder.py: a small Recorder class subscribed to
"meshtastic.receive" - one new flag: --record [FILE] (defaults to meshtastic.db), stays open
like --listen, clean close on Ctrl-C - small versioned SQLite schema (PRAGMA user_version), stdlib only, no
new deps; stores a numeric sender id (from_num) so identities learned
later still resolve onto older rows:
packets(id PK, rx_time, from_id, from_num, to_id, channel, portnum,
text, snr, rssi, hop_limit, packet_id UNIQUE)
nodes(node_num PK, user_id, long_name, short_name, hw_model,
last_heard) <- upserted from NODEINFO packets, so stored history reads
like a chat instead of hex IDs - WAL + busy_timeout, INSERT OR IGNORE dedup by packet_id, per-packet
commit (crash safe) - 17 offline pytest cases: storage, dedup by packet id, NODEINFO name
resolution, a cross-thread write regression, plus coverage for the
history reader (ordering, limits, missing-db errors)
Live tested against hardware: 48 packets captured in a 3 minute window on
a busy EU_868 net with zero write failures, node names auto-learned, and
device-queue replays after reconnect land in the db automatically (they
arrive through the same pubsub path).
Questions before I open a PR:
- does a minimal packets/nodes schema like this match what you'd want
standardized, or should it record raw protobuf blobs too? - is --record the flag name you'd prefer, placed next to --listen?
- want a read side later (--history last N / filters) as a separate
small PR?
Happy to open the PR against master with tests included if this sounds
welcome.
- Langage dominant
- Python
- Étoiles
- 855
- Forks
- 355
- Merge moyen
- 3 j 3 h
- PR mergées (30 j)
- 12
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de meshtastic/python
-
BLE: node unreachable on Linux after pairing — bluez auto-reconnect holds the single connectionOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
meshtastic/python#972 ·
Les mainteneurs répondent en général sous 1 jour
-
Bug: Can't run on TermuxPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
meshtastic/python#969 ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
meshtastic/python#506 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
meshtastic/python#985 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Undocumented `--set` choicesPeut-être pris @Cryptoteep l’a pris il y a 54 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
meshtastic/python#978 · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de meshtastic/python
Issues similaires
-
[Bug]: test_remote_realpath_uses_argument_vector fails on Windows with Python 3.13+ (ntpath.isabs)Peut-être pris @gouyu-hou l’a pris aujourd’hui. Ouvertetriage/confirmed
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
agentscope-ai/agentscope#4397 ·
Les mainteneurs répondent en général sous 2 jours
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
NousResearch/hermes-agent#161712 ·
Les mainteneurs répondent en général sous 1 jour
-
[New Check]: postgresql_flexible_server_public_network_access_disabledPeut-être pris @pouria-l l’a pris aujourd’hui. Ouvertefeature-request status/needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
prowler-cloud/prowler#13615 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
SACGF/variantgrid#2941 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
linkedin/Liger-Kernel#1730 ·
Les mainteneurs répondent en général sous 3 jours