Skip to content

Latest commit

 

History

History
78 lines (56 loc) · 2.81 KB

File metadata and controls

78 lines (56 loc) · 2.81 KB

Smoke Test

The gateway includes a smoke test harness that connects to a real ENH socket, performs a bus scan, and executes read-only method invocations for each discovered plane.

For the canonical cross-repo smoke order (gateway + add-on + HA integration), see development/end-to-end-smoke.md.

Entry Point

  • Binary: cmd/smoke
  • Gate: runs only when EBUS_SMOKE=1 is set.

Configuration

The smoke harness reads AGENT-local.md from the repo root and extracts YAML blocks. Required fields:

enh:
  type: unix|tcp
  path: /path/to/ebusd.socket   # required for unix
  host: <EBUS_TCP_HOST>         # required for tcp
  port: 9999                    # required for tcp
  timeout_sec: 10

smoke:
  profile: enh|ens|ebusd-tcp
  verbose_frames: false
  scan_timeout_sec: 5
  method_timeout_sec: 10
  register_dump_tsp: ""         # optional; enables device dump
  register_dump_target: 0x00    # optional; target address override

expected_devices:
  - address: 0x08
    description: "ecoTEC BAI"
    manufacturer: ""
    device_id: ""
    sw_version: ""
    hw_version: ""

smoke.profile notes:

  • enh and ens use enhanced adapter framing (ens is accepted as compatibility alias of ENH).
  • ebusd-tcp routes requests through ebusd command mode (hex on port 8888 by default).
  • ebusd is accepted as alias of ebusd-tcp in smoke config normalization.
  • For ebusd-tcp, enh.type must be tcp (host/port), not unix.

If EBUS_SMOKE=1 is set and AGENT-local.md is missing or invalid, the test fails with an error.

Run

EBUS_SMOKE=1 go run ./cmd/smoke

For the full 88-topology matrix runner (T01..T88), see development/smoke-matrix.md.

Behavior

  1. Build gateway stack (transport → bus → registry → router).
  2. Scan the bus with a per-device timeout.
  3. Log discovered devices and compare against expected_devices.
  4. Start a passive broadcast listener on a separate ENH connection after the scan.
  5. Run the optional register dump when configured.
  6. Invoke read-only methods for each discovered plane.
  7. Log semantic energy totals as B516 broadcasts arrive (if present on the bus).

Notes:

  • If expected_devices is empty/omitted, the harness performs a full scan over the default address range.
  • On a multi-initiator bus, arbitration collisions can occur during scan. The scan logic retries collided targets in later passes (bounded) instead of aborting the entire scan.
  • Default providers include Vaillant system, heating, and DHW planes; solar is opt-in.

The smoke test never writes to the bus.

Register Dump (Optional)

If smoke.register_dump_tsp is set, the smoke harness runs a device dump after the scan and writes both a log and a JSON artifact. See development/device-dump.md for the full pipeline, schema, and output path rules.