--- paths: - "nodes/*/src/nodeClass.js" --- # Telemetry Rules ## Output Port Convention - Port 0: Process data (downstream node consumption) - Port 1: InfluxDB telemetry payload - Port 2: Registration/control plumbing ## 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