Skip to content

feat(server): read what others publish to DutchMeshCore's wardrive topics (#735) - #772

Merged
efiten merged 5 commits into
masterfrom
feat/735-wardrive-ingest
Nov 25, 2026
Merged

efiten merged 5 commits into
masterfrom
feat/735-wardrive-ingest

Conversation

@efiten

@efiten efiten commented Nov 25, 2026

Copy link
Copy Markdown
Owner

The ingestor can now subscribe to extra MQTT brokers that carry wardrive obs (meshcore/{label}/{PUBKEY}/wardriver/obs), such as DutchMeshCore's, and store what other wardrive apps publish there as receptions on the map. With no extraBrokers entry in the config, nothing changes.

Closes #735

Changes in this PR

  1. Sender read off the raw frame (server/internal/meshpacket/classify.go). An obs carries no sender fields, so the server classifies the frame itself: a Go port of the app's classifyReception, including Ed25519 advert verification (signed message pub_key || timestamp || app_data, firmware Mesh.cpp:255-280). Advert names decode like the app's TextDecoder.
  2. Store (server/internal/store). A new source column (TEXT NOT NULL DEFAULT 'site'). ParseObs checks the topic shape, requires origin_id to equal the pubkey in the topic, needs position, RSSI and SNR, and normalises rx_at to UTC in toISOString() form. A row from our own broker replaces a copy from an extra broker of the same reception (hunter_pubkey, rx_at, raw), never the other way round, so the app's richer classification (channel name, companion name) wins.
  3. Config and wiring (server/internal/config, server/cmd/ingestor/main.go). extraBrokers: [{id, url, username, password, topics, format: "wardrive"}]. One MQTT client per entry, subscribing at QoS 1, retrying the first connect every 30 s with a log line. /healthz still reports only the primary broker.
  4. AGENTS.md §9, config.example.json, and a changelog entry.

Verification

  • go test ./... and go vet ./... pass.
  • Classify is tested on 197 real frames from the live DB (last 14 days, stratified by type), with the expected values produced by the app's own decode.js/meshpacket.js (testdata/gen-classify.mjs).
  • The UTF-8 decoder gives the same output as Node's TextDecoder on 245,410 byte sequences.
  • Live DB, read-only: 0 of 127,228 rows have upper case in hunter_pubkey or raw, so lower-casing both needs no data migration.

Not in this PR

  • Not run against the real DutchMeshCore broker, and not deployed. The config entry on the server is a separate step after merge.
  • No retention purge on hunter_receptions and no cap on raw_messages. The volume from an extra broker is measured after deploy.
  • An obs is dead-lettered when its origin_id differs from the topic pubkey or its rx_at lies more than 10 minutes ahead of ingest time.

@efiten
efiten merged commit 2bc7530 into master Nov 25, 2026
6 checks passed
@efiten
efiten deleted the feat/735-wardrive-ingest branch November 25, 2026 20:38
@github-actions github-actions Bot mentioned this pull request Nov 25, 2026
@efiten

efiten commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

@khagele this is live since 25 November 2026, 20:39 UTC: the ingestor subscribes to meshcore/+/+/wardriver/obs on wss://subscriber.dutchmeshcore.nl/mqtt with the read account the nameresolver already uses. The subscribe succeeds, but no obs has arrived since then: hunter_receptions holds only rows with source = 'site', and nothing was dead-lettered.

That fits two explanations I cannot tell apart from our side. Two questions:

  1. Does this read account receive /wardriver/ topics? As far as I know a LIMITED subscriber gets the subscribe accepted but never a message on those topics.
    • (a) it is FULL_ACCESS already, so the silence means nobody published
    • (b) it is LIMITED and can be upgraded
    • (c) it is LIMITED and we need a separate account for this
  2. Do wardrive obs reach subscriber.dutchmeshcore.nl at all? Publishers send them to collector1/collector2.
    • (a) yes, the subscriber host sees everything both collectors receive
    • (b) no, we need to read from a collector host instead (which one, and with which account)

efiten pushed a commit that referenced this pull request Nov 26, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>app: 1.33.0</summary>

##
[1.33.0](app-v1.32.1...app-v1.33.0)
(2026-11-25)


### Features

* **server:** read what others publish to DutchMeshCore's wardrive
topics ([#735](#735))
([#772](#772))
([2bc7530](2bc7530))
</details>

<details><summary>server: 1.12.0</summary>

##
[1.12.0](server-v1.11.1...server-v1.12.0)
(2026-11-25)


### Features

* **server:** read what others publish to DutchMeshCore's wardrive
topics ([#735](#735))
([#772](#772))
([2bc7530](2bc7530))
</details>

<details><summary>web: 1.29.0</summary>

##
[1.29.0](web-v1.28.1...web-v1.29.0)
(2026-11-25)


### Features

* **server:** read what others publish to DutchMeshCore's wardrive
topics ([#735](#735))
([#772](#772))
([2bc7530](2bc7530))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

server: what others publish to DutchMeshCore's wardrive topics never reaches our map

1 participant