Skip to content

Interactive MQTT Injection Tool for Calypso #292

Description

@bracyw

Description

Add a dedicated development tool to the Calypso repo that loads the same config as simulate.rs, maps keys to topics, and publishes a generated value within that topic's defined min/max range any time a mapped key is pressed. Intended for development and manual testing—not simulation—this tool connects to Siren at the default Calypso host (127.0.0.1:1883) so NERO and Argos receive messages identically to real CAN traffic.

Acceptance Criteria

  • Implemented as a first-class tool in the Calypso repo (publishable as a standalone binary)
  • Loads config using the same patterns as simulate.rs, filtering to only topics referenced in the key mapping
  • Accepts a key-to-topic mapping at startup (e.g. via a small JSON file)
  • Pressing a mapped key generates a value within that topic's min/max and publishes to Siren
  • No free-form input supported; to change mappings the tool must be restarted with a new config
  • Defaults to 127.0.0.1:1883 with an option to override via flag or env var
  • Exits cleanly on interrupt

Proposed Solution

Add a new entry under src/bin/, reusing config loading, value generation, MQTT client, and Siren connection patterns directly from simulate.rs. After loading, filter to only topics present in the key mapping. Listen for keypress events, resolve to topic, generate value from min/max, and publish. Add tests for config loading, topic filtering, key resolution, value generation bounds, and MQTT publish behavior.

Mocks

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions