Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge release #1875

Merged
merged 35 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
600ab91
Bump vite from 5.0.12 to 5.0.13
dependabot[bot] Apr 3, 2024
b9d6c14
Merge pull request #1866 from BrewBlox/dependabot/npm_and_yarn/vite-5…
steersbob Apr 3, 2024
1c57e38
make metrics duration editable
steersbob Apr 4, 2024
e16d952
Merge pull request #1868 from steersbob/feature/metrics-duration
steersbob Apr 4, 2024
b90e2b8
Bump tar from 6.2.0 to 6.2.1
dependabot[bot] Apr 11, 2024
098b33e
Merge pull request #1869 from BrewBlox/dependabot/npm_and_yarn/tar-6.2.1
steersbob Apr 11, 2024
21c583a
implement GPIO module status changes
steersbob May 8, 2024
343df44
Add rough support for AnalogGpioModule and TempSensorAnalog
steersbob May 17, 2024
c4e76b1
manually pull proto with yarn updates
steersbob May 18, 2024
8d27189
use correct data field for detected type
steersbob Jun 6, 2024
85dbd63
Bump braces from 3.0.2 to 3.0.3
dependabot[bot] Jun 17, 2024
8332929
Bump ws from 8.14.2 to 8.17.1
dependabot[bot] Jun 18, 2024
fcd4ddd
Merge pull request #1870 from BrewBlox/dependabot/npm_and_yarn/braces…
steersbob Jun 19, 2024
a4aa28b
Merge pull request #1871 from BrewBlox/dependabot/npm_and_yarn/ws-8.17.1
steersbob Jun 19, 2024
a1c8d5d
fix commented config for service overrides
steersbob Jun 21, 2024
a63f467
add conditional messages to troubleshooter if USB is enabled
steersbob Jun 21, 2024
6d11663
list detected USB devices in troubleshooter
steersbob Jun 25, 2024
20d434c
don't fetch USB when service is unreachable
steersbob Jun 25, 2024
4018fff
remove block name cleanup action
steersbob Jun 26, 2024
f0980fb
show USB and mdns devices in troubleshooter
steersbob Jun 26, 2024
50118b6
use bracket access until proto is updated
steersbob Jun 26, 2024
cfbd296
Merge pull request #1872 from steersbob/feature/usb-troubleshooter
steersbob Jun 26, 2024
d4fa6a9
merge gpio module and analog gpio module
elcojacobs Jun 28, 2024
4ea07d1
update analog channels in GPIO module
elcojacobs Jul 1, 2024
d9e4cd5
fix lint errors
elcojacobs Jul 1, 2024
6554f68
fix review comments
elcojacobs Jul 1, 2024
96ca097
fix prop use in analog array editor
steersbob Jul 1, 2024
1912d03
ensure color field model value has a hashtag prefix
steersbob Jul 1, 2024
c8a5c4a
Merge pull request #1873 from elcojacobs/feature/gpio-module-merge
steersbob Jul 1, 2024
c0a2f18
disable mqtt reschedulePings, because it results in no pings and drop…
elcojacobs Jul 5, 2024
2b7f9d6
automatically switch to OneWireGpioModuleWidget to GpioModule
steersbob Jul 5, 2024
4499495
wip derivative filter choice in pid
elcojacobs Jul 8, 2024
47e5eaa
update PidFull dialog for derivative filter settings
elcojacobs Jul 8, 2024
a8bb4b3
fix lint errors
elcojacobs Jul 8, 2024
c41f8c9
Merge pull request #1874 from elcojacobs/feature/derivative-filter-ch…
elcojacobs Jul 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions dev/presets/brewblox-ui-store.redis.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@
"blockId": "Sequence"
}
},
{
"namespace": "brewblox-ui-store:dashboard-items",
"id": "2-UtLY_8z24JlcbI8oLrF",
"title": "Old OneWire",
"feature": "OneWireGpioModule",
"cols": 4,
"order": 20,
"pinnedPosition": null,
"rows": 4,
"dashboard": "dashboard-home",
"config": {
"serviceId": "sparkey",
"blockId": "gpio-1"
}
},
{
"namespace": "brewblox-ui-store:logged-sessions",
"id": "3d15296d-0abd-4d45-383c-0bec436ae319",
Expand Down
31 changes: 15 additions & 16 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,11 @@ services:
labels:
- traefik.http.routers.ui.rule=PathPrefix(`/ui`) || PathPrefix(`/static`) || Path(`/`)

# node-red:
# volumes:
# - type: bind
# source: ./dev/node-red
# target: /data
# - type: bind
# source: ../node-red-contrib-brewblox
# target: /node-red-contrib-brewblox

# history:
# image: brewblox/brewblox-history:develop
# volumes:
# - type: bind
# source: ../brewblox-history
# target: /app
# source: ../brewblox-history/brewblox_history
# target: /app/brewblox_history

# sparkey:
# volumes:
Expand All @@ -44,7 +34,7 @@ services:
# source: ../brewblox-devcon-spark/brewblox_devcon_spark
# target: /app/brewblox_devcon_spark
# ports:
# - "5678:5678"
# - '5678:5678'
# environment:
# - ENABLE_DEBUGGER=1
# labels:
Expand All @@ -62,11 +52,11 @@ services:
# tilt:
# volumes:
# - type: bind
# source: ../brewblox-tilt
# target: /app
# source: ../brewblox-tilt/brewblox_tilt
# target: /app/brewblox_tilt
# read_only: true
# - type: bind
# source: ./dev/tilt_share
# source: ${BREWBLOX_CACHE_DIR}/tilt
# target: /share

# hass:
Expand All @@ -85,3 +75,12 @@ services:
# - type: bind
# source: ../brewblox-auth/entrypoint.sh
# target: /app/entrypoint.sh

# You need to change "enp8s0" to the name of your physical network interface
# reflector:
# image: yuxzhu/mdns-reflector:latest
# restart: on-failure:3
# network_mode: host
# labels:
# - traefik.enable=false
# command: mdns-reflector -fn4 enp8s0 br-${COMPOSE_PROJECT_NAME}
15 changes: 14 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
name: brewblox-ui

networks:
default:
driver_opts:
com.docker.network.bridge.name: br-${COMPOSE_PROJECT_NAME}

services:
eventbus:
image: ghcr.io/brewblox/mosquitto:develop
Expand Down Expand Up @@ -34,7 +40,7 @@ services:
image: ghcr.io/brewblox/brewblox-history:develop

node-red:
image: ghcr.io/brewblox/node-red:develop
image: nodered/node-red:latest-minimal
volumes:
- type: bind
source: ${BREWBLOX_CACHE_DIR}/node-red
Expand Down Expand Up @@ -64,6 +70,13 @@ services:
source: ${BREWBLOX_CACHE_DIR}/simulator__spock
target: /app/simulator

usb-proxy:
image: ghcr.io/brewblox/brewblox-usb-proxy:develop
restart: unless-stopped
privileged: true
labels:
- traefik.http.services.usb-proxy.loadbalancer.server.port=5000

tilt:
image: ghcr.io/brewblox/brewblox-tilt:develop
restart: unless-stopped
Expand Down
12 changes: 6 additions & 6 deletions firmware.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[FIRMWARE]
firmware_version=3221611f
firmware_date=2024-03-12
firmware_sha=3221611f98c94f471802a0835a3084a3138a4771
proto_version=041bfba2
proto_date=2024-03-11
proto_sha=041bfba27b044b143cfc907c152cf25509c3274a
firmware_version=e8cdb3b0
firmware_date=2024-07-08
firmware_sha=e8cdb3b07d717f5178320702ad814c8b1d51af63
proto_version=a58d8532
proto_date=2024-07-07
proto_sha=a58d8532c9337310966401f24afc2a64ec15701d
system_version=3.2.0
79 changes: 40 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,81 +33,82 @@
"components": "vue-global-type-gen && echo 'export {};' >> src/auto-import.d.ts"
},
"dependencies": {
"@quasar/extras": "^1.16.9",
"axios": "^1.6.7",
"brewblox-proto": "https://github.com/brewblox/brewblox-proto#commit=041bfba27b044b143cfc907c152cf25509c3274a",
"@quasar/extras": "^1.16.11",
"axios": "^1.6.8",
"brewblox-proto": "https://github.com/brewblox/brewblox-proto#commit=a58d8532c9337310966401f24afc2a64ec15701d",
"buffer": "^6.0.3",
"cm6-theme-basic-dark": "^0.2.0",
"codemirror": "^6.0.1",
"core-js": "^3.35.1",
"d3": "^7.8.5",
"date-fns": "^3.3.1",
"dompurify": "^3.0.8",
"elkjs": "^0.9.1",
"core-js": "^3.37.0",
"d3": "^7.9.0",
"date-fns": "^3.6.0",
"dompurify": "^3.1.2",
"elkjs": "^0.9.3",
"fromentries": "^1.3.2",
"immer": "^10.0.3",
"immer": "^10.1.1",
"js-quantities": "^1.8.0",
"lodash": "^4.17.21",
"marked": "^11.2.0",
"mqtt": "^5.3.5",
"nanoid": "^5.0.5",
"marked": "^12.0.2",
"mqtt": "^5.5.5",
"nanoid": "^5.0.7",
"parse-duration": "^1.1.0",
"pinia": "^2.1.7",
"plotly.js": "^2.29.0",
"plotly.js": "^2.32.0",
"pluralize": "^8.0.0",
"portal-vue": "^3.0.0",
"process": "^0.11.10",
"quasar": "^2.14.3",
"simple-keyboard": "^3.7.54",
"simple-keyboard-layouts": "^3.3.65",
"quasar": "^2.16.2",
"simple-keyboard": "^3.7.79",
"simple-keyboard-layouts": "^3.3.102",
"svg-path-properties": "^1.3.0",
"typescript-string-enums": "^1.0.0",
"url": "^0.11.3",
"vue": "^3.4.15",
"vue-router": "^4.2.5",
"vue": "^3.4.27",
"vue-router": "^4.3.2",
"vuedraggable": "^4.1.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
"@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0",
"@quasar/vite-plugin": "^1.6.0",
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
"@quasar/quasar-app-extension-testing-unit-vitest": "^1.0.0",
"@quasar/vite-plugin": "^1.7.0",
"@rollup/plugin-inject": "^5.0.5",
"@types/d3": "^7.4.3",
"@types/dompurify": "^3.0.5",
"@types/js-quantities": "^1.6.6",
"@types/lodash": "^4.14.202",
"@types/lodash": "^4.17.1",
"@types/marked": "^6.0.0",
"@types/minimist": "^1.2.5",
"@types/node": "20.11.16",
"@types/plotly.js": "^2.29.0",
"@types/node": "20.12.11",
"@types/plotly.js": "^2.29.3",
"@types/pluralize": "^0.0.33",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-vue": "^5.0.3",
"@vitest/coverage-v8": "^1.2.2",
"@vue/compiler-sfc": "^3.4.15",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^2.4.4",
"autoprefixer": "^10.4.17",
"eslint": "^8.56.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vitest/coverage-v8": "^1.6.0",
"@vue/compiler-sfc": "^3.4.27",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/test-utils": "^2.4.6",
"autoprefixer": "^10.4.19",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-quasar": "^1.1.0",
"eslint-plugin-vue": "^9.19.2",
"jsdom": "^23.2.0",
"eslint-plugin-vue": "^9.25.0",
"jsdom": "^24.0.0",
"minimist": "^1.2.8",
"prettier": "^3.2.5",
"rollup": "^4.9.6",
"rollup": "^4.17.2",
"rollup-plugin-visualizer": "^5.12.0",
"sass": "1.70.0",
"sass": "1.77.0",
"svgpath": "^2.6.0",
"typescript": "^5.3.3",
"vite": "^5.0.12",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-plugin-checker": "^0.6.4",
"vitest": "^1.2.2",
"vitest": "^1.6.0",
"vue-global-type-gen": "^1.1.0",
"vue-tsc": "^1.8.27"
"vue-tsc": "^2.0.16"
},
"engines": {
"node": ">= 18"
Expand Down
4 changes: 3 additions & 1 deletion src/auto-import.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ declare module '@vue/runtime-core' {
UnknownBlockWidget: typeof import('src/plugins/spark/components/widget/UnknownBlockWidget.vue').default;
RelationsDialog: typeof import('src/plugins/spark/components/widget/RelationsDialog.vue').default;
RelationsDiagram: typeof import('src/plugins/spark/components/widget/RelationsDiagram.vue').default;
OneWireGpioEditor: typeof import('src/plugins/spark/components/widget/OneWireGpioEditor.vue').default;
IoArray: typeof import('src/plugins/spark/components/widget/IoArray.vue').default;
GpioChannelDialog: typeof import('src/plugins/spark/components/widget/GpioChannelDialog.vue').default;
GpioArrayEditor: typeof import('src/plugins/spark/components/widget/GpioArrayEditor.vue').default;
BlockWidgetWrapper: typeof import('src/plugins/spark/components/widget/BlockWidgetWrapper.vue').default;
BlockGraph: typeof import('src/plugins/spark/components/widget/BlockGraph.vue').default;
AnalogArrayEditor: typeof import('src/plugins/spark/components/widget/AnalogArrayEditor.vue').default;
BlockWidgetToolbar: typeof import('src/plugins/spark/components/toolbar/BlockWidgetToolbar.vue').default;
BlockActions: typeof import('src/plugins/spark/components/toolbar/BlockActions.vue').default;
SparkWifiDialog: typeof import('src/plugins/spark/components/menu/SparkWifiDialog.vue').default;
Expand Down Expand Up @@ -49,6 +50,7 @@ declare module '@vue/runtime-core' {
AnalogConstraintsValEdit: typeof import('src/plugins/spark/components/form/AnalogConstraintsValEdit.vue').default;
AnalogConstraintsField: typeof import('src/plugins/spark/components/form/AnalogConstraintsField.vue').default;
AnalogConstraintsEditor: typeof import('src/plugins/spark/components/form/AnalogConstraintsEditor.vue').default;
AnalogChannelSelectField: typeof import('src/plugins/spark/components/form/AnalogChannelSelectField.vue').default;
QuickstartTaskMaster: typeof import('src/plugins/quickstart/components/QuickstartTaskMaster.vue').default;
QuickstartServiceTask: typeof import('src/plugins/quickstart/components/QuickstartServiceTask.vue').default;
QuickstartSensorField: typeof import('src/plugins/quickstart/components/QuickstartSensorField.vue').default;
Expand Down
1 change: 1 addition & 0 deletions src/eventbus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class BrewbloxEventbus {
port: PORT,
path: '/eventbus',
rejectUnauthorized: false,
reschedulePings: false,
};
if (this.client) {
this.client.end();
Expand Down
19 changes: 11 additions & 8 deletions src/plugins/history/Metrics/MetricsBasic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { durationString, fixedNumber, shortDateString } from '@/utils/quantity';
import { DEFAULT_METRICS_DECIMALS, DEFAULT_METRICS_EXPIRY_MS } from '../const';
import { MetricsWidget } from './types';

interface DisplayValue extends MetricValue {
interface DisplayValue extends Partial<MetricValue> {
name: string;
stale: boolean;
decimals: number;
Expand Down Expand Up @@ -52,20 +52,23 @@ const values = computed<DisplayValue[]>(() => {
return [];
}

return source.value.values.map((result): DisplayValue => {
const name =
config.value.renames[result.field] || defaultLabel(result.field);
const decimals =
config.value.decimals[result.field] ?? DEFAULT_METRICS_DECIMALS;
return config.value.fields.map((field): DisplayValue => {
const result: Partial<MetricValue> =
source.value.values.find((v) => v.field === field) ?? {};

const name = config.value.renames[field] || defaultLabel(field);
const decimals = config.value.decimals[field] ?? DEFAULT_METRICS_DECIMALS;
const freshDuration =
config.value.freshDuration[result.field] ?? DEFAULT_METRICS_EXPIRY_MS;
config.value.freshDuration[field] ?? DEFAULT_METRICS_EXPIRY_MS;
const stale =
result?.time == null || now - result.time.getTime() > freshDuration;

return {
...result,
name,
decimals,
freshDuration,
stale: result.time != null && now - result.time.getTime() > freshDuration,
stale,
fixedValue: fixedNumber(result.value, decimals),
};
});
Expand Down
27 changes: 26 additions & 1 deletion src/plugins/history/components/MetricsEditor.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<script setup lang="ts">
import { Quantity } from 'brewblox-proto/ts';
import { produce } from 'immer';
import { QTreeNode } from 'quasar';
import { computed, toRaw } from 'vue';
import { createDialog } from '@/utils/dialog';
import { durationString } from '@/utils/quantity';
import { bloxQty, durationString } from '@/utils/quantity';
import { DEFAULT_METRICS_DECIMALS, DEFAULT_METRICS_EXPIRY_MS } from '../const';
import { MetricsConfig } from '../types';

Expand All @@ -15,6 +18,21 @@ const emit = defineEmits<{
'update:config': [payload: MetricsConfig];
}>();

function updateConfig(
cb: (draft: MetricsConfig) => void | MetricsConfig,
): void {
const updated = produce(toRaw(props.config), cb);
emit('update:config', updated);
}

const hideAfter = computed<Quantity>({
get: () => bloxQty(props.config.params.duration ?? '10m'),
set: (v) =>
updateConfig((draft) => {
draft.params.duration = durationString(v);
}),
});

function editLeaf(node: QTreeNode): void {
createDialog({
component: 'MetricsDisplayDialog',
Expand Down Expand Up @@ -46,6 +64,13 @@ function decimals(node: QTreeNode): number {
:config="config"
@update:config="(config) => emit('update:config', config)"
>
<template #settings>
<DurationField
v-model="hideAfter"
label="Exclude metric values older than"
class="col-grow"
/>
</template>
<template #leaf="{ node }">
<div @click="editLeaf(node)">
{{ node.label }}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/quickstart/BrewKettle/BrewKettleIoTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function taskDone(): void {
<div class="text-subtitle1">
Position {{ change.modulePosition }}: GPIO Module {{ change.blockId }}
</div>
<OneWireGpioEditor v-model:channels="change.channels" />
<GpioArrayEditor v-model:channels="change.channels" />
</q-card-section>
<template #actions>
<q-btn
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/quickstart/Ferment/FermentIoTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function taskDone(): void {
<div class="text-subtitle1">
Position {{ change.modulePosition }}: GPIO Module {{ change.blockId }}
</div>
<OneWireGpioEditor v-model:channels="change.channels" />
<GpioArrayEditor v-model:channels="change.channels" />
</q-card-section>
<template #actions>
<q-btn
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/quickstart/Fridge/FridgeIoTask.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function taskDone(): void {
<div class="text-subtitle1">
Position {{ change.modulePosition }}: GPIO Module {{ change.blockId }}
</div>
<OneWireGpioEditor v-model:channels="change.channels" />
<GpioArrayEditor v-model:channels="change.channels" />
</q-card-section>
<template #actions>
<q-btn
Expand Down
Loading
Loading