Skip to content

Staging#654

Merged
accius merged 114 commits intomainfrom
Staging
Mar 3, 2026
Merged

Staging#654
accius merged 114 commits intomainfrom
Staging

Conversation

@accius
Copy link
Owner

@accius accius commented Mar 3, 2026

No description provided.

frankenstein91 and others added 30 commits February 24, 2026 00:52
Splits the monolithic 1535-line rig-bridge.js into a modular plugin
system where each radio integration lives in its own standalone file.
This enables parallel development and easy addition of new integrations
(wsjtx, rotators, logging software) without touching existing code.

New structure:
  core/config.js           — config load/save/CLI args
  core/state.js            — shared SSE state store + broadcast
  core/server.js           — Express HTTP server + all API routes
  core/serial-utils.js     — shared serial port helpers
  core/plugin-registry.js  — plugin lifecycle manager + dispatcher

  plugins/usb/index.js              — USB serial lifecycle
  plugins/usb/protocol-yaesu.js     — Yaesu CAT (pure functions)
  plugins/usb/protocol-kenwood.js   — Kenwood CAT (pure functions)
  plugins/usb/protocol-icom.js      — Icom CI-V (pure functions)
  plugins/rigctld.js                — rigctld TCP plugin
  plugins/flrig.js                  — flrig XML-RPC plugin

Plugin API uses factory pattern: each plugin exports { id, name,
category, create(config, services) } returning { connect, disconnect,
setFreq, setMode, setPTT }. Non-rig plugins can also implement
registerRoutes(app) for custom HTTP endpoints.

HTTP API contract and config file format unchanged — fully backward
compatible with existing openhamclock frontend. Adds xmlrpc to
dependencies (was previously an undocumented optional install).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents the new project structure, plugin API with factory pattern,
category system (rig/rotator/logger/other), and how to write new plugins.
Adds /api/test endpoint to API reference. Adds Elecraft to Kenwood
section and expands legacy backend table with default ports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a 'mock' plugin for development and testing without hardware.
Initialises with 14.074 MHz USB (20m FT8) and slowly drifts through
six common FT8/SSB frequencies so the live status display is visibly
active. All set commands (setFreq, setMode, setPTT) are reflected back
into state immediately and logged to the console.

Also adds a "Simulated Radio (Mock)" option to the setup UI dropdown
under a new "Development" optgroup.

Enable by selecting it in the UI or setting radio.type = "mock" in
rig-bridge-config.json.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Intercepts console.log/warn/error at module level, buffers the last 200
lines in memory, and streams them to the browser via a new SSE endpoint
GET /api/log/stream using named events (history + line).

The setup UI now has two tabs:
  ⚙️ Configuration  — existing radio setup (unchanged)
  🖥️ Console Log    — live scrolling log pane

Console Log tab features:
  - Receives startup history immediately on connect so opening the tab
    mid-session shows what happened before
  - Color-coded by level: INFO (green), WARN (amber), ERROR (red)
  - Toggle filters per level with clickable badges
  - Auto-scroll checkbox (enabled by default, pauses when scrolled up)
  - Clear button wipes the in-browser log display
  - Live indicator dot (pulsing green = connected, grey = reconnecting)
  - Auto-reconnects every 3 s if the SSE connection drops

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- plugins/usb/index.js: add loggedUpdateState wrapper that logs freq/mode/PTT
  changes only when values actually change; log SET FREQ/MODE/PTT commands,
  connect/retry/disconnect lifecycle events
- plugins/rigctld.js: log freq/mode/PTT poll responses (on change only),
  SET FREQ/MODE/PTT commands, connection lost + retry, disconnect
- plugins/flrig.js: log host:port on connect, freq/mode/PTT poll responses
  (on change only), poll errors, SET FREQ/MODE/PTT commands, disconnect
- core/config.js: add logging: true to DEFAULT_CONFIG; persist and restore
  the logging flag across restarts
- core/server.js: honour config.logging in pushLog so capture can be disabled;
  add GET/POST /api/logging endpoints; add Pause/Resume toggle button in the
  Console Log toolbar; init() fetches logging state on page load

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rst poll

- protocol-yaesu.js: replace FA; + deferred MD0; poll with a single IF; command.
  IF; is universally supported across all FT-series radios and returns freq, mode
  and PTT in one atomic response, avoiding timing issues with two interleaved
  commands. The existing IF parser in parse() already handles this correctly.
  Add a default case in parse() to log unrecognised responses (e.g. '?' = radio
  rejected command due to wrong baud rate or CAT not enabled on radio).

- index.js: log every raw incoming ASCII chunk from the radio in the Console Log
  tab so it is immediately visible whether the radio is responding at all, and
  what it sends (good response, '?' error, or silence). Also fire the first poll
  immediately on connect instead of waiting a full pollInterval — gives instant
  feedback that the serial link is working.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tation)

@serialport/bindings-cpp v12 only enumerates /dev/tty.* nodes via IOKit on
macOS — the /dev/cu.* (call-out) counterparts are never returned by the
library but are what radio CAT control requires. tty.* (dial-in) blocks open()
until carrier-detect is asserted, causing connections to stall silently.

core/serial-utils.js: in listPorts(), on macOS map every tty.* entry that has
a vendorId (i.e. a real USB-serial adapter) to its cu.* equivalent, then drop
any remaining tty.* entries. System-only tty.* devices with no vendorId (e.g.
tty.Bluetooth-Incoming-Port, tty.debug-console) are filtered out entirely as
they are not useful for radio control.

core/server.js: in POST /api/config, if a tty.* serialPort path is saved on
macOS, silently rewrite it to cu.* before persisting — so old saved configs
are automatically upgraded on next save without user intervention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The IF; response parser was reading wrong field positions, causing mode and
PTT to never update even when the radio was responding correctly:

  - mode: was charAt(21) = XIT on/off flag (always '0', not in MODES map,
    silently fell back to getState('mode') = empty string)
  - PTT:  was charAt(28) = scan on/off flag (always '0' = always RX)

Correct positions per FT-991A CAT Operation Reference Manual:
  IF [9 freq][4 blank][5 RIT offset][1 RIT][1 XIT][3 mem][1 TX/RX][1 mode]...
   ^2      ^10 ^11  ^14^15       ^19  ^20   ^21   ^22  ^24   ^25    ^26

  - mode: charAt(26) = P8 operating mode (2=USB, 1=LSB, 3=CW, etc.)
  - PTT:  charAt(25) = P7 TX/RX (0=RX, 1=TX, 2=Tune)

Frequency parsing (substring(2,11)) was already correct.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…and enable real-time PTT tracking via AI1 mode
[FEATURE 608] Add the mode FM to the filters
…alog Clock,

APRS panel, Solar panel, and DE / DX location components in the dockable app
so that they will get the panel background colors
…splay

[feature/standardize-panels-for-display] added class name panel to components
…ecture

Feature: rig bridge introducing plugin architecture
@railway-app railway-app bot temporarily deployed to openhamclock / Modular-Staging March 3, 2026 02:47 Inactive
@accius accius merged commit fb71615 into main Mar 3, 2026
5 of 6 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.

7 participants