Lands the end-to-end CoreSync demo (frost-influx-grafana.flow.json) along with the supporting normalizer/identity/interpolation/reducer work, plus a targeted fix for the under-compression bug surfaced by the FROST demo. Under-compression fix (PointReducer): - New burstWindowMs option (default 0, opt-in). When two samples arrive within burstWindowMs of each other, the second is treated as the same wall-clock observation: previous is replaced, slope analysis is skipped. - Without this guard, sub-millisecond bursts (rotatingMachine emits twice per pressure-injection cycle, ~1 ms apart) produced near-vertical apparent slopes that tripped angle-change on every tick — driving cog/efficiency/SEC streams to ~0.6% reduction (i.e. no compression). - With burstWindowMs: 10 in the demo flow, the same streams now compress at 78-93% (verified end-to-end in InfluxDB over a 3-min window). - Editor HTML exposes the new "Burst dt" field with explanatory tooltip. Regression test (test/basic/coresync.basic.test.js): - New "burstWindowMs collapses sub-tick sample bursts into a single observation" test reproduces the exact burst pattern from the demo and asserts before/after behaviour. - Existing 14 tests continue to pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
1.5 KiB
Markdown
35 lines
1.5 KiB
Markdown
# CoreSync Examples
|
|
|
|
## FROST + Influx + Grafana
|
|
|
|
Import `frost-influx-grafana.flow.json` into Node-RED when the local Docker stack is running.
|
|
|
|
The flow demonstrates:
|
|
|
|
- a `measurement` node producing a 1 Hz directional flow signal;
|
|
- a `rotatingMachine` node producing event-driven pump telemetry;
|
|
- raw EVOLV telemetry written to local InfluxDB;
|
|
- CoreSync reducing the same telemetry to knots;
|
|
- CoreSync FROST HTTP requests sent to `https://sta.wbd-rd.nl/FROST-Server/v1.1`;
|
|
- FROST responses looped back into CoreSync as `msg.topic = "frost.response"`;
|
|
- CoreSync knots also written to local InfluxDB as `coresync_knots` for Grafana comparison.
|
|
- a Node-RED dashboard page with live raw-field, knot, FROST observation, and percent-saved counters.
|
|
|
|
Do not store FROST credentials in the flow. Start Node-RED with:
|
|
|
|
```sh
|
|
FROST_USER=write FROST_PASSWORD='<password>' docker compose up -d --build
|
|
```
|
|
|
|
The local InfluxDB and Grafana settings match `docker-compose.yml`:
|
|
|
|
- InfluxDB: `http://localhost:8086`, org `evolv`, bucket `telemetry`, token `evolv-dev-token`
|
|
- Grafana: `http://localhost:3000`, user `admin`, password `evolv`
|
|
|
|
The provisioned Grafana dashboard `CoreSync FROST Demo` compares raw telemetry against the reduced knot stream. The raw samples are intentionally denser than the knot series; the knot series is the data that should be sent to FROST.
|
|
|
|
Runtime dashboards:
|
|
|
|
- Node-RED live counters: `http://localhost:1880/dashboard/coresync-frost`
|
|
- Grafana raw-vs-knot comparison: `http://localhost:3000/d/coresync-frost-demo/coresync-frost-demo`
|