--- paths: - "nodes/*/src/nodeClass.js" - "nodes/*/src/specificClass.js" - "nodes/*/src/output/**" - "nodes/generalFunctions/src/outputUtils/**" --- # Telemetry Rules Output port convention (Port 0/1/2) is documented in `.claude/rules/node-architecture.md`. This file covers only the Port 1 payload shape and downstream contracts. ## InfluxDB Payload Structure Port 1 payloads must follow InfluxDB line protocol conventions: - **Tags**: Low-cardinality indexed fields (node name, machine type, station ID) - **Fields**: High-cardinality values (measurements, setpoints, quality scores) ## Cardinality Rules - **Never add high-cardinality tags** — no timestamps, UUIDs, or free-text values as tags - Tags are for grouping/filtering; fields are for values - New tags require review for index impact ## FlowFuse Dashboard Compatibility - Charts use `msg.topic` for series identification (`category: "topic"`) - Dashboard API endpoints serve pre-aggregated data - Changes to Port 0 `msg.topic` format can break downstream dashboards ## Consistency - Field names for the same measurement type must be consistent across all nodes - Measurement names follow a documented naming convention - Aggregation windows (1min, 5min, 1hr, 24hr) are standardized