Pumping-station demo overhaul + cross-node test harness + bumps
Some checks failed
CI / lint-and-test (push) Has been cancelled
Some checks failed
CI / lint-and-test (push) Has been cancelled
Submodule bumps land the deadlock fix (state.js residue unpark + MGC optimalControl dispatch reorder) and pumpingStation stopLevel hysteresis. - Renames examples/pumpingstation-3pumps-dashboard → pumpingstation-complete-example with regenerated flow.json. New dashboard groups, demand-broadcast wiring, S88 placement rule applied, ui-chart trend-split and link-channel naming follow .claude/rules/node-red-flow-layout.md. - New cross-node test harness under test/: end-to-end-pumpingstation drives PS + MGC + 3 pumps + physics simulator end-to-end and verifies the ~5/15 min cycle. - Adds Grafana provisioning dashboards (pumping-station.json) and a helper sync-example.sh script for export/import to live Node-RED. - Docker entrypoint + settings + compose tweaks for the persistent user dir layout used by the demo. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -63,18 +63,90 @@ npm install --no-save "$EVOLV_DIR" 2>/dev/null || {
|
||||
echo "[entrypoint] EVOLV nodes installed into Node-RED user dir."
|
||||
|
||||
# -------------------------------------------------------
|
||||
# 4. Deploy demo flow if no user flow exists yet
|
||||
# 4. Bootstrap Node-RED projects from examples/
|
||||
#
|
||||
# Each examples/<name>/ becomes a project under /data/projects/<name>/.
|
||||
# The Projects feature (settings.js) needs each project to be a Git
|
||||
# repo, so we git-init each on first copy. After that the projects
|
||||
# live in the persistent nodered_data volume.
|
||||
#
|
||||
# Default project: pumpingstation-complete-example (settable via
|
||||
# DEFAULT_PROJECT env var).
|
||||
# -------------------------------------------------------
|
||||
PROJECTS_DIR="/data/projects"
|
||||
DEFAULT_PROJECT="${DEFAULT_PROJECT:-pumpingstation-complete-example}"
|
||||
mkdir -p "$PROJECTS_DIR"
|
||||
|
||||
if [ -d "$EVOLV_DIR/examples" ]; then
|
||||
for src in "$EVOLV_DIR/examples"/*/; do
|
||||
[ -d "$src" ] || continue
|
||||
name=$(basename "$src")
|
||||
dst="$PROJECTS_DIR/$name"
|
||||
if [ -d "$dst" ]; then
|
||||
echo "[entrypoint] Project '$name' already exists in /data/projects, skipping bootstrap."
|
||||
continue
|
||||
fi
|
||||
echo "[entrypoint] Bootstrapping project '$name'..."
|
||||
cp -r "$src" "$dst"
|
||||
|
||||
# Synthesize a Node-RED project package.json so the project is
|
||||
# recognised even when the source folder doesn't have one.
|
||||
if [ ! -f "$dst/package.json" ]; then
|
||||
cat > "$dst/package.json" << PKGJSON
|
||||
{
|
||||
"name": "$name",
|
||||
"description": "EVOLV example: $name",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"node-red": {
|
||||
"settings": {
|
||||
"flowFile": "flow.json",
|
||||
"credentialsFile": "flow_cred.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
PKGJSON
|
||||
fi
|
||||
|
||||
# Git init + initial commit (Node-RED projects require Git).
|
||||
if [ ! -d "$dst/.git" ]; then
|
||||
(
|
||||
cd "$dst" && \
|
||||
git init -q -b main && \
|
||||
git config user.email "evolv-dev@local" && \
|
||||
git config user.name "EVOLV Dev" && \
|
||||
git add . && \
|
||||
git commit -q -m "Bootstrap project $name from examples/" || true
|
||||
)
|
||||
fi
|
||||
echo "[entrypoint] Project '$name' ready at $dst"
|
||||
done
|
||||
fi
|
||||
|
||||
# -------------------------------------------------------
|
||||
# 4b. Set the active project (Node-RED's projects state lives in
|
||||
# /data/.config.projects.json). Only set on first run; subsequent
|
||||
# boots respect the operator's last selection in the editor.
|
||||
# -------------------------------------------------------
|
||||
PROJ_STATE="/data/.config.projects.json"
|
||||
if [ ! -f "$PROJ_STATE" ] && [ -d "$PROJECTS_DIR/$DEFAULT_PROJECT" ]; then
|
||||
echo "[entrypoint] Setting active project = $DEFAULT_PROJECT"
|
||||
cat > "$PROJ_STATE" << JSON
|
||||
{
|
||||
"activeProject": "$DEFAULT_PROJECT",
|
||||
"projects": {
|
||||
"$DEFAULT_PROJECT": {}
|
||||
}
|
||||
}
|
||||
JSON
|
||||
fi
|
||||
|
||||
# Legacy demo-flow.json fallback — kept for the no-projects case if a
|
||||
# user flips projects.enabled = false in settings.js.
|
||||
DEMO_FLOW="$EVOLV_DIR/docker/demo-flow.json"
|
||||
FLOW_FILE="/data/flows.json"
|
||||
|
||||
if [ -f "$DEMO_FLOW" ]; then
|
||||
# Deploy demo flow if flows.json is missing or is the default stub
|
||||
if [ ! -f "$FLOW_FILE" ] || grep -q "WARNING: please check" "$FLOW_FILE" 2>/dev/null; then
|
||||
echo "[entrypoint] Deploying demo flow..."
|
||||
cp "$DEMO_FLOW" "$FLOW_FILE"
|
||||
echo "[entrypoint] Demo flow deployed to $FLOW_FILE"
|
||||
fi
|
||||
if [ -f "$DEMO_FLOW" ] && [ ! -f "$FLOW_FILE" ]; then
|
||||
cp "$DEMO_FLOW" "$FLOW_FILE"
|
||||
fi
|
||||
|
||||
# -------------------------------------------------------
|
||||
|
||||
14
docker/grafana/provisioning/dashboards/dashboards.yaml
Normal file
14
docker/grafana/provisioning/dashboards/dashboards.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: EVOLV
|
||||
orgId: 1
|
||||
folder: EVOLV
|
||||
type: file
|
||||
disableDeletion: false
|
||||
editable: true
|
||||
updateIntervalSeconds: 10
|
||||
allowUiUpdates: true
|
||||
options:
|
||||
path: /etc/grafana/provisioning/dashboards
|
||||
foldersFromFilesStructure: false
|
||||
435
docker/grafana/provisioning/dashboards/pumping-station.json
Normal file
435
docker/grafana/provisioning/dashboards/pumping-station.json
Normal file
@@ -0,0 +1,435 @@
|
||||
{
|
||||
"annotations": { "list": [] },
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"refresh": "5s",
|
||||
"schemaVersion": 39,
|
||||
"style": "dark",
|
||||
"tags": ["evolv", "pumping-station"],
|
||||
"templating": { "list": [] },
|
||||
"time": { "from": "now-15m", "to": "now" },
|
||||
"timepicker": {},
|
||||
"timezone": "browser",
|
||||
"title": "EVOLV — Pumping Station (complete)",
|
||||
"uid": "evolv-ps-complete",
|
||||
"version": 1,
|
||||
"weekStart": "",
|
||||
"panels": [
|
||||
{
|
||||
"type": "row",
|
||||
"id": 100,
|
||||
"title": "Realtime",
|
||||
"collapsed": false,
|
||||
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
|
||||
"panels": []
|
||||
},
|
||||
{
|
||||
"type": "gauge",
|
||||
"id": 1,
|
||||
"title": "Basin level",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 7, "w": 6, "x": 0, "y": 1 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "lengthm",
|
||||
"min": 0,
|
||||
"max": 4,
|
||||
"decimals": 2,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "red", "value": null },
|
||||
{ "color": "orange", "value": 1 },
|
||||
{ "color": "blue", "value": 2 },
|
||||
{ "color": "orange", "value": 3.5 },
|
||||
{ "color": "red", "value": 3.8 }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"showThresholdLabels": false,
|
||||
"showThresholdMarkers": true,
|
||||
"orientation": "auto",
|
||||
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -2m)\n |> filter(fn: (r) => r._measurement == \"Pumping Station\")\n |> filter(fn: (r) => r._field == \"level.predicted.atequipment.default\")\n |> last()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "gauge",
|
||||
"id": 2,
|
||||
"title": "Basin fill",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 7, "w": 6, "x": 6, "y": 1 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "percent",
|
||||
"min": 0,
|
||||
"max": 100,
|
||||
"decimals": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "red", "value": null },
|
||||
{ "color": "orange", "value": 10 },
|
||||
{ "color": "green", "value": 30 },
|
||||
{ "color": "orange", "value": 80 },
|
||||
{ "color": "red", "value": 95 }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"showThresholdMarkers": true,
|
||||
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -2m)\n |> filter(fn: (r) => r._measurement == \"Pumping Station\")\n |> filter(fn: (r) => r._field == \"volumePercent.predicted.atequipment.default\")\n |> last()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"id": 3,
|
||||
"title": "Total flow (MGC)",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 7, "w": 6, "x": 12, "y": 1 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "m³/h",
|
||||
"decimals": 1,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "gray", "value": null },
|
||||
{ "color": "blue", "value": 50 },
|
||||
{ "color": "green", "value": 200 }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
||||
"colorMode": "background",
|
||||
"graphMode": "area"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -2m)\n |> filter(fn: (r) => r._measurement == \"MGC — Pump Group\")\n |> filter(fn: (r) => r._field =~ /^flow\\.predicted\\.atequipment\\./)\n |> last()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"id": 4,
|
||||
"title": "Total power (MGC)",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 7, "w": 6, "x": 18, "y": 1 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "kwatt",
|
||||
"decimals": 2,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "gray", "value": null },
|
||||
{ "color": "blue", "value": 1 },
|
||||
{ "color": "green", "value": 5 },
|
||||
{ "color": "orange", "value": 20 }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
||||
"colorMode": "background",
|
||||
"graphMode": "area"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -2m)\n |> filter(fn: (r) => r._measurement == \"MGC — Pump Group\")\n |> filter(fn: (r) => r._field =~ /^power\\.predicted\\.atequipment\\./)\n |> last()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"id": 5,
|
||||
"title": "Pump A — state",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 4, "w": 8, "x": 0, "y": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{ "type": "value", "options": { "operational": { "color": "green", "text": "OPERATIONAL" } } },
|
||||
{ "type": "value", "options": { "starting": { "color": "blue", "text": "STARTING" } } },
|
||||
{ "type": "value", "options": { "stopping": { "color": "orange", "text": "STOPPING" } } },
|
||||
{ "type": "value", "options": { "idle": { "color": "gray", "text": "IDLE" } } }
|
||||
],
|
||||
"color": { "mode": "thresholds" },
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "gray", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "colorMode": "background", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -5m)\n |> filter(fn: (r) => r._measurement == \"rotatingmachine_pump_a\")\n |> filter(fn: (r) => r._field == \"state\")\n |> last()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"id": 6,
|
||||
"title": "Pump B — state",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 4, "w": 8, "x": 8, "y": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{ "type": "value", "options": { "operational": { "color": "green", "text": "OPERATIONAL" } } },
|
||||
{ "type": "value", "options": { "starting": { "color": "blue", "text": "STARTING" } } },
|
||||
{ "type": "value", "options": { "stopping": { "color": "orange", "text": "STOPPING" } } },
|
||||
{ "type": "value", "options": { "idle": { "color": "gray", "text": "IDLE" } } }
|
||||
],
|
||||
"color": { "mode": "thresholds" },
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "gray", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "colorMode": "background", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -5m)\n |> filter(fn: (r) => r._measurement == \"rotatingmachine_pump_b\")\n |> filter(fn: (r) => r._field == \"state\")\n |> last()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "stat",
|
||||
"id": 7,
|
||||
"title": "Pump C — state",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 4, "w": 8, "x": 16, "y": 8 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{ "type": "value", "options": { "operational": { "color": "green", "text": "OPERATIONAL" } } },
|
||||
{ "type": "value", "options": { "starting": { "color": "blue", "text": "STARTING" } } },
|
||||
{ "type": "value", "options": { "stopping": { "color": "orange", "text": "STOPPING" } } },
|
||||
{ "type": "value", "options": { "idle": { "color": "gray", "text": "IDLE" } } }
|
||||
],
|
||||
"color": { "mode": "thresholds" },
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "gray", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "colorMode": "background", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -5m)\n |> filter(fn: (r) => r._measurement == \"rotatingmachine_pump_c\")\n |> filter(fn: (r) => r._field == \"state\")\n |> last()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "row",
|
||||
"id": 200,
|
||||
"title": "Historic",
|
||||
"collapsed": false,
|
||||
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 12 },
|
||||
"panels": []
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"id": 10,
|
||||
"title": "Basin — level (m) and fill (%)",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 13 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 8,
|
||||
"spanNulls": true
|
||||
},
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": [
|
||||
{ "matcher": { "id": "byName", "options": "level (m)" },
|
||||
"properties": [{ "id": "unit", "value": "lengthm" }, { "id": "color", "value": { "mode": "fixed", "fixedColor": "blue" } }] },
|
||||
{ "matcher": { "id": "byName", "options": "fill (%)" },
|
||||
"properties": [{ "id": "unit", "value": "percent" }, { "id": "color", "value": { "mode": "fixed", "fixedColor": "green" } }] }
|
||||
]
|
||||
},
|
||||
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"Pumping Station\")\n |> filter(fn: (r) => r._field == \"level.predicted.atequipment.default\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"_field\", value: \"level (m)\")"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"Pumping Station\")\n |> filter(fn: (r) => r._field == \"volumePercent.predicted.atequipment.default\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n |> set(key: \"_field\", value: \"fill (%)\")"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"id": 11,
|
||||
"title": "Inflow / Outflow / Net flow (m³/h)",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 21 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "m³/h",
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 5,
|
||||
"spanNulls": true
|
||||
},
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement == \"Pumping Station\")\n |> filter(fn: (r) => r._field =~ /^flow\\.predicted\\.(in|out)\\./ or r._field == \"netFlowRate.predicted.atequipment.default\")\n |> map(fn: (r) => ({ r with _value: r._value * 3600.0 }))\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"id": 12,
|
||||
"title": "Per-pump flow (m³/h) — predicted",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 29 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "m³/h",
|
||||
"custom": { "drawStyle": "line", "lineInterpolation": "smooth", "fillOpacity": 5, "spanNulls": true },
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement =~ /^rotatingmachine_/)\n |> filter(fn: (r) => r._field =~ /^flow\\.predicted\\.downstream\\./)\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"id": 13,
|
||||
"title": "Per-pump power (kW) — predicted",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 29 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "kwatt",
|
||||
"custom": { "drawStyle": "line", "lineInterpolation": "smooth", "fillOpacity": 5, "spanNulls": true },
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement =~ /^rotatingmachine_/)\n |> filter(fn: (r) => r._field =~ /^power\\.predicted\\.atequipment\\./)\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"id": 14,
|
||||
"title": "Per-pump pressures (mbar) — sensors",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 37 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "pressuremmbar",
|
||||
"custom": { "drawStyle": "line", "lineInterpolation": "smooth", "fillOpacity": 3, "spanNulls": true },
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement =~ /-(Up|Dn)$/)\n |> filter(fn: (r) => r._field == \"mAbs\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"id": 15,
|
||||
"title": "Per-pump sensor flow (m³/h) — measured",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 45 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "m³/h",
|
||||
"custom": { "drawStyle": "line", "lineInterpolation": "smooth", "fillOpacity": 5, "spanNulls": true },
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement =~ /-Flow$/)\n |> filter(fn: (r) => r._field == \"mAbs\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"id": 16,
|
||||
"title": "Per-pump sensor power (kW) — measured",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 45 },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "kwatt",
|
||||
"custom": { "drawStyle": "line", "lineInterpolation": "smooth", "fillOpacity": 5, "spanNulls": true },
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
}
|
||||
},
|
||||
"options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } },
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"datasource": { "type": "influxdb", "uid": "cdzg44tv250jkd" },
|
||||
"query": "from(bucket: \"telemetry\")\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n |> filter(fn: (r) => r._measurement =~ /-Pwr$/)\n |> filter(fn: (r) => r._field == \"mAbs\")\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,10 +15,22 @@ module.exports = {
|
||||
// No authentication for dev environment
|
||||
adminAuth: null,
|
||||
|
||||
// Disable projects (we use git directly)
|
||||
// Projects ON: each example folder under /data/projects is a Node-RED
|
||||
// project (a small Git repo). Operator switches between them in the
|
||||
// editor (Projects → Open Project). The entrypoint bootstraps every
|
||||
// examples/<name>/ into /data/projects/<name>/ on first run; after
|
||||
// that, edits live in the persistent nodered_data volume. To copy
|
||||
// edits back into the EVOLV source tree, run:
|
||||
// docker cp evolv-nodered:/data/projects/<name>/flow.json \
|
||||
// examples/<name>/flow.json
|
||||
editorTheme: {
|
||||
projects: {
|
||||
enabled: false
|
||||
enabled: true,
|
||||
workflow: {
|
||||
// Manual: editor doesn't auto-commit. Use the Projects UI
|
||||
// (or `git` from a shell into the container) to commit.
|
||||
mode: 'manual'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user