Compare commits

..

1 Commits

Author SHA1 Message Date
znetsixe
e5c98b7d30 removed some old comments, added thresholds for safeguard 2025-11-07 15:09:35 +01:00
4 changed files with 26 additions and 11 deletions

View File

@@ -478,6 +478,30 @@
"min": 0, "min": 0,
"description": "Allowable error between inflow and outflow before adjustments are triggered (m3/h)." "description": "Allowable error between inflow and outflow before adjustments are triggered (m3/h)."
} }
},
"thresholdLowVolume": {
"default": 10,
"rules": {
"type": "number",
"min": 0,
"description": "Volume threshold (%) below which the station will shut down pumps to prevent dry running."
}
},
"thresholdHighVolume": {
"default": 90,
"rules": {
"type": "number",
"min": 0,
"description": "Volume threshold (%) above which the station will trigger high level alarms."
}
},
"timeThreshholdSeconds": {
"default": 120,
"rules": {
"type": "number",
"min": 0,
"description": "Time threshold (seconds) used in volume-based safety checks."
}
} }
}, },
"alarms": { "alarms": {

View File

@@ -180,7 +180,6 @@ async apiCall(node) {
// Only add tagCode to URL if it exists // Only add tagCode to URL if it exists
if (tagCode) { if (tagCode) {
apiUrl += `&asset_tag_number=${tagCode}`; apiUrl += `&asset_tag_number=${tagCode}`;
console.log('hello there');
} }
assetregisterAPI += apiUrl; assetregisterAPI += apiUrl;
@@ -461,10 +460,6 @@ populateModels(
// Store only the metadata for the selected model // Store only the metadata for the selected model
node["modelMetadata"] = modelData.find((model) => model.name === selectedModel); node["modelMetadata"] = modelData.find((model) => model.name === selectedModel);
}); });
/*
console.log('hello here I am:');
console.log(node["modelMetadata"]);
*/
}); });
}) })

View File

@@ -180,7 +180,6 @@ async apiCall(node) {
// Only add tagCode to URL if it exists // Only add tagCode to URL if it exists
if (tagCode) { if (tagCode) {
apiUrl += `&asset_tag_number=${tagCode}`; apiUrl += `&asset_tag_number=${tagCode}`;
console.log('hello there');
} }
assetregisterAPI += apiUrl; assetregisterAPI += apiUrl;
@@ -461,10 +460,7 @@ populateModels(
// Store only the metadata for the selected model // Store only the metadata for the selected model
node["modelMetadata"] = modelData.find((model) => model.name === selectedModel); node["modelMetadata"] = modelData.find((model) => model.name === selectedModel);
}); });
/*
console.log('hello here I am:');
console.log(node["modelMetadata"]);
*/
}); });
}) })

View File

@@ -113,7 +113,7 @@ class Measurement {
// Create a new measurement that is the difference between two positions // Create a new measurement that is the difference between two positions
static createDifference(upstreamMeasurement, downstreamMeasurement) { static createDifference(upstreamMeasurement, downstreamMeasurement) {
console.log('hello:');
if (upstreamMeasurement.type !== downstreamMeasurement.type || if (upstreamMeasurement.type !== downstreamMeasurement.type ||
upstreamMeasurement.variant !== downstreamMeasurement.variant) { upstreamMeasurement.variant !== downstreamMeasurement.variant) {
throw new Error('Cannot calculate difference between different measurement types or variants'); throw new Error('Cannot calculate difference between different measurement types or variants');