From c7d1f7ef9b7405d8aae5277d8731e1350a4bd748 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Tue, 30 Dec 2025 13:19:40 -0600 Subject: [PATCH 1/6] hotfix: increase the pca fan state to 996 pascal (4iwg) from 250 pascal (1iwg), fixed the bug where the sensors tab woul 'convert' the measurment multiple times based on the number of times you went to the tab --- src/gate/GateDevice.tsx | 2 +- src/gate/GateGraphs.tsx | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/gate/GateDevice.tsx b/src/gate/GateDevice.tsx index 9fb414f..f7a8746 100644 --- a/src/gate/GateDevice.tsx +++ b/src/gate/GateDevice.tsx @@ -92,7 +92,7 @@ export default function GateDevice(props: Props) { c.status.measurement[0].values[0] && c.status.measurement[0].values[0].values[1] ) { - setPCAFanOn(c.status.measurement[0].values[0].values[1] > 250); //apx 1 iwg + setPCAFanOn(c.status.measurement[0].values[0].values[1] > 996); //apx 4 iwg } break; default: diff --git a/src/gate/GateGraphs.tsx b/src/gate/GateGraphs.tsx index 911d525..40c47d8 100644 --- a/src/gate/GateGraphs.tsx +++ b/src/gate/GateGraphs.tsx @@ -27,6 +27,7 @@ import React, { useEffect, useState } from "react"; import { avg } from "utils"; import GateFlowGraph from "./GateFlowGraph"; import { makeStyles } from "@mui/styles"; +import { cloneDeep } from "lodash"; interface Props { gate: Gate; @@ -245,7 +246,9 @@ export default function GateGraphs(props: Props) { const graphHeader = (comp: Component) => { const componentIcon = GetComponentIcon(comp.settings.type, comp.settings.subtype, themeType); - + console.log(comp) + let measurement = cloneDeep(comp.status.measurement) + let umArray = measurement.map(um => UnitMeasurement.create(um, user)) return ( UnitMeasurement.create(um, user)) ?? [] - )} + reading={UnitMeasurement.convertLastMeasurement(umArray)} /> } /> From d9bcd07c8dbfda98946a2c0306374dd7470d1ed7 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Mon, 5 Jan 2026 11:27:49 -0600 Subject: [PATCH 2/6] changing the humidity/moisture part of the bin card to only display the average and the high, low, average selector only changes the temp part --- src/bin/BinCardV2.tsx | 60 ++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/src/bin/BinCardV2.tsx b/src/bin/BinCardV2.tsx index a4afc33..776af57 100644 --- a/src/bin/BinCardV2.tsx +++ b/src/bin/BinCardV2.tsx @@ -261,32 +261,39 @@ export default function BinCard(props: Props) { let val; let useEMC = false; - switch (valDisplay) { - case "average": - if (average?.emc) { - useEMC = true; - val = average.emc; - } else { - val = average?.humid; - } - break; - case "low": - if (coldNode?.emc) { - useEMC = true; - val = coldNode.emc; - } else { - val = coldNode?.humid; - } - break; - case "high": - if (hotNode?.emc) { - useEMC = true; - val = hotNode.emc; - } else { - val = hotNode?.humid; - } - break; + //taking the switch cases out so that the node always displays the average for the moisture/humidity + if (average?.emc) { + useEMC = true; + val = average.emc; + } else { + val = average?.humid; } + // switch (valDisplay) { + // case "average": + // if (average?.emc) { + // useEMC = true; + // val = average.emc; + // } else { + // val = average?.humid; + // } + // break; + // case "low": + // if (coldNode?.emc) { + // useEMC = true; + // val = coldNode.emc; + // } else { + // val = coldNode?.humid; + // } + // break; + // case "high": + // if (hotNode?.emc) { + // useEMC = true; + // val = hotNode.emc; + // } else { + // val = hotNode?.humid; + // } + // break; + // } if (val !== undefined && !isNaN(val)) { display = val.toFixed(2); @@ -332,7 +339,8 @@ export default function BinCard(props: Props) { color="textSecondary" noWrap style={{ fontSize: "0.5rem" }}> - {valDisplay === "high" ? "High" : valDisplay === "low" ? "Low" : "Average"} + {/* {valDisplay === "high" ? "High" : valDisplay === "low" ? "Low" : "Average"} */} + Average From dd46c2ece368eab6fdb53610ad09778d21784f6a Mon Sep 17 00:00:00 2001 From: Carter Date: Tue, 6 Jan 2026 11:25:15 -0600 Subject: [PATCH 3/6] merged staging and switched to master proto --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc7a1ac..ee0e9b7 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "mui-tel-input": "^7.0.0", "notistack": "^3.0.1", "openweathermap-ts": "^1.2.10", - "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#staging", + "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#master", "query-string": "^9.2.1", "react": "^18.3.1", "react-beautiful-dnd": "^13.1.1", From 4342e1f27bde4536cf1d48b0fc0e11905063ab3d Mon Sep 17 00:00:00 2001 From: csawatzky Date: Thu, 15 Jan 2026 15:51:56 -0600 Subject: [PATCH 4/6] some hotfixes for construction so that the url navigation is correct when clicking on a card and an undefined error when loading heater data --- package-lock.json | 2 +- src/common/DeviceLinkDrawer.tsx | 9 ++------- src/objectHeater/ObjectHeaterCard.tsx | 4 ++-- src/pages/Site.tsx | 4 ++-- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index abf6c85..799a746 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10953,7 +10953,7 @@ }, "node_modules/protobuf-ts": { "version": "1.0.0", - "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#c08965a296f2cd0799472fd8b163186cf6885d4c", + "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#a646dbd472f266154f8c5f44146e0b27ccdda28f", "dependencies": { "protobufjs": "^6.8.8" } diff --git a/src/common/DeviceLinkDrawer.tsx b/src/common/DeviceLinkDrawer.tsx index b01113c..e5d6fd8 100644 --- a/src/common/DeviceLinkDrawer.tsx +++ b/src/common/DeviceLinkDrawer.tsx @@ -21,6 +21,7 @@ import { pond } from "protobuf-ts/pond"; import React, { useEffect, useState } from "react"; import { makeStyles } from "@mui/styles"; import { useGlobalState } from "providers"; +import { getContextKeys, getContextTypes } from "pbHelpers/Context"; interface TabPanelProps { children?: React.ReactNode; @@ -116,13 +117,7 @@ export default function DeviceLinkDrawer(props: Props) { undefined, undefined, undefined, - true, - undefined, - undefined, - undefined, - undefined, - undefined, - as + true ) .then(resp => { let devMap = new Map(); diff --git a/src/objectHeater/ObjectHeaterCard.tsx b/src/objectHeater/ObjectHeaterCard.tsx index 651ae7c..92e899e 100644 --- a/src/objectHeater/ObjectHeaterCard.tsx +++ b/src/objectHeater/ObjectHeaterCard.tsx @@ -109,7 +109,7 @@ export default function ObjectHeaterCard(props: Props) { }); } } - if (heaterData.devices[0]) { + if (heaterData.devices && heaterData.devices[0]) { setConnectedDevice(Device.any(heaterData.devices[0].device)); heaterData.devices[0].components.forEach(c => { //loop through the components and assign them accordingly @@ -171,7 +171,7 @@ export default function ObjectHeaterCard(props: Props) { const goToHeater = () => { //history.push("/objectHeaters/" + heater.key); - let path = "/objectHeaters/" + heater.key; + let path = "/heaters/" + heater.key; navigate(path, { state: {heater: heater} }); }; diff --git a/src/pages/Site.tsx b/src/pages/Site.tsx index 2685f4d..b09de66 100644 --- a/src/pages/Site.tsx +++ b/src/pages/Site.tsx @@ -56,8 +56,8 @@ export default function Site() { siteAPI .getSitePage(siteKey, as) .then(resp => { - setSite(ISite.any(resp.data.site)); - setHeaters(resp.data.heaterData); + if(resp.data.site) setSite(ISite.any(resp.data.site)); + if(resp.data.heaterData) setHeaters(resp.data.heaterData); setLoadingSite(false); }) .catch(err => { From 8d6f6517fbe99ea99cca7b7702281f7e91c388be Mon Sep 17 00:00:00 2001 From: csawatzky Date: Thu, 15 Jan 2026 15:53:02 -0600 Subject: [PATCH 5/6] proto update --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0e25c26..799a746 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "mui-tel-input": "^7.0.0", "notistack": "^3.0.1", "openweathermap-ts": "^1.2.10", - "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#staging", + "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#master", "query-string": "^9.2.1", "react": "^18.3.1", "react-beautiful-dnd": "^13.1.1", @@ -10953,7 +10953,7 @@ }, "node_modules/protobuf-ts": { "version": "1.0.0", - "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#3f647071f211c4552c2acc23a8ecabb6904a4156", + "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#a646dbd472f266154f8c5f44146e0b27ccdda28f", "dependencies": { "protobufjs": "^6.8.8" } From 3a89c3b1918d990d25863ade111c918449f0cf90 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Mon, 19 Jan 2026 09:57:40 -0600 Subject: [PATCH 6/6] hitfix for the greater than operator not being flipped for display on a node diff subtype where node one is higher than node 2 the operators and value need to be 'flipped' since that is how the interactions are stored example: node 2 -> node 1 the user enters greater than 10 then what is sent down for the interaction is if node 2 minus node 1 is less than -10 so the display needs to flip them back to 'greater than' and +10 --- src/pages/Device.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Device.tsx b/src/pages/Device.tsx index ee4ae56..d96a05c 100644 --- a/src/pages/Device.tsx +++ b/src/pages/Device.tsx @@ -131,7 +131,7 @@ export default function DevicePage() { //flip operator and send negative comparitor to save interaction.settings.conditions.forEach(condition => { //coming back from the backend as a string for some reason - if (condition.comparison.toString() === "RELATIONAL_OPERATOR_GREATER_THAN") { + if (condition.comparison === quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN) { condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_LESS_THAN; } else { condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN;