Compare commits

...
Sign in to create a new pull request.

94 commits

Author SHA1 Message Date
Carter
462409f2f4 Merge branch 'werk' into dev_environment 2026-07-21 12:00:17 -06:00
Carter
48a4750510 Merge branch 'werk' into dev_environment 2026-07-20 16:11:23 -06:00
Carter
d213293927 Merge branch 'master' into dev_environment 2026-07-16 13:00:28 -06:00
Carter
9216d5ee27 updated dev protobuf 2026-07-09 13:42:36 -06:00
Carter
637c0faa35 Merge branch 'tag_fix3' into dev_environment 2026-07-09 11:59:03 -06:00
Carter
1eb00fd5a1 Merge branch 'tag_fix3' into dev_environment 2026-07-08 15:56:13 -06:00
Carter
62cc25d775 Merge branch 'pending_changes' into dev_environment 2026-07-07 15:56:31 -06:00
Carter
d6603e394e Merge branch 'new_header' into dev_environment 2026-06-30 09:44:11 -06:00
Carter
840c3b0126 Merge branch 'pending_changes' into dev_environment 2026-06-25 12:33:23 -06:00
Carter
2992121744 Merge branch 'pending_changes' into dev_environment 2026-06-24 14:40:10 -06:00
Carter
b92768a954 Merge branch 'pending_changes' into dev_environment 2026-06-24 14:17:01 -06:00
Carter
e1a4443a38 merged pending changes branch 2026-06-24 13:14:42 -06:00
csawatzky
0cc8a7878a Merge branch 'dev_environment' of gitlab.com:brandx/bxt-app into dev_environment 2026-06-19 13:44:53 -06:00
csawatzky
f99f30a15e protobuf update 2026-06-19 13:43:14 -06:00
csawatzky
6ef69f8b98 Merge branch 'plenum_ambient_component' into dev_environment 2026-06-19 13:43:00 -06:00
csawatzky
d69d8b38f5 set up the new component types 2026-06-19 13:25:12 -06:00
Carter
935ee2c587 updated dev proto 2026-06-17 16:30:18 -06:00
Carter
376dcff7db Merge branch 'firmware_mismatch' into dev_environment 2026-06-17 16:19:53 -06:00
Carter
ca2d1e3331 Merge branch 'firmware_mismatch' into dev_environment 2026-06-17 15:41:45 -06:00
Carter
19c4725991 merge email control and updated proto 2026-06-17 14:19:06 -06:00
csawatzky
572d1001f8 proto update 2026-06-12 15:00:45 -06:00
csawatzky
1d98035297 Merge branch 'analog_pressure_component' into dev_environment 2026-06-12 15:00:11 -06:00
Carter
8c45dbd00e merged sendgrid whitelabel 2026-06-11 13:58:37 -06:00
Carter
6acfa3c365 Merge branch 'sidebar_changes' into dev_environment 2026-06-09 10:20:54 -06:00
Carter
51f86188a3 Merge branch 'sidebar_changes' into dev_environment 2026-06-09 10:06:47 -06:00
Carter
0661ddf4ea Merge branch 'staging_environment' into dev_environment 2026-06-05 13:56:30 -06:00
Carter
6991e566c5 Merge branch 'tag_fix' into dev_environment 2026-05-26 10:12:38 -06:00
Carter
73ad9c6816 Merge branch 'local_server' into dev_environment 2026-05-25 12:25:35 -06:00
Carter
6971613105 Merge branch 'local_server' into dev_environment 2026-05-21 12:54:44 -06:00
Carter
e812c878f2 Merge branch 'local_server' into dev_environment 2026-05-21 12:34:52 -06:00
Carter
7df21bd9e0 Merge branch 'local_server' into dev_environment 2026-05-20 13:36:24 -06:00
Carter
72a43c8aa7 Merge branch 'import_warnings' into dev_environment 2026-05-19 13:50:12 -06:00
csawatzky
55a8c12a71 for got to save the device availability 2026-04-21 16:11:43 -06:00
csawatzky
c92c4d392d Merge branch 'analog_pressure_component' into dev_environment 2026-04-21 15:44:11 -06:00
Carter
473510e205 merge socket bug fix from staging and accepted incoming changes 2026-03-23 11:07:03 -06:00
Carter
dc8b2617e6 merge web socket changes 2026-03-20 12:35:09 -06:00
Carter
8ecb9e0ca0 back ported staging, switch to dev proto, updated proto 2026-03-19 13:57:30 -06:00
Carter
f313979655 merged responsive styling and updated dev proto 2026-03-16 15:01:44 -06:00
Carter
834bd518c1 made the pulse box animation look nice by starting the pulse from behind the box that it's pulsing 2026-03-16 14:49:28 -06:00
Carter
575c84246c gave the pulse box better animation pacing so the colors don't change in the middle of a pulse 2026-03-16 14:41:18 -06:00
Carter
62763dd291 overlay overflow hidden so it stops affecting the scroll bar 2026-03-16 14:24:21 -06:00
Carter
141ece8a3e overlay overflow hidden so it stops affecting the scroll bar 2026-03-16 14:15:17 -06:00
Carter
0f87a0b840 adjusting column sizes will now make the table bigger or smaller if it has to 2026-03-16 14:10:47 -06:00
Carter
b7c2b736f0 Merge branch 'devices_websocket' into dev_environment 2026-03-13 15:57:46 -06:00
Carter
9e921cb39d Merge branch 'devices_websocket' into dev_environment 2026-03-13 15:37:49 -06:00
Carter
55ae922e09 merged device dashboard status stuff with websockets 2026-03-13 13:44:51 -06:00
Carter
e5cb66c572 merge web socket again :) 2026-03-06 13:06:17 -06:00
Carter
06c26f3262 merged websocket implementation 2026-03-06 12:58:22 -06:00
Carter
f385842208 Merge branch 'messages_overhaul' into dev_environment 2026-02-25 15:20:16 -06:00
Carter
13e2f689e9 merged in messages changes 2026-02-24 13:01:21 -06:00
Carter
799b5889ef switched to dev proto 2026-02-20 16:06:57 -06:00
Carter
e387ef5aaf ran npm install to fix the push 2026-02-20 16:04:57 -06:00
Carter
e7e951dca3 merged tidio and accepted incoming changes 2026-02-20 15:58:58 -06:00
Carter
98f688673b changed html in vite 2026-01-19 11:31:18 -06:00
Carter
551d9d0810 got rid of indexv2 in vite config 2026-01-16 16:55:00 -06:00
Carter
c7c2625347 removing default conf file to prevent nginx issues 2026-01-16 15:49:48 -06:00
Carter
6d85f2462c Merge branch 'tidio' into dev_environment 2025-12-22 15:42:00 -06:00
Carter
98a28ba30d Merge branch 'tidio' into dev_environment 2025-12-22 11:55:35 -06:00
csawatzky
1ad0f26af8 Merge branch 'hdc302_component' into dev_environment 2025-12-19 13:49:01 -06:00
csawatzky
da1c7af929 set the offset for the temp humidity address 2025-12-19 13:40:56 -06:00
csawatzky
971355d424 set up the new component for temp humidity 2025-12-19 13:34:10 -06:00
csawatzky
709d86eef1 Merge branch 'custom_grain' into dev_environment 2025-12-18 14:42:39 -06:00
Carter
429549a305 Merge branch 'tidio' into dev_environment 2025-12-17 14:32:34 -06:00
Carter
f3ec3b9402 merged tidio 2025-12-15 13:45:19 -06:00
csawatzky
b18b84f83c missed the actual adding of the condition logic 2025-11-20 11:26:26 -06:00
csawatzky
c92311bef6 Merge branch 'staging_environment' into dev_environment 2025-11-20 11:08:32 -06:00
csawatzky
d255f6ada6 changing the firmware version to 10 since 9 will now be for increasing the max conditions on interactions to 4 2025-11-20 10:29:13 -06:00
Carter
f9a1329efd Merge branch 'dev_environment' of gitlab.com:brandx/bxt-app into dev_environment 2025-11-13 16:04:47 -06:00
Carter
f1ec343fd2 Merge branch 'contract_page_load' into dev_environment 2025-11-13 16:04:31 -06:00
csawatzky
19aefc8774 Merge branch 'reverse_nodes' into dev_environment, also increased the one wire scan feature to 2.1.9 2025-11-13 11:34:52 -06:00
Carter
4ffcc06dd6 Merge branch 'contract_page_load' into dev_environment 2025-11-13 10:56:13 -06:00
Carter
4c5c9ba8be merged contracts page fix 2025-11-10 13:07:40 -06:00
csawatzky
25bce682ad Merge branch 'onewire_detect' into dev_environment 2025-11-04 14:31:48 -06:00
csawatzky
ff5d90a635 Merge branch 'onewire_detect' into dev_environment 2025-11-03 13:37:02 -06:00
Carter
b63724fbfd Merge branch 'dev_environment' of gitlab.com:brandx/bxt-app into dev_environment 2025-10-29 11:03:33 -06:00
Carter
b458dea3b1 Merge branch 'chat_timestamp' into dev_environment 2025-10-29 11:03:18 -06:00
csawatzky
3825d56aff fix for the mV decimals on drager sensors, there shouldn't be any 2025-10-28 09:34:40 -06:00
csawatzky
de526ddeb4 fix for drager voltage when it is an o2 subtype showing incorrectly on the chart 2025-10-28 09:26:46 -06:00
Carter
92d4892c65 merged timestamped status stuff 2025-10-22 11:24:50 -06:00
Carter
d0f74cbc4e Merge branch 'dev_environment' of gitlab.com:brandx/bxt-app into dev_environment 2025-10-21 12:30:43 -06:00
Carter
deb3fabd45 Merge branch 'access_object' into dev_environment 2025-10-21 12:30:35 -06:00
csawatzky
cd95f01142 getting the drager components that are using I2C to use the expander and not the cable id 2025-10-20 14:15:38 -06:00
Carter
58bbf07690 thing 2025-10-15 13:40:13 -06:00
csawatzky
37b1a1fade Merge branch 'i2c_detect' into dev_environment 2025-10-07 12:44:07 -06:00
csawatzky
732b3d2ab0 fixing the i2c sensors card erroring out when coming back to the page from support view 2025-08-28 11:58:51 -06:00
csawatzky
78e51ac797 fixed issue where the scan card would not appear if you navigate to the device page by any way other than the devices table 2025-08-27 16:58:49 -06:00
csawatzky
a9b9c0c33d Merge branch 'i2c_detect' into dev_environment 2025-08-27 16:45:41 -06:00
Carter
15aeb887ed merged cache buster and accepted current changes 2025-08-21 14:36:07 -06:00
csawatzky
233150006c Merge branch 'staging_environment' into dev_environment 2025-08-20 16:14:23 -06:00
csawatzky
4115495f65 expanding the json so the new scd30 co2 subtype has the modes in it 2025-08-20 16:05:41 -06:00
csawatzky
efc6fb4014 making sure to use the dev protobuf 2025-08-13 10:21:25 -06:00
csawatzky
a1ef6ea89b Merge branch 'libracart' into dev_environment 2025-08-13 10:20:47 -06:00
Saiyida Noor
27a8cc35e4 Merge branch 'libracart' into 'dev_environment'
minor updates

See merge request brandx/bxt-app!2
2025-08-06 17:08:59 +00:00
Saiyida Noor
5f13300ba6 minor updates 2025-08-06 17:08:58 +00:00
16 changed files with 357 additions and 31 deletions

View file

@ -1,5 +1,6 @@
# Used in the build stage of the pipeline to create a frontend docker image # Used in the build stage of the pipeline to create a frontend docker image
FROM nginx:alpine FROM nginx:alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/nginx.conf COPY nginx.conf /etc/nginx/nginx.conf
COPY /build /usr/share/nginx/html COPY /build /usr/share/nginx/html

View file

@ -1,20 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/x-icon" id="favicon-link" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title id="title-id">Adaptive Dashboard</title>
<link rel="manifest" id="manifest-link" />
</head>
<script>
window.CRISP_RUNTIME_CONFIG = {
session_merge: true
};
</script>
<script type="text/javascript">window.$crisp=[];window.CRISP_WEBSITE_ID="80170383-b426-43c0-8f66-8e20a05bcdce";(function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();</script>
<body>
<div id="root"></div>
<script type="module" src="/src/app/main.tsx"></script>
</body>
</html>

4
package-lock.json generated
View file

@ -46,7 +46,7 @@
"mui-tel-input": "^7.0.0", "mui-tel-input": "^7.0.0",
"notistack": "^3.0.1", "notistack": "^3.0.1",
"openweathermap-ts": "^1.2.10", "openweathermap-ts": "^1.2.10",
"protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#master", "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#dev",
"query-string": "^9.2.1", "query-string": "^9.2.1",
"react": "^18.3.1", "react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1", "react-beautiful-dnd": "^13.1.1",
@ -11830,7 +11830,7 @@
}, },
"node_modules/protobuf-ts": { "node_modules/protobuf-ts": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#d6a992e46192a8ab8195235357318dc297738064", "resolved": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#e61049af5dd297179d5a88650cf40edb2eef8b4d",
"dependencies": { "dependencies": {
"protobufjs": "^6.8.8" "protobufjs": "^6.8.8"
} }

View file

@ -59,7 +59,7 @@
"mui-tel-input": "^7.0.0", "mui-tel-input": "^7.0.0",
"notistack": "^3.0.1", "notistack": "^3.0.1",
"openweathermap-ts": "^1.2.10", "openweathermap-ts": "^1.2.10",
"protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#master", "protobuf-ts": "git+https://gitlab+deploy-token-50627:hv8mB4WkyvtjBpJKU1rN@gitlab.com/brandx/protobuf-ts.git#dev",
"query-string": "^9.2.1", "query-string": "^9.2.1",
"react": "^18.3.1", "react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1", "react-beautiful-dnd": "^13.1.1",

View file

@ -1539,7 +1539,7 @@ export default function BinVisualizer(props: Props) {
<InfoOutlined /> <InfoOutlined />
</IconButton> </IconButton>
) : ( ) : (
<IconButton size="small" onClick={() => fullScreenHandler.enter()}> <IconButton size="small" onClick={() => {fullScreenHandler.enter()}}>
<FullscreenIcon /> <FullscreenIcon />
</IconButton> </IconButton>
)} )}

View file

@ -18,7 +18,8 @@ export const I2C: AddressTypeExtension = {
[quack.ComponentType.COMPONENT_TYPE_SEN5X, 0x68], [quack.ComponentType.COMPONENT_TYPE_SEN5X, 0x68],
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, 0x6b], [quack.ComponentType.COMPONENT_TYPE_AIRFLOW, 0x6b],
[quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE, 0x70], [quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE, 0x70],
[quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, 0x6c] [quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, 0x6c],
[quack.ComponentType.COMPONENT_TYPE_TEMP_HUMIDITY, 0x43]
]); ]);
const offset = offsets.get(componentType); const offset = offsets.get(componentType);

View file

@ -40,7 +40,10 @@ import {
VPD, VPD,
Weight, Weight,
CapacitorCable, CapacitorCable,
AnalogPressure AnalogPressure,
Plenum,
AmbientOnewire,
AmbientI2C
} from "pbHelpers/ComponentTypes"; } from "pbHelpers/ComponentTypes";
//import { multilineGrainCableData } from "pbHelpers/ComponentTypes/GrainCable"; //import { multilineGrainCableData } from "pbHelpers/ComponentTypes/GrainCable";
//import { multilineCapCableData } from "./ComponentTypes/CapacitorCable"; //import { multilineCapCableData } from "./ComponentTypes/CapacitorCable";
@ -61,6 +64,7 @@ import { LineData, Point } from "charts/measurementCharts/MultiLineGraph";
import moment, { Moment } from "moment"; import moment, { Moment } from "moment";
import { avg } from "utils"; import { avg } from "utils";
import { Airflow } from "./ComponentTypes/Airflow"; import { Airflow } from "./ComponentTypes/Airflow";
import { TempHumidity } from "./ComponentTypes/TempHumidity";
const COMPONENT_TYPE_MAP = new Map<quack.ComponentType, Function>([ const COMPONENT_TYPE_MAP = new Map<quack.ComponentType, Function>([
[quack.ComponentType.COMPONENT_TYPE_INVALID, Invalid], [quack.ComponentType.COMPONENT_TYPE_INVALID, Invalid],
@ -98,7 +102,12 @@ const COMPONENT_TYPE_MAP = new Map<quack.ComponentType, Function>([
[quack.ComponentType.COMPONENT_TYPE_VIBRATION_CHAIN, VibrationCable], [quack.ComponentType.COMPONENT_TYPE_VIBRATION_CHAIN, VibrationCable],
[quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, dragerGasDongle], [quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, dragerGasDongle],
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, Airflow], [quack.ComponentType.COMPONENT_TYPE_AIRFLOW, Airflow],
[quack.ComponentType.COMPONENT_TYPE_ANALOG_PRESSURE, AnalogPressure] [quack.ComponentType.COMPONENT_TYPE_TEMP_HUMIDITY, TempHumidity],
[quack.ComponentType.COMPONENT_TYPE_ANALOG_PRESSURE, AnalogPressure],
[quack.ComponentType.COMPONENT_TYPE_PLENUM, Plenum],
[quack.ComponentType.COMPONENT_TYPE_AMBIENT_ONEWIRE, AmbientOnewire],
[quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C, AmbientI2C],
]); ]);
export interface Subtype { export interface Subtype {

View file

@ -0,0 +1,79 @@
import TemperatureHumidityDarkIcon from "assets/components/temperatureHumidityDark.png";
import TemperatureHumidityLightIcon from "assets/components/temperatureHumidityLight.png";
import { convertedUnitMeasurement } from "models/UnitMeasurement";
import {
AreaChartData,
ComponentTypeExtension,
GraphFilters,
LineChartData,
simpleAreaChartData,
simpleLineChartData,
simpleMeasurements,
simpleSummaries,
Summary,
unitMeasurementSummaries
} from "pbHelpers/ComponentType";
import { describeMeasurement } from "pbHelpers/MeasurementDescriber";
import { pond } from "protobuf-ts/pond";
import { quack } from "protobuf-ts/quack";
export function AmbientI2C(subtype: number = 0): ComponentTypeExtension {
let temperature = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_TEMPERATURE,
quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C,
subtype
);
let humidity = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_PERCENT,
quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C,
subtype
);
return {
type: quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C,
subtypes: [],
friendlyName: "Ambient I2C",
description: "Measures temperature and humidity",
isController: false,
isSource: true,
isCalibratable: true,
addressTypes: [quack.AddressType.ADDRESS_TYPE_I2C],
interactionResultTypes: [],
states: [],
measurements: simpleMeasurements(temperature, humidity),
measurementSummary: async function(measurement: quack.Measurement): Promise<Array<Summary>> {
return simpleSummaries(measurement, temperature, humidity);
},
unitMeasurementSummary: (
measurements: convertedUnitMeasurement
): Summary[] => {
return unitMeasurementSummaries(
measurements,
quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C,
subtype
);
},
areaChartData: (
measurement: pond.UnitMeasurementsForComponent,
smoothingAverages?: number,
filters?: GraphFilters
): AreaChartData => {
return simpleAreaChartData(measurement, smoothingAverages, filters);
},
lineChartData: (
measurement: pond.UnitMeasurementsForComponent,
smoothingAverages?: number,
filters?: GraphFilters
): LineChartData => {
return simpleLineChartData(
quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C,
measurement,
smoothingAverages,
filters
);
},
minMeasurementPeriodMs: 1000,
icon: (theme?: "light" | "dark"): string | undefined => {
return theme === "light" ? TemperatureHumidityDarkIcon : TemperatureHumidityLightIcon;
}
};
}

View file

@ -0,0 +1,79 @@
import TemperatureHumidityDarkIcon from "assets/components/temperatureHumidityDark.png";
import TemperatureHumidityLightIcon from "assets/components/temperatureHumidityLight.png";
import { convertedUnitMeasurement } from "models/UnitMeasurement";
import {
AreaChartData,
ComponentTypeExtension,
GraphFilters,
LineChartData,
simpleAreaChartData,
simpleLineChartData,
simpleMeasurements,
simpleSummaries,
Summary,
unitMeasurementSummaries
} from "pbHelpers/ComponentType";
import { describeMeasurement } from "pbHelpers/MeasurementDescriber";
import { pond } from "protobuf-ts/pond";
import { quack } from "protobuf-ts/quack";
export function AmbientOnewire(subtype: number = 0): ComponentTypeExtension {
let temperature = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_TEMPERATURE,
quack.ComponentType.COMPONENT_TYPE_AMBIENT_ONEWIRE,
subtype
);
let humidity = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_PERCENT,
quack.ComponentType.COMPONENT_TYPE_AMBIENT_ONEWIRE,
subtype
);
return {
type: quack.ComponentType.COMPONENT_TYPE_AMBIENT_ONEWIRE,
subtypes: [],
friendlyName: "Onewire Ambient",
description: "Measures temperature and humidity",
isController: false,
isSource: true,
isCalibratable: true,
addressTypes: [quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY],
interactionResultTypes: [],
states: [],
measurements: simpleMeasurements(temperature, humidity),
measurementSummary: async function(measurement: quack.Measurement): Promise<Array<Summary>> {
return simpleSummaries(measurement, temperature, humidity);
},
unitMeasurementSummary: (
measurements: convertedUnitMeasurement
): Summary[] => {
return unitMeasurementSummaries(
measurements,
quack.ComponentType.COMPONENT_TYPE_AMBIENT_ONEWIRE,
subtype
);
},
areaChartData: (
measurement: pond.UnitMeasurementsForComponent,
smoothingAverages?: number,
filters?: GraphFilters
): AreaChartData => {
return simpleAreaChartData(measurement, smoothingAverages, filters);
},
lineChartData: (
measurement: pond.UnitMeasurementsForComponent,
smoothingAverages?: number,
filters?: GraphFilters
): LineChartData => {
return simpleLineChartData(
quack.ComponentType.COMPONENT_TYPE_AMBIENT_ONEWIRE,
measurement,
smoothingAverages,
filters
);
},
minMeasurementPeriodMs: 1000,
icon: (theme?: "light" | "dark"): string | undefined => {
return theme === "light" ? TemperatureHumidityDarkIcon : TemperatureHumidityLightIcon;
}
};
}

View file

@ -226,6 +226,7 @@ export function dragerGasDongle(subtype: number = 0): ComponentTypeExtension {
smoothingAverages, smoothingAverages,
filters filters
); );
console.log(chartData)
} }
return chartData; return chartData;
}, },

View file

@ -0,0 +1,84 @@
import TemperatureHumidityDarkIcon from "assets/components/temperatureHumidityDark.png";
import TemperatureHumidityLightIcon from "assets/components/temperatureHumidityLight.png";
import { convertedUnitMeasurement } from "models/UnitMeasurement";
import {
AreaChartData,
ComponentTypeExtension,
GraphFilters,
LineChartData,
simpleAreaChartData,
simpleLineChartData,
simpleMeasurements,
simpleSummaries,
Summary,
unitMeasurementSummaries
} from "pbHelpers/ComponentType";
import { describeMeasurement } from "pbHelpers/MeasurementDescriber";
import { pond } from "protobuf-ts/pond";
import { quack } from "protobuf-ts/quack";
export function Plenum(subtype: number = 0): ComponentTypeExtension {
let temperature = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_TEMPERATURE,
quack.ComponentType.COMPONENT_TYPE_PLENUM,
subtype
);
let humidity = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_PERCENT,
quack.ComponentType.COMPONENT_TYPE_PLENUM,
subtype
);
let pressure = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_PRESSURE,
quack.ComponentType.COMPONENT_TYPE_PLENUM,
subtype
);
return {
type: quack.ComponentType.COMPONENT_TYPE_PLENUM,
subtypes: [],
friendlyName: "Plenum",
description: "Measures temperature, humidity and pressure",
isController: false,
isSource: true,
isCalibratable: true,
addressTypes: [quack.AddressType.ADDRESS_TYPE_CONFIGURABLE_PIN_ARRAY],
interactionResultTypes: [],
states: [],
measurements: simpleMeasurements(temperature, humidity, pressure),
measurementSummary: async function(measurement: quack.Measurement): Promise<Array<Summary>> {
return simpleSummaries(measurement, temperature, humidity, pressure);
},
unitMeasurementSummary: (
measurements: convertedUnitMeasurement
): Summary[] => {
return unitMeasurementSummaries(
measurements,
quack.ComponentType.COMPONENT_TYPE_PLENUM,
subtype
);
},
areaChartData: (
measurement: pond.UnitMeasurementsForComponent,
smoothingAverages?: number,
filters?: GraphFilters
): AreaChartData => {
return simpleAreaChartData(measurement, smoothingAverages, filters);
},
lineChartData: (
measurement: pond.UnitMeasurementsForComponent,
smoothingAverages?: number,
filters?: GraphFilters
): LineChartData => {
return simpleLineChartData(
quack.ComponentType.COMPONENT_TYPE_PLENUM,
measurement,
smoothingAverages,
filters
);
},
minMeasurementPeriodMs: 1000,
icon: (theme?: "light" | "dark"): string | undefined => {
return theme === "light" ? TemperatureHumidityDarkIcon : TemperatureHumidityLightIcon;
}
};
}

View file

@ -0,0 +1,85 @@
import TemperatureHumidityDarkIcon from "assets/components/temperatureHumidityDark.png";
import TemperatureHumidityLightIcon from "assets/components/temperatureHumidityLight.png";
import { convertedUnitMeasurement } from "models/UnitMeasurement";
import {
AreaChartData,
ComponentTypeExtension,
GraphFilters,
LineChartData,
simpleAreaChartData,
simpleLineChartData,
simpleMeasurements,
simpleSummaries,
Summary,
unitMeasurementSummaries
} from "pbHelpers/ComponentType";
import { describeMeasurement } from "pbHelpers/MeasurementDescriber";
import { pond } from "protobuf-ts/pond";
import { quack } from "protobuf-ts/quack";
export function TempHumidity(subtype: number = 0): ComponentTypeExtension {
let temperature = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_TEMPERATURE,
quack.ComponentType.COMPONENT_TYPE_TEMP_HUMIDITY,
subtype
);
let humidity = describeMeasurement(
quack.MeasurementType.MEASUREMENT_TYPE_PERCENT,
quack.ComponentType.COMPONENT_TYPE_TEMP_HUMIDITY,
subtype
);
return {
type: quack.ComponentType.COMPONENT_TYPE_TEMP_HUMIDITY,
subtypes: [
{
key: quack.TempHumiditySubtype.TEMP_HUMIDITY_SUBTYPE_HDC302,
value: "TEMP_HUMIDITY_SUBTYPE_HDC302",
friendlyName: "HDC302"
}
],
friendlyName: "Temperature/Humidity",
description: "Measures the temperature and humidity",
isController: false,
isSource: true,
isCalibratable: true,
addressTypes: [quack.AddressType.ADDRESS_TYPE_I2C],
interactionResultTypes: [],
states: [],
measurements: simpleMeasurements(temperature, humidity),
measurementSummary: async function(measurement: quack.Measurement): Promise<Array<Summary>> {
return simpleSummaries(measurement, temperature, humidity);
},
unitMeasurementSummary: (
measurements: convertedUnitMeasurement
): Summary[] => {
return unitMeasurementSummaries(
measurements,
quack.ComponentType.COMPONENT_TYPE_TEMP_HUMIDITY,
subtype
);
},
areaChartData: (
measurement: pond.UnitMeasurementsForComponent,
smoothingAverages?: number,
filters?: GraphFilters
): AreaChartData => {
return simpleAreaChartData(measurement, smoothingAverages, filters);
},
lineChartData: (
measurement: pond.UnitMeasurementsForComponent,
smoothingAverages?: number,
filters?: GraphFilters
): LineChartData => {
return simpleLineChartData(
quack.ComponentType.COMPONENT_TYPE_TEMP_HUMIDITY,
measurement,
smoothingAverages,
filters
);
},
minMeasurementPeriodMs: 1000,
icon: (theme?: "light" | "dark"): string | undefined => {
return theme === "light" ? TemperatureHumidityDarkIcon : TemperatureHumidityLightIcon;
}
};
}

View file

@ -30,3 +30,6 @@ export * from "./VPD";
export * from "./Weight"; export * from "./Weight";
export * from "./CapacitorCable"; export * from "./CapacitorCable";
export * from "./AnalogPressure"; export * from "./AnalogPressure";
export * from "./Plenum";
export * from "./AmbientOnewire";
export * from "./AmbientI2C";

View file

@ -65,7 +65,8 @@ const DefaultAvailability: DeviceAvailabilityMap = new Map<quack.AddressType, De
[quack.ComponentType.COMPONENT_TYPE_AIRFLOW, [0x6c]], [quack.ComponentType.COMPONENT_TYPE_AIRFLOW, [0x6c]],
[quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE, [0x71]], // the address cables will use when they are plugged into the expander with V2 device only [quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE, [0x71]], // the address cables will use when they are plugged into the expander with V2 device only
[quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, [0x6d]], [quack.ComponentType.COMPONENT_TYPE_DRAGER_GAS_DONGLE, [0x6d]],
[quack.ComponentType.COMPONENT_TYPE_ANALOG_PRESSURE, [0x6e]] [quack.ComponentType.COMPONENT_TYPE_ANALOG_PRESSURE, [0x6e]],
[quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C, [0x44]]
]) ])
], ],
[quack.AddressType.ADDRESS_TYPE_DAC, [0, 1]], [quack.AddressType.ADDRESS_TYPE_DAC, [0, 1]],

View file

@ -252,7 +252,8 @@ export const BindaptV2MonitorAvailability: DeviceAvailabilityMap = new Map<
[quack.ComponentType.COMPONENT_TYPE_LIDAR, [0x62, 0x66, 0x10]], [quack.ComponentType.COMPONENT_TYPE_LIDAR, [0x62, 0x66, 0x10]],
[quack.ComponentType.COMPONENT_TYPE_CO2, [0x61]], [quack.ComponentType.COMPONENT_TYPE_CO2, [0x61]],
[quack.ComponentType.COMPONENT_TYPE_SEN5X, [0x69]], [quack.ComponentType.COMPONENT_TYPE_SEN5X, [0x69]],
[quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE, [0x71]] [quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE, [0x71]],
[quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C, [0x44]]
]) ])
], ],
[quack.AddressType.ADDRESS_TYPE_POWER, [0]], [quack.AddressType.ADDRESS_TYPE_POWER, [0]],
@ -285,7 +286,8 @@ export const BindaptV2AutomateAvailability: DeviceAvailabilityMap = new Map<
[quack.ComponentType.COMPONENT_TYPE_LIDAR, [0x62, 0x66, 0x10]], [quack.ComponentType.COMPONENT_TYPE_LIDAR, [0x62, 0x66, 0x10]],
[quack.ComponentType.COMPONENT_TYPE_CO2, [0x61]], [quack.ComponentType.COMPONENT_TYPE_CO2, [0x61]],
[quack.ComponentType.COMPONENT_TYPE_SEN5X, [0x69]], [quack.ComponentType.COMPONENT_TYPE_SEN5X, [0x69]],
[quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE, [0x71]] [quack.ComponentType.COMPONENT_TYPE_GRAIN_CABLE, [0x71]],
[quack.ComponentType.COMPONENT_TYPE_AMBIENT_I2C, [0x44]]
]) ])
], ],
[quack.AddressType.ADDRESS_TYPE_POWER, [0]], [quack.AddressType.ADDRESS_TYPE_POWER, [0]],

View file

@ -169,6 +169,7 @@ export default function ObjectUsers(props: Props) {
userAPI userAPI
.listObjectUsers(scope) .listObjectUsers(scope)
.then((response: any) => { .then((response: any) => {
console.log(response)
let rUsers: User[] = []; let rUsers: User[] = [];
or(response.data, { users: [] }).users.forEach((user: any) => { or(response.data, { users: [] }).users.forEach((user: any) => {
rUsers.push(User.any(user)); rUsers.push(User.any(user));