Skip to content

Commit

Permalink
Merge pull request #221 from Luligu/dev
Browse files Browse the repository at this point in the history
Release 2.1.5
  • Loading branch information
Luligu authored Feb 11, 2025
2 parents bf3f9be + a20618a commit 338f34c
Show file tree
Hide file tree
Showing 39 changed files with 1,836 additions and 717 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,31 @@ matterbridge-zigbee2mqtt v. 2.4.4
matterbridge-somfy-tahoma v. 1.2.3
matterbridge-hass v. 0.0.8

## [2.1.5] - 2025-02-11

### Added

- [frontend]: Frontend v.2.4.1.
- [frontend]: Optimized rendering of all pages.
- [frontend]: Added cpuUsed, rss and heapUsed to SystemInformation.
- [frontend]: Added UiProvider.
- [frontend]: Added wssSendCpuUpdate, wssSendMemoryUpdate and wssSendSnackbarMessage.
- [docker]: Added health check to docker images. See README-DOCKER.md with the updated configuration.

### Changed

- [matterbridge]: Calls getNpmPackageVersion() instead of npm to get latest version to optimize memory and cpu usage.
- [matterbridge]: Memory optimization on MatterbridgeEndpoint.

### Fixed

- [matterbridge]: Refactor shutdown sequences for reset and factory reset.
- [matterbridge]: Refactor reset devices adding a wait of 1 sec to allow matter to deliver all messages before shutting down.

<a href="https://www.buymeacoffee.com/luligugithub">
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
</a>

## [2.1.4] - 2025-02-07

### Added
Expand Down
6 changes: 6 additions & 0 deletions README-DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ services:
volumes:
- "/home/<USER>/Matterbridge:/root/Matterbridge" # Mounts the Matterbridge plugin directory
- "/home/<USER>/.matterbridge:/root/.matterbridge" # Mounts the Matterbridge storage directory
healthcheck:
test: curl --fail localhost:8283/health || exit 1
interval: 60s
retries: 5
start_period: 60s
timeout: 10s
```

Replace USER with your user name (i.e. ubuntu or pi).
Expand Down
5 changes: 5 additions & 0 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ RUN npm run cleanBuildProduction && npm pkg delete devDependencies scripts types
FROM node:22-bookworm-slim AS release
WORKDIR /app

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/*.tgz .
RUN npm install -g npm@latest && npm install -g --omit=dev *.tgz && rm *.tgz

Expand Down
11 changes: 9 additions & 2 deletions docker/Dockerfile.main
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/frontend/build ./frontend/build
RUN npm link

# Install curl for docker health
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Install Matterbridge plugins
RUN npm install -g --omit=dev matterbridge-example-accessory-platform
RUN npm install -g --omit=dev matterbridge-example-dynamic-platform
RUN npm install -g --omit=dev matterbridge-zigbee2mqtt
RUN npm install -g --omit=dev matterbridge-somfy-tahoma
RUN npm install -g --omit=dev matterbridge-shelly
RUN npm install -g --omit=dev matterbridge-hass
RUN npm install -g --omit=dev matterbridge-test
RUN npm install -g --omit=dev matterbridge-example-accessory-platform
RUN npm install -g --omit=dev matterbridge-example-dynamic-platform
RUN npm install -g --omit=dev matterbridge-eve-door
RUN npm install -g --omit=dev matterbridge-eve-motion
RUN npm install -g --omit=dev matterbridge-eve-energy
Expand Down
6 changes: 3 additions & 3 deletions frontend/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.cf25d33e.css",
"main.js": "./static/js/main.26dbf9b9.js",
"main.js": "./static/js/main.cd192588.js",
"static/js/453.abd36b29.chunk.js": "./static/js/453.abd36b29.chunk.js",
"static/media/roboto-latin-700-normal.woff2": "./static/media/roboto-latin-700-normal.4535474e1cf8598695ad.woff2",
"static/media/roboto-latin-500-normal.woff2": "./static/media/roboto-latin-500-normal.7077203b1982951ecf76.woff2",
Expand Down Expand Up @@ -61,11 +61,11 @@
"static/media/roboto-greek-ext-400-normal.woff": "./static/media/roboto-greek-ext-400-normal.16eb83b4a3b1ea994243.woff",
"index.html": "./index.html",
"main.cf25d33e.css.map": "./static/css/main.cf25d33e.css.map",
"main.26dbf9b9.js.map": "./static/js/main.26dbf9b9.js.map",
"main.cd192588.js.map": "./static/js/main.cd192588.js.map",
"453.abd36b29.chunk.js.map": "./static/js/453.abd36b29.chunk.js.map"
},
"entrypoints": [
"static/css/main.cf25d33e.css",
"static/js/main.26dbf9b9.js"
"static/js/main.cd192588.js"
]
}
2 changes: 1 addition & 1 deletion frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.26dbf9b9.js"></script><link href="./static/css/main.cf25d33e.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.cd192588.js"></script><link href="./static/css/main.cf25d33e.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
115 changes: 0 additions & 115 deletions frontend/build/static/js/main.26dbf9b9.js

This file was deleted.

1 change: 0 additions & 1 deletion frontend/build/static/js/main.26dbf9b9.js.map

This file was deleted.

115 changes: 115 additions & 0 deletions frontend/build/static/js/main.cd192588.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/build/static/js/main.cd192588.js.map

Large diffs are not rendered by default.

43 changes: 41 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "2.4.0",
"version": "2.4.1",
"private": true,
"homepage": "./",
"scripts": {
Expand Down Expand Up @@ -52,6 +52,7 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"notistack": "^2.0.8",
"qrcode.react": "^4.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand All @@ -63,4 +64,4 @@
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11"
}
}
}
40 changes: 23 additions & 17 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-d

// @mui
import { ThemeProvider } from '@mui/material';
import { SnackbarProvider } from 'notistack';

// Frontend
import Header from './components/Header';
Expand All @@ -17,6 +18,7 @@ import Settings from './components/Settings';
import Test from './components/Test';
import Logs from './components/Logs';
import { WebSocketProvider } from './components/WebSocketProvider';
import { UiProvider } from './components/UiProvider';
import { createMuiTheme, getCssVariable } from './components/muiTheme';

export const debug = false;
Expand Down Expand Up @@ -131,23 +133,27 @@ function LoginForm() {

if (loggedIn) {
return (
<WebSocketProvider>
<ThemeProvider theme={theme}>
<Router basename={baseName}>
<div className="MbfScreen">
<Header />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/devices" element={<Devices />} />
<Route path="/log" element={<Logs />} />
<Route path="/settings" element={<Settings />} />
<Route path="/test" element={<Test />} />
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</div>
</Router>
</ThemeProvider>
</WebSocketProvider>
<ThemeProvider theme={theme}>
<SnackbarProvider maxSnack={5} preventDuplicate anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}>
<UiProvider>
<WebSocketProvider>
<Router basename={baseName}>
<div className="MbfScreen">
<Header />
<Routes>
<Route path="/" element={<Home />} />
<Route path="/devices" element={<Devices />} />
<Route path="/log" element={<Logs />} />
<Route path="/settings" element={<Settings />} />
<Route path="/test" element={<Test />} />
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</div>
</Router>
</WebSocketProvider>
</UiProvider>
</SnackbarProvider>
</ThemeProvider>
);
} else {
return (
Expand Down
Loading

0 comments on commit 338f34c

Please sign in to comment.