Skip to content

feat: add pause and resume for triggers - #8

Merged
jsvana merged 1 commit into
jsvana:mainfrom
rwjblue:rwjblue/add-pause-and-resume
Nov 17, 2026
Merged

jsvana merged 1 commit into
jsvana:mainfrom
rwjblue:rwjblue/add-pause-and-resume

Conversation

@rwjblue

@rwjblue rwjblue commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

BLUF: Add pause and resume commands for individual HamAlert triggers.

Users can temporarily stop alerts from a trigger and turn them back on with the same settings. Each command opens a picker filtered to eligible triggers. Scripts can pass --trigger-id to select a trigger directly. Repeating a command for a trigger already in the requested state leaves it as is.

Both commands use the same state endpoint as the HamAlert website, which changes only the enabled state. A local HTTP test covers both requests and verifies that the CLI reports an error if HamAlert declines the update.

Examples

With sample triggers, pause shows only enabled triggers:

$ hamalert-cli pause
Login status: 200 OK
? Select a trigger to pause:
> [1234567890abcdef12345677] "DX on 20 m" {"band":"20m"}
  [1234567890abcdef12345678] "SOTA alerts" {"callsign":"W1AW"}
[Type to filter, Enter to select, Esc to cancel]

Type SOTA to filter the list to that trigger, then press Enter:

Paused trigger 1234567890abcdef12345678 ("SOTA alerts").

Now resume shows “SOTA alerts” alongside “Weekend contest,” which was already paused:

$ hamalert-cli resume
Login status: 200 OK
? Select a trigger to resume:
> [1234567890abcdef12345678] "SOTA alerts" {"callsign":"W1AW"}
  [1234567890abcdef12345679] "Weekend contest" {"mode":"CW"}
[Type to filter, Enter to select, Esc to cancel]

Press Enter to resume the highlighted trigger:

Resumed trigger 1234567890abcdef12345678 ("SOTA alerts").

For scripts, replace the example ID with the one shown in the picker or the trigger's _id from a backup.

hamalert-cli pause --trigger-id 1234567890abcdef12345678
hamalert-cli resume --trigger-id 1234567890abcdef12345678
Command help
$ hamalert-cli pause --help
Pause a trigger while keeping its settings

Usage: hamalert-cli pause [OPTIONS]

Options:
      --trigger-id <TRIGGER_ID>  Skip selection and use the trigger ID from the picker or a backup
  -h, --help                     Print help

$ hamalert-cli resume --help
Resume a paused trigger

Usage: hamalert-cli resume [OPTIONS]

Options:
      --trigger-id <TRIGGER_ID>  Skip selection and use the trigger ID from the picker or a backup
  -h, --help                     Print help

@rwjblue
rwjblue marked this pull request as ready for review November 14, 2026 13:48
Let users temporarily stop alerts and resume them without rebuilding
their trigger settings. Use HamAlert’s dedicated state endpoint with
an interactive picker or an exact trigger ID.
@rwjblue
rwjblue force-pushed the rwjblue/add-pause-and-resume branch from f6b560f to 25ca14a Compare November 14, 2026 13:56
@jsvana
jsvana merged commit 784f631 into jsvana:main Nov 17, 2026
3 checks passed
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.

2 participants