Add D-STAR presence alerts (QuadNet/ircDDB source) and local dev mode - #29
Open
jbburns wants to merge 8 commits into
Open
Add D-STAR presence alerts (QuadNet/ircDDB source) and local dev mode#29jbburns wants to merge 8 commits into
jbburns wants to merge 8 commits into
Conversation
Adds dstar.js, a receiver that tails the public QuadNet heard log and the ircDDB live log, classifies transmissions into "active" (voice) and "linked" (link command) events, drops info/echo/unlink control traffic, and deduplicates per callsign, node, reflector and event type. Spots carry source/mode "dstar", no frequency, and new fields dvEvent, dvNode and dvReflector. The matcher gets matching conditions (node and reflector match with or without the module letter), the band range is only derived when a frequency exists, and notification params include the new fields. tools/dstarTest.js runs the receiver against the live feeds or a saved log without a database. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rJsJxn47T1Bff6xi6g7ab
…imulator Node and reflector identifiers are now "W4HFH-C" / "REF030-C" instead of space-separated, so they survive whitespace splitting in trigger lists, URL parameters and telnet output. The simulator accepts D-STAR spots (dvEvent, dvNode, dvReflector) without a frequency, and notification params include dvSuffix and dvDuration. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rJsJxn47T1Bff6xi6g7ab
The telnet "DX de" formatter threw on spots without a frequency or spotter, and the exception was swallowed silently, so D-STAR telnet alerts were dropped. Use "DV" in place of the frequency, tolerate a missing spotter, include event/node/reflector in the comment, and log notify failures. The app notifier is now skipped when APNS/FCM config is absent so the server can start without push credentials. Adds LOCAL_DEV.md and tools/seedLocalUser.js for running the stack against a local MongoDB and Redis. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rJsJxn47T1Bff6xi6g7ab
All modules now load their config through config_loader.js, which requires ./config.js by default or the file named by HAMALERT_CONFIG. config-local.js is a committed, credential-free config (local Mongo and Redis on non-default ports, no push, no RBN/cluster logins, no Club Log key). tools/localDev.js starts clean mongo:7 and redis:7 containers, waits for them, seeds the test user and D-STAR triggers, optionally builds and runs the hamalert-web dev image, prints how to connect, and runs the server; containers are removed on exit unless --keep is given. Club Log lookups are skipped when no API key is set. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014rJsJxn47T1Bff6xi6g7ab
Podman (docker CLI emulation) refuses short names like "mongo:7" unless unqualified-search registries are configured; docker.io/library/... works on both Docker and Podman. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
composer install inside the web container was rewriting the tracked vendor/ files in the bind-mounted hamalert-web checkout. Mount the hamalert-dev-web-vendor volume over vendor/ instead, so packages are installed once and the checkout stays clean; --down removes the volume. Note that Podman with the podman-docker shim works. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Author
So the mobile app's feed (which only returns spots matched by an "app" trigger) has something to show when the app runs in browser dev mode against the local stack. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Implements the D-STAR side of https://github.com/orgs/hamalert/discussions/17 (presence alerts for D-STAR: "callsign X is active on, or linked to, repeater/reflector module Y"), plus a one-command local development mode that made it testable.
What's new
D-STAR presence source (
dstar.js)openquad.net/ics/ics, HTTP Range tail) and ircDDB (live.ircddb.net:8080/jj3.yaws, line-number poll). Both feeds are normalized into one record shape and go through one shared dedupe cache, so a dual-homed gateway never produces two alerts.activeevent; a link command in UR (e.g.REF030CL) →linkedevent (and alsoactiveif held long enough to be voice, which is common); info/echo/unlink and other control commands never alert. Directed (callsign-routed) calls are ignored by default (ignoreDirectedCalls).dedupeInterval(15 min). Node/reflector identifiers areW4HFH-C/REF030-C; the module letter is optional in trigger conditions (REF030matches all modules).source: 'dstar',mode: 'dstar', no frequency/band, new fieldsdvEvent,dvNode,dvReflector, plusdvSuffix,dvDuration,comment(TX message),spotter(reporting gateway).dvEvent,dvNode,dvReflector;server.jsskips the band-range derivation for spots without a frequency; notification params include the new fields; the simulator accepts D-STAR spots without a frequency.Local development mode
config_loader.js: every module loads config through it;./config.jsstays the default,HAMALERT_CONFIG=<file>overrides.config-local.js: committed, credential-free config (local Mongo/Redis on non-default ports, no push, no RBN/cluster logins).npm run local-dev(tools/localDev.js): starts cleanmongo:7andredis:7containers (Docker or Podman), seeds a test user + two D-STAR triggers, optionally builds and starts the hamalert-web dev image (hamalert/hamalert-web PR), prints how to connect, and runs the server. SeeLOCAL_DEV.md.Design notes / open points for review
VIS ON; QuadNet publishes everything, so HamAlert exposes nothing that isn't already public. TheCQCQCQ-only idea from the discussion doesn't distinguish a QSO on modern D-STAR (both sides keep UR=CQCQCQ through a reflector), so the filter is "voice vs. control traffic" instead; alert wording is "heard on", never "is talking to".minVoiceDuration,minVoiceDurationLinkCommand,dedupeInterval) are config values and will want tuning against real traffic.Testing
npm run local-dev(Docker and Podman): simulated D-STAR spots reach the telnet notifier, Mongo and the Redis stream; the module-lessREF030condition matchesREF030-A; live QuadNet/ircDDB spots flow through the pipeline.Screenshots
Terminal captures (server startup with both feeds priming, live D-STAR spots, telnet session receiving simulated alerts,
dstar-teston the live feed) are attached below.Companion PRs: hamalert/hamalert-web (trigger editor, docs, Alerts page, dev image) and hamalert/hamalert-app (rendering of D-STAR spots).
🤖 Generated with Claude Code