From 11c1ac7d7986a10441b5525d1e34e325cc54c1bd Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:37:55 +0200 Subject: [PATCH 01/22] Dev 1.5.8-dev.1 --- CHANGELOG.md | 12 + package-lock.json | 627 ++++------------------------------------------ package.json | 12 +- 3 files changed, 61 insertions(+), 590 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d967a209..c119f43b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,18 @@ If you like this project and find it useful, please consider giving it a star on The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository. +## [1.5.8] - 2024-09-19 + +### Changed + +- [package]: Update matter-node.js to 0.10.4. +- [package]: Update matter-history to 1.1.15. +- [package]: Update dependencies. + + + Buy me a coffee + + ## [1.5.7] - 2024-09-17 ### Added diff --git a/package-lock.json b/package-lock.json index f50ea820..89669017 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,21 @@ { "name": "matterbridge", - "version": "1.5.7", + "version": "1.5.8-dev.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "matterbridge", - "version": "1.5.7", + "version": "1.5.8-dev.1", "license": "Apache-2.0", "dependencies": { - "@project-chip/matter-node.js": "0.10.3", - "@project-chip/matter.js": "0.10.3", + "@project-chip/matter-node.js": "^0.10.4", + "@project-chip/matter.js": "^0.10.4", "archiver": "7.0.1", "express": "4.21.0", "glob": "11.0.0", "https": "1.0.0", - "matter-history": "1.1.14", + "matter-history": "^1.1.15-dev.1", "node-ansi-logger": "3.0.0", "node-persist-manager": "1.0.8", "ws": "8.18.0" @@ -40,7 +40,7 @@ "rimraf": "6.0.1", "ts-jest": "29.2.5", "typescript": "5.6.2", - "typescript-eslint": "8.5.0" + "typescript-eslint": "8.6.0" }, "engines": { "node": ">=18.0.0" @@ -1444,12 +1444,12 @@ } }, "node_modules/@project-chip/matter-node.js": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@project-chip/matter-node.js/-/matter-node.js-0.10.3.tgz", - "integrity": "sha512-XYIGRYWk7YsjR/M6t6RWQxUr5EIXUqblAna5s3d/AAUpPgdGh3KYZblUex0mdtuIfcozn8Lcov/M44JgfgkMGw==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@project-chip/matter-node.js/-/matter-node.js-0.10.4.tgz", + "integrity": "sha512-uI+6kSStL8cSChzQ5cmkomm5s3CMnKcc0Racmbgi+igOPphlhI2qNDd343Kd2t+Re0EoXsCOIe+i9nR6GlmNRA==", "license": "Apache-2.0", "dependencies": { - "@project-chip/matter.js": "0.10.3", + "@project-chip/matter.js": "0.10.4", "node-localstorage": "^3.0.5" }, "engines": { @@ -1457,9 +1457,9 @@ } }, "node_modules/@project-chip/matter.js": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@project-chip/matter.js/-/matter.js-0.10.3.tgz", - "integrity": "sha512-4GtBCN4ZHbmzn67oBDnZBxPhemOsWoErp9ZWRKEJNBEIYPMvyG6N01zNO+NU2IdUmMDOj6SWbIfTJUQ/M1Cy3Q==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@project-chip/matter.js/-/matter.js-0.10.4.tgz", + "integrity": "sha512-n6HbfieIVrZ52n0U38YjtDTLmvXvWkcc1r7RKlAVWuje+ae2/Fz6be7mxxSkybFJYNkni4nwDa4D9xp/GeIYpQ==", "license": "Apache-2.0", "dependencies": { "@noble/curves": "^1.5.0" @@ -1783,17 +1783,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz", - "integrity": "sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.6.0.tgz", + "integrity": "sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/type-utils": "8.5.0", - "@typescript-eslint/utils": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", + "@typescript-eslint/scope-manager": "8.6.0", + "@typescript-eslint/type-utils": "8.6.0", + "@typescript-eslint/utils": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1816,158 +1816,17 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", - "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", - "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", - "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", - "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.5.0.tgz", - "integrity": "sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.6.0.tgz", + "integrity": "sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", + "@typescript-eslint/scope-manager": "8.6.0", + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/typescript-estree": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0", "debug": "^4.3.4" }, "engines": { @@ -1986,124 +1845,6 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", - "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", - "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", - "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", - "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/scope-manager": { "version": "8.6.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.6.0.tgz", @@ -2123,76 +1864,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.5.0.tgz", - "integrity": "sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "8.5.0", - "@typescript-eslint/utils": "8.5.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", - "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", - "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.6.0.tgz", + "integrity": "sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==", "dev": true, "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", - "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", - "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", + "@typescript-eslint/typescript-estree": "8.6.0", + "@typescript-eslint/utils": "8.6.0", "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { @@ -2208,86 +1888,6 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", - "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/types": { "version": "8.6.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.6.0.tgz", @@ -5683,13 +5283,13 @@ } }, "node_modules/matter-history": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/matter-history/-/matter-history-1.1.14.tgz", - "integrity": "sha512-wFQ9+XHrhBWXfa8JZYt8SkR4zcQD76oudZHtkXSFDWmNcUxF6dT4uYLBjsMDg6pMeqVl0SFEYKLK9jrADh00cg==", + "version": "1.1.15-dev.1", + "resolved": "https://registry.npmjs.org/matter-history/-/matter-history-1.1.15-dev.1.tgz", + "integrity": "sha512-HorJnsg63ddGYfyGnqaTMYDR5ujZLj/LDt8WjRB4MNgoWIiQ3/2T1Hf2wFocIDJZZtElcDhSGtyCuyMYFpcWVw==", "license": "Apache-2.0", "dependencies": { - "@project-chip/matter-node.js": "0.10.3", - "@project-chip/matter.js": "0.10.3", + "@project-chip/matter-node.js": "0.10.4", + "@project-chip/matter.js": "0.10.4", "moment": "2.30.1", "node-ansi-logger": "3.0.0" }, @@ -7350,76 +6950,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.5.0.tgz", - "integrity": "sha512-uD+XxEoSIvqtm4KE97etm32Tn5MfaZWgWfMMREStLxR6JzvHkc2Tkj7zhTEK5XmtpTmKHNnG8Sot6qDfhHtR1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.5.0", - "@typescript-eslint/parser": "8.5.0", - "@typescript-eslint/utils": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz", - "integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz", - "integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.6.0.tgz", + "integrity": "sha512-eEhhlxCEpCd4helh3AO1hk0UP2MvbRi9CtIAJTVPQjuSXOOO2jsEacNi4UdcJzZJbeuVg1gMhtZ8UYb+NFYPrA==", "dev": true, "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz", - "integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==", - "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/visitor-keys": "8.5.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" + "@typescript-eslint/eslint-plugin": "8.6.0", + "@typescript-eslint/parser": "8.6.0", + "@typescript-eslint/utils": "8.6.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -7434,86 +6973,6 @@ } } }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.5.0", - "@typescript-eslint/types": "8.5.0", - "@typescript-eslint/typescript-estree": "8.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz", - "integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.5.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/typescript-eslint/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/typescript-eslint/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/typescript-eslint/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/undici-types": { "version": "6.19.8", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", diff --git a/package.json b/package.json index 410487b1..aad31e03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matterbridge", - "version": "1.5.7", + "version": "1.5.8-dev.1", "description": "Matterbridge plugin manager for Matter", "author": "https://github.com/Luligu", "license": "Apache-2.0", @@ -126,13 +126,13 @@ "install:jest": "npm install --save-dev jest ts-jest @types/jest eslint-plugin-jest" }, "dependencies": { - "@project-chip/matter-node.js": "0.10.3", - "@project-chip/matter.js": "0.10.3", + "@project-chip/matter-node.js": "^0.10.4", + "@project-chip/matter.js": "^0.10.4", "archiver": "7.0.1", "express": "4.21.0", "glob": "11.0.0", "https": "1.0.0", - "matter-history": "1.1.14", + "matter-history": "^1.1.15-dev.1", "node-ansi-logger": "3.0.0", "node-persist-manager": "1.0.8", "ws": "8.18.0" @@ -154,6 +154,6 @@ "rimraf": "6.0.1", "ts-jest": "29.2.5", "typescript": "5.6.2", - "typescript-eslint": "8.5.0" + "typescript-eslint": "8.6.0" } -} \ No newline at end of file +} From a19cb5027b98693734bf6404385003ad203d2ad6 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:26:07 +0200 Subject: [PATCH 02/22] Moved dev to node:22-bookworm-slim --- docker/Dockerfile.dev | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index deacad76..f65176e8 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM node:22-bullseye-slim AS base +FROM node:22-bookworm-slim AS base WORKDIR /app RUN apt-get update && \ @@ -69,7 +69,7 @@ RUN npm ci && npm run build && npm shrinkwrap --omit=dev && npm pack -FROM node:22-bullseye-slim AS release +FROM node:22-bookworm-slim AS release WORKDIR /app COPY --from=builder /app/*.tgz . From 7af0751c71ae5fc97dfe1c0dcdfbcbfc2f465160 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:00:57 +0200 Subject: [PATCH 03/22] Add podman guidelines to the README.md --- README-PODMAN.md | 105 +++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 ++ 2 files changed, 109 insertions(+) create mode 100644 README-PODMAN.md diff --git a/README-PODMAN.md b/README-PODMAN.md new file mode 100644 index 00000000..bf527aa1 --- /dev/null +++ b/README-PODMAN.md @@ -0,0 +1,105 @@ +# Matterbridge Logo   Matterbridge + +[![npm version](https://img.shields.io/npm/v/matterbridge.svg)](https://www.npmjs.com/package/matterbridge) +[![npm downloads](https://img.shields.io/npm/dt/matterbridge.svg)](https://www.npmjs.com/package/matterbridge) +[![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge?label=docker%20version&sort=semver)](https://hub.docker.com/r/luligu/matterbridge) +[![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge.svg)](https://hub.docker.com/r/luligu/matterbridge) +![Node.js CI](https://github.com/Luligu/matterbridge/actions/workflows/build.yml/badge.svg) + +[![power by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history) +[![power by](https://img.shields.io/badge/powered%20by-node--ansi--logger-blue)](https://www.npmjs.com/package/node-ansi-logger) +[![power by](https://img.shields.io/badge/powered%20by-node--persist--manager-blue)](https://www.npmjs.com/package/node-persist-manager) + +--- + +# Advanced configuration + +## Install Podman if it is not already installed + +``` +cd ~ +sudo apt update +sudo apt install podman -y +podman --version +``` + +## Run matterbridge with podman + +The Matterbridge Docker image, which includes a manifest list for the linux/amd64, linux/arm64 and linux/arm/v7 architectures, is published on Docker Hub and can be used with podman. + +Podman handles container restarts a little differently than Docker. The --restart always flag doesn’t work exactly the same. If you want the container to automatically restart when the system reboots or if it crashes, you can create a systemd unit for the Podman container. + +### First create the Matterbridge directories + +This will create the required directories if they don't exist + +``` +cd ~ +mkdir -p ./Matterbridge +mkdir -p ./.matterbridge +sudo chown -R $USER:$USER ./Matterbridge ./.matterbridge +``` + +You may need to adapt the script to your setup: +- ./Matterbridge is the position outside of the container of your matterbridge plugin directory (inside your home directory). +- ./.matterbridge is the position outside of the container of your matterbridge storage directory (inside your home directory). + +### Run the Podman container (root mode) and start it + +The container must have full access to the host network (needed for matter mdns). + +``` +podman run --name matterbridge \ + -v ~/Matterbridge:/root/Matterbridge \ + -v ~/.matterbridge:/root/.matterbridge \ + --network host --restart always -d docker.io/luligu/matterbridge:latest +``` + +You may need to adapt the script to your setup: +- ~/Matterbridge is the position outside of the container of your matterbridge plugin directory. +- ~/.matterbridge is the position outside of the container of your matterbridge storage directory. + +### Integrate the mattebridge podman container with systemd for automatic startup after reboots + +``` +podman generate systemd --name matterbridge --files --new +sudo mv container-matterbridge.service /etc/systemd/system/ +sudo systemctl enable container-matterbridge +sudo systemctl start container-matterbridge +``` + +### Start the Podman container + +``` +podman start matterbridge +``` + +### Stop the Podman container + +``` +podman stop matterbridge +``` + +### Restart the Podman container + +``` +podman restart matterbridge +``` + +### Remove the Podman container + +``` +podman rm matterbridge +``` + +### Shows the logs + +``` +podman logs matterbridge +``` + +### Shows the logs real time (tail) + +``` +podman logs --tail 1000 -f matterbridge +``` diff --git a/README.md b/README.md index 7191c040..94c0767a 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,10 @@ Config editor: [Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-DOCKER.md) +### Run matterbridge with podman + +[Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-PODMAN.md) + ### Run matterbridge as an home assistant add-on with the official add-on [Advanced configurations](https://github.com/Luligu/matterbridge-home-assistant-addon) From c1edd04891b693eedf5ca426d6cd94d5a50f31a7 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:37:08 +0200 Subject: [PATCH 04/22] Add Dockerfile for shelly latest --- docker/Dockerfile.shelly | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docker/Dockerfile.shelly diff --git a/docker/Dockerfile.shelly b/docker/Dockerfile.shelly new file mode 100644 index 00000000..f4cf139b --- /dev/null +++ b/docker/Dockerfile.shelly @@ -0,0 +1,12 @@ +FROM node:22-bookworm-slim +WORKDIR /app +COPY ./docker/shellyEntrypoint.sh ./ +RUN chmod +x ./shellyEntrypoint.sh && \ + npm install -g npm@latest && \ + npm install -g matterbridge && \ + npm install -g matterbridge-shelly && \ + node -v && \ + npm -v && \ + npm list -g +ENTRYPOINT ["./shellyEntrypoint.sh"] +CMD ["matterbridge", "-docker"] From 8985fe88e6339c9a6b00e53bf2abb46daccafaec Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:39:11 +0200 Subject: [PATCH 05/22] Add Docker Buildx for shelly --- .github/workflows/docker-buildx-dev.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/docker-buildx-dev.yml b/.github/workflows/docker-buildx-dev.yml index 3eefeb7a..f0ac78f2 100644 --- a/.github/workflows/docker-buildx-dev.yml +++ b/.github/workflows/docker-buildx-dev.yml @@ -43,6 +43,16 @@ jobs: run: | echo "Extracted version is: $VERSION ${{ env.VERSION }}" + - name: Run Docker Buildx on shelly + run: | + docker buildx build \ + --platform linux/arm64 \ + -f docker/Dockerfile.shelly \ + -t luligu/matterbridge:shelly \ + --push . + docker manifest inspect luligu/matterbridge:shelly + timeout-minutes: 60 + - name: Run Docker Buildx on dev_shelly run: | docker buildx build \ From 0583fbc39f3bc834f141535dedad712b08d04880 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Tue, 17 Sep 2024 22:12:08 +0200 Subject: [PATCH 06/22] Add instructions for setting permanent journalctl settings --- README-SERVICE.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README-SERVICE.md b/README-SERVICE.md index 470a5ae0..373566d1 100644 --- a/README-SERVICE.md +++ b/README-SERVICE.md @@ -84,6 +84,19 @@ sudo journalctl -u matterbridge.service -f --output cat sudo journalctl --vacuum-time=3d ``` +If you want (is a good idea) to make the setting permanent edit +``` +sudo nano /etc/systemd/journald.conf +``` +add +``` +SystemMaxUse=3d +``` +save it and run +``` +sudo systemctl restart systemd-journald +``` + ### Enable Matterbridge to start automatically on boot ``` From 89ebf2b7670f981e431a837342708cc4b8f427b9 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Tue, 17 Sep 2024 22:16:51 +0200 Subject: [PATCH 07/22] Add instructions for removing sudo password for npm install --- README-SERVICE.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README-SERVICE.md b/README-SERVICE.md index 373566d1..10baf73a 100644 --- a/README-SERVICE.md +++ b/README-SERVICE.md @@ -97,6 +97,18 @@ save it and run sudo systemctl restart systemd-journald ``` +### Verify that with your distro you can run sudo npm install -g matterbridge without putting a password + +If that is not the case run +``` +sudo visudo +``` +add this line replacing USER with your user name (e.g. radxa ALL=(ALL) NOPASSWD: ALL) +``` + ALL=(ALL) NOPASSWD: ALL +``` +save the file and restart + ### Enable Matterbridge to start automatically on boot ``` From 1fdc52b10e4312974ed90f27d2adf39460c1fd01 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Wed, 18 Sep 2024 08:24:58 +0200 Subject: [PATCH 08/22] Refactor systemd instructions for Matterbridge service --- README-SERVICE.md | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/README-SERVICE.md b/README-SERVICE.md index 10baf73a..34504d03 100644 --- a/README-SERVICE.md +++ b/README-SERVICE.md @@ -72,6 +72,18 @@ sudo systemctl stop matterbridge sudo systemctl status matterbridge.service ``` +### Enable Matterbridge to start automatically on boot + +``` +sudo systemctl enable matterbridge.service +``` + +### Disable Matterbridge from starting automatically on boot + +``` +sudo systemctl disable matterbridge.service +``` + ### View the log of Matterbridge in real time (this will show the log with colors) ``` @@ -84,7 +96,7 @@ sudo journalctl -u matterbridge.service -f --output cat sudo journalctl --vacuum-time=3d ``` -If you want (is a good idea) to make the setting permanent edit +If you want to make the setting permanent edit ``` sudo nano /etc/systemd/journald.conf ``` @@ -97,7 +109,7 @@ save it and run sudo systemctl restart systemd-journald ``` -### Verify that with your distro you can run sudo npm install -g matterbridge without putting a password +### Verify that with your distro you can run sudo npm install -g matterbridge without the password If that is not the case run ``` @@ -109,14 +121,3 @@ add this line replacing USER with your user name (e.g. radxa ALL=(ALL) NOPASSWD: ``` save the file and restart -### Enable Matterbridge to start automatically on boot - -``` -sudo systemctl enable matterbridge.service -``` - -### Disable Matterbridge from starting automatically on boot - -``` -sudo systemctl disable matterbridge.service -``` From c17101aacfb0c50782e9fe84b5b9f76dbe3d8d53 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Fri, 20 Sep 2024 09:13:35 +0200 Subject: [PATCH 09/22] Reset session informations --- CHANGELOG.md | 2 +- package.json | 4 ++-- src/matterbridge.ts | 55 ++++++++++++--------------------------------- 3 files changed, 17 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c119f43b..4f143f12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ If you like this project and find it useful, please consider giving it a star on The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository. -## [1.5.8] - 2024-09-19 +## [1.5.8] - 2024-09-20 ### Changed diff --git a/package.json b/package.json index aad31e03..b8d1fe06 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matterbridge", - "version": "1.5.8-dev.1", + "version": "1.5.8-dev.2", "description": "Matterbridge plugin manager for Matter", "author": "https://github.com/Luligu", "license": "Apache-2.0", @@ -156,4 +156,4 @@ "typescript": "5.6.2", "typescript-eslint": "8.6.0" } -} +} \ No newline at end of file diff --git a/src/matterbridge.ts b/src/matterbridge.ts index fe983c3b..05c119e2 100644 --- a/src/matterbridge.ts +++ b/src/matterbridge.ts @@ -133,8 +133,7 @@ export class Matterbridge extends EventEmitter { public matterbridgeQrPairingCode: string | undefined = undefined; public matterbridgeManualPairingCode: string | undefined = undefined; public matterbridgeFabricInformations: SanitizedExposedFabricInformation[] = []; - // public matterbridgeSessionInformations: SanitizedSessionInformation[] = []; - public matterbridgeSessionInformations = new Map(); + public matterbridgeSessionInformations: SanitizedSessionInformation[] = []; public matterbridgePaired = false; public matterbridgeConnected = false; public bridgeMode: 'bridge' | 'childbridge' | 'controller' | '' = ''; @@ -2144,10 +2143,7 @@ export class Matterbridge extends EventEmitter { if (this.bridgeMode === 'bridge') { this.matterbridgePaired = true; this.matterbridgeConnected = true; - // this.matterbridgeSessionInformations = this.sanitizeSessionInformation(sessionInformations); - sessionInformations.forEach((session) => { - this.matterbridgeSessionInformations.set(session.name, this.sanitizeSessionInformation([session])[0]); - }); + this.matterbridgeSessionInformations = this.sanitizeSessionInformation(sessionInformations); } if (this.bridgeMode === 'childbridge') { const plugin = this.plugins.get(pluginName); @@ -2157,36 +2153,16 @@ export class Matterbridge extends EventEmitter { plugin.sessionInformations = this.sanitizeSessionInformation(sessionInformations); } } - - /* - setTimeout(() => { - // We just need to configure the plugins after the controllers are connected - if (this.bridgeMode === 'bridge') { - for (const plugin of this.plugins) { - if (!plugin.enabled || !plugin.loaded || !plugin.started || plugin.error) continue; - try { - this.configurePlugin(plugin); // No await do it asyncronously - } catch (error) { - plugin.error = true; - this.log.error(`Error configuring plugin ${plg}${plugin.name}${er}`, error); - } - } - } - if (this.bridgeMode === 'childbridge') { - for (const plugin of this.plugins) { - if (plugin.name === pluginName && plugin.loaded === true && plugin.started === true && plugin.configured !== true) { - try { - this.configurePlugin(plugin); // No await do it asyncronously - } catch (error) { - plugin.error = true; - this.log.error(`Error configuring plugin ${plg}${plugin.name}${er}`, error); - } - } - } + } else { + if (this.bridgeMode === 'bridge') { + this.matterbridgeSessionInformations = []; + } + if (this.bridgeMode === 'childbridge') { + const plugin = this.plugins.get(pluginName); + if (plugin) { + plugin.sessionInformations = []; } - // logEndpoint(commissioningServer.getRootEndpoint()); - }, 2000); - */ + } } }, commissioningChangedCallback: async (fabricIndex) => { @@ -2198,8 +2174,7 @@ export class Matterbridge extends EventEmitter { if (pluginName === 'Matterbridge') { await this.matterbridgeContext?.clearAll(); this.matterbridgeFabricInformations = []; - // this.matterbridgeSessionInformations = []; - this.matterbridgeSessionInformations.clear(); + this.matterbridgeSessionInformations = []; this.matterbridgePaired = false; this.matterbridgeConnected = false; } else { @@ -2352,8 +2327,7 @@ export class Matterbridge extends EventEmitter { this.matterbridgeQrPairingCode = qrPairingCode; this.matterbridgeManualPairingCode = manualPairingCode; this.matterbridgeFabricInformations = []; - // this.matterbridgeSessionInformations = []; - this.matterbridgeSessionInformations.clear(); + this.matterbridgeSessionInformations = []; this.matterbridgePaired = false; this.matterbridgeConnected = false; } @@ -2377,8 +2351,7 @@ export class Matterbridge extends EventEmitter { }); if (pluginName === 'Matterbridge') { this.matterbridgeFabricInformations = this.sanitizeFabricInformations(fabricInfo); - // this.matterbridgeSessionInformations = []; - this.matterbridgeSessionInformations.clear(); + this.matterbridgeSessionInformations = []; this.matterbridgePaired = true; } if (pluginName !== 'Matterbridge') { From cf8813996edddb975ba9131bd20e25de32962572 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Fri, 20 Sep 2024 09:20:14 +0200 Subject: [PATCH 10/22] CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f143f12..caea4afd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,19 @@ The Home Assistant Community Add-ons and plugins are not verified to work with M ## [1.5.8] - 2024-09-20 +### Added + +- [readme]: Added podman guidelines to the README.md +- [readme]: Added instructions for setting permanent journalctl settings in service mode to prevent journal to grow +- [readme]: Added instructions for removing sudo password for npm install in service mode +- [readme]: Refactor systemd instructions for Matterbridge service + ### Changed - [package]: Update matter-node.js to 0.10.4. - [package]: Update matter-history to 1.1.15. - [package]: Update dependencies. +- [matterbridge]: Reset session informations when the controllers are not connected. Buy me a coffee From f602998e025839bcec4e397c86ce44f75f900e5e Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:02:52 +0200 Subject: [PATCH 11/22] Filter session with isPeerAcive = true --- src/matterbridge.ts | 48 +++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/src/matterbridge.ts b/src/matterbridge.ts index 05c119e2..2d3c9027 100644 --- a/src/matterbridge.ts +++ b/src/matterbridge.ts @@ -2392,29 +2392,31 @@ export class Matterbridge extends EventEmitter { * @returns An array of sanitized session information objects. */ private sanitizeSessionInformation(sessionInfo: SessionInformation[]) { - return sessionInfo.map((info) => { - return { - name: info.name, - nodeId: info.nodeId.toString(), - peerNodeId: info.peerNodeId.toString(), - fabric: info.fabric - ? { - fabricIndex: info.fabric.fabricIndex, - fabricId: info.fabric.fabricId.toString(), - nodeId: info.fabric.nodeId.toString(), - rootNodeId: info.fabric.rootNodeId.toString(), - rootVendorId: info.fabric.rootVendorId, - rootVendorName: this.getVendorIdName(info.fabric.rootVendorId), - label: info.fabric.label, - } - : undefined, - isPeerActive: info.isPeerActive, - secure: info.secure, - lastInteractionTimestamp: info.lastInteractionTimestamp?.toString(), - lastActiveTimestamp: info.lastActiveTimestamp?.toString(), - numberOfActiveSubscriptions: info.numberOfActiveSubscriptions, - } as SanitizedSessionInformation; - }); + return sessionInfo + .filter((info) => info.isPeerActive) + .map((info) => { + return { + name: info.name, + nodeId: info.nodeId.toString(), + peerNodeId: info.peerNodeId.toString(), + fabric: info.fabric + ? { + fabricIndex: info.fabric.fabricIndex, + fabricId: info.fabric.fabricId.toString(), + nodeId: info.fabric.nodeId.toString(), + rootNodeId: info.fabric.rootNodeId.toString(), + rootVendorId: info.fabric.rootVendorId, + rootVendorName: this.getVendorIdName(info.fabric.rootVendorId), + label: info.fabric.label, + } + : undefined, + isPeerActive: info.isPeerActive, + secure: info.secure, + lastInteractionTimestamp: info.lastInteractionTimestamp?.toString(), + lastActiveTimestamp: info.lastActiveTimestamp?.toString(), + numberOfActiveSubscriptions: info.numberOfActiveSubscriptions, + } as SanitizedSessionInformation; + }); } /** From 734d17c1b1f5842cfc0ea6995accd6420fa03bc6 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:06:43 +0200 Subject: [PATCH 12/22] Filter session with isPeerAcive = true --- src/matterbridge.ts | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/matterbridge.ts b/src/matterbridge.ts index 2d3c9027..482a4ea8 100644 --- a/src/matterbridge.ts +++ b/src/matterbridge.ts @@ -2393,28 +2393,28 @@ export class Matterbridge extends EventEmitter { */ private sanitizeSessionInformation(sessionInfo: SessionInformation[]) { return sessionInfo - .filter((info) => info.isPeerActive) - .map((info) => { + .filter((session) => session.isPeerActive) + .map((session) => { return { - name: info.name, - nodeId: info.nodeId.toString(), - peerNodeId: info.peerNodeId.toString(), - fabric: info.fabric + name: session.name, + nodeId: session.nodeId.toString(), + peerNodeId: session.peerNodeId.toString(), + fabric: session.fabric ? { - fabricIndex: info.fabric.fabricIndex, - fabricId: info.fabric.fabricId.toString(), - nodeId: info.fabric.nodeId.toString(), - rootNodeId: info.fabric.rootNodeId.toString(), - rootVendorId: info.fabric.rootVendorId, - rootVendorName: this.getVendorIdName(info.fabric.rootVendorId), - label: info.fabric.label, + fabricIndex: session.fabric.fabricIndex, + fabricId: session.fabric.fabricId.toString(), + nodeId: session.fabric.nodeId.toString(), + rootNodeId: session.fabric.rootNodeId.toString(), + rootVendorId: session.fabric.rootVendorId, + rootVendorName: this.getVendorIdName(session.fabric.rootVendorId), + label: session.fabric.label, } : undefined, - isPeerActive: info.isPeerActive, - secure: info.secure, - lastInteractionTimestamp: info.lastInteractionTimestamp?.toString(), - lastActiveTimestamp: info.lastActiveTimestamp?.toString(), - numberOfActiveSubscriptions: info.numberOfActiveSubscriptions, + isPeerActive: session.isPeerActive, + secure: session.secure, + lastInteractionTimestamp: session.lastInteractionTimestamp?.toString(), + lastActiveTimestamp: session.lastActiveTimestamp?.toString(), + numberOfActiveSubscriptions: session.numberOfActiveSubscriptions, } as SanitizedSessionInformation; }); } From 4ab707a7593487f071eb7803444b6810ffd5ad50 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:16:10 +0200 Subject: [PATCH 13/22] 1.5.8-dev.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8d1fe06..d162b3b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matterbridge", - "version": "1.5.8-dev.2", + "version": "1.5.8-dev.3", "description": "Matterbridge plugin manager for Matter", "author": "https://github.com/Luligu", "license": "Apache-2.0", From 973e5a0c9b40fe262da15142d3b3afe4023a1afe Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:39:26 +0200 Subject: [PATCH 14/22] Jest test for filter sessions --- src/matterbridge.test.ts | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/matterbridge.test.ts b/src/matterbridge.test.ts index e2ee2dfb..4920f7f0 100644 --- a/src/matterbridge.test.ts +++ b/src/matterbridge.test.ts @@ -240,24 +240,38 @@ describe('Matterbridge', () => { }); test('Sanitize sessions', () => { - const sessionInfos: SessionInformation[] = [ + let sessionInfos: SessionInformation[] = [ { name: 'secure/64351', nodeId: NodeId(16784206195868397986n), peerNodeId: NodeId(1604858123872676291n), fabric: { fabricIndex: FabricIndex(2), fabricId: FabricId(456546212146567986n), nodeId: NodeId(1678420619586823323397986n), rootNodeId: NodeId(18446744060824623349729n), rootVendorId: VendorId(4362), label: 'SmartThings Hub 0503' }, - isPeerActive: false, + isPeerActive: true, secure: true, lastInteractionTimestamp: 1720035723121269, lastActiveTimestamp: 1720035761223121, numberOfActiveSubscriptions: 0, }, ]; - expect((matterbridge as any).sanitizeSessionInformation(sessionInfos).length).toBe(1); expect(() => { JSON.stringify(sessionInfos); }).toThrow(); - expect(JSON.stringify((matterbridge as any).sanitizeSessionInformation(sessionInfos)).length).toBe(465); + expect((matterbridge as any).sanitizeSessionInformation(sessionInfos).length).toBe(1); + expect(JSON.stringify((matterbridge as any).sanitizeSessionInformation(sessionInfos)).length).toBe(464); + sessionInfos = [ + { + name: 'secure/64351', + nodeId: NodeId(16784206195868397986n), + peerNodeId: NodeId(1604858123872676291n), + fabric: { fabricIndex: FabricIndex(2), fabricId: FabricId(456546212146567986n), nodeId: NodeId(1678420619586823323397986n), rootNodeId: NodeId(18446744060824623349729n), rootVendorId: VendorId(4362), label: 'SmartThings Hub 0503' }, + isPeerActive: false, + secure: true, + lastInteractionTimestamp: 1720035723121269, + lastActiveTimestamp: 1720035761223121, + numberOfActiveSubscriptions: 0, + }, + ]; + expect((matterbridge as any).sanitizeSessionInformation(sessionInfos).length).toBe(0); }); test('matterbridge -help', async () => { From 07e6e50aede60ea32383fb1bf70f895ed8238bae Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Fri, 20 Sep 2024 17:16:10 +0200 Subject: [PATCH 15/22] 1.5.8-dev.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d162b3b2..677e0e33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matterbridge", - "version": "1.5.8-dev.3", + "version": "1.5.8-dev.4", "description": "Matterbridge plugin manager for Matter", "author": "https://github.com/Luligu", "license": "Apache-2.0", From 43f33dc3b4a6f0e7bfd48b80851e175ce30c2e07 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Fri, 20 Sep 2024 19:11:48 +0200 Subject: [PATCH 16/22] 1.5.8-dev.5 with matter.js 0.10.5 --- CHANGELOG.md | 2 +- package-lock.json | 78 +++++++++++++++++++++++------------------------ package.json | 12 ++++---- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index caea4afd..f08923a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ The Home Assistant Community Add-ons and plugins are not verified to work with M ### Changed -- [package]: Update matter-node.js to 0.10.4. +- [package]: Update matter-node.js to 0.10.5. - [package]: Update matter-history to 1.1.15. - [package]: Update dependencies. - [matterbridge]: Reset session informations when the controllers are not connected. diff --git a/package-lock.json b/package-lock.json index 89669017..b875e267 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,21 @@ { "name": "matterbridge", - "version": "1.5.8-dev.1", + "version": "1.5.8-dev.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "matterbridge", - "version": "1.5.8-dev.1", + "version": "1.5.8-dev.5", "license": "Apache-2.0", "dependencies": { - "@project-chip/matter-node.js": "^0.10.4", - "@project-chip/matter.js": "^0.10.4", + "@project-chip/matter-node.js": "^0.10.5", + "@project-chip/matter.js": "^0.10.5", "archiver": "7.0.1", "express": "4.21.0", "glob": "11.0.0", "https": "1.0.0", - "matter-history": "^1.1.15-dev.1", + "matter-history": "^1.1.15-dev.2", "node-ansi-logger": "3.0.0", "node-persist-manager": "1.0.8", "ws": "8.18.0" @@ -24,14 +24,14 @@ "matterbridge": "dist/cli.js" }, "devDependencies": { - "@eslint/js": "9.10.0", + "@eslint/js": "9.11.0", "@types/archiver": "6.0.2", "@types/eslint__js": "8.42.3", "@types/express": "4.17.21", "@types/jest": "29.5.13", "@types/node": "22.5.5", "@types/ws": "8.5.12", - "eslint": "9.10.0", + "eslint": "9.11.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-jest": "28.8.3", "eslint-plugin-prettier": "5.2.1", @@ -767,9 +767,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.10.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.10.0.tgz", - "integrity": "sha512-fuXtbiP5GWIn8Fz+LWoOMVf/Jxm+aajZYkhi6CuEm4SxymFM+eUWzbO9qXT+L0iCkL5+KGYMCSGxo686H19S1g==", + "version": "9.11.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.0.tgz", + "integrity": "sha512-LPkkenkDqyzTFauZLLAPhIb48fj6drrfMvRGSL9tS3AcZBSVTllemLSNyCvHNNL2t797S/6DJNSIwRwXgMO/eQ==", "dev": true, "license": "MIT", "engines": { @@ -787,9 +787,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.1.0.tgz", - "integrity": "sha512-autAXT203ixhqei9xt+qkYOvY8l6LAFIdT2UXc/RPNeUVfqRF1BV94GTJyVPFKT8nFM6MyVJhjLj9E8JWvf5zQ==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", + "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1444,12 +1444,12 @@ } }, "node_modules/@project-chip/matter-node.js": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@project-chip/matter-node.js/-/matter-node.js-0.10.4.tgz", - "integrity": "sha512-uI+6kSStL8cSChzQ5cmkomm5s3CMnKcc0Racmbgi+igOPphlhI2qNDd343Kd2t+Re0EoXsCOIe+i9nR6GlmNRA==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@project-chip/matter-node.js/-/matter-node.js-0.10.5.tgz", + "integrity": "sha512-gz/1hOExy+I5eMOHErUdy9bDu9RnQah6cwiGBddVFO2T+6cHbCnsZs298E/1TsUAEKyd6jNJHCC3mh0PPt/lpQ==", "license": "Apache-2.0", "dependencies": { - "@project-chip/matter.js": "0.10.4", + "@project-chip/matter.js": "0.10.5", "node-localstorage": "^3.0.5" }, "engines": { @@ -1457,9 +1457,9 @@ } }, "node_modules/@project-chip/matter.js": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@project-chip/matter.js/-/matter.js-0.10.4.tgz", - "integrity": "sha512-n6HbfieIVrZ52n0U38YjtDTLmvXvWkcc1r7RKlAVWuje+ae2/Fz6be7mxxSkybFJYNkni4nwDa4D9xp/GeIYpQ==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@project-chip/matter.js/-/matter.js-0.10.5.tgz", + "integrity": "sha512-OM+RcM2u2Bhc5KJmjZD5svfEuU2BDEqY1zkUoSk11QMLNcTPIMMRyow5OXgMh5uUeto8K46QS48pRzauwuR2IQ==", "license": "Apache-2.0", "dependencies": { "@noble/curves": "^1.5.0" @@ -1590,9 +1590,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", "dev": true, "license": "MIT" }, @@ -2639,9 +2639,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001660", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001660.tgz", - "integrity": "sha512-GacvNTTuATm26qC74pt+ad1fW15mlQ/zuTzzY1ZoIzECTP8HURDfF43kNxPgf7H1jmelCBQTTbBNxdSXOA7Bqg==", + "version": "1.0.30001662", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz", + "integrity": "sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==", "dev": true, "funding": [ { @@ -3068,9 +3068,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.24", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.24.tgz", - "integrity": "sha512-0x0wLCmpdKFCi9ulhvYZebgcPmHTkFVUfU2wzDykadkslKwT4oAmDTHEKLnlrDsMGZe4B+ksn8quZfZjYsBetA==", + "version": "1.5.26", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.26.tgz", + "integrity": "sha512-Z+OMe9M/V6Ep9n/52+b7lkvYEps26z4Yz3vjWL1V61W0q+VLF1pOHhMY17sa4roz4AWmULSI8E6SAojZA5L0YQ==", "dev": true, "license": "ISC" }, @@ -3163,9 +3163,9 @@ } }, "node_modules/eslint": { - "version": "9.10.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.10.0.tgz", - "integrity": "sha512-Y4D0IgtBZfOcOUAIQTSXBKoNGfY0REGqHJG6+Q81vNippW5YlKjHFj4soMxamKK1NXHUWuBZTLdU3Km+L/pcHw==", + "version": "9.11.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.0.tgz", + "integrity": "sha512-yVS6XODx+tMFMDFcG4+Hlh+qG7RM6cCJXtQhCKLSsr3XkLvWggHjCqjfh0XsPPnt1c56oaT6PMgW9XWQQjdHXA==", "dev": true, "license": "MIT", "dependencies": { @@ -3173,8 +3173,8 @@ "@eslint-community/regexpp": "^4.11.0", "@eslint/config-array": "^0.18.0", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.10.0", - "@eslint/plugin-kit": "^0.1.0", + "@eslint/js": "9.11.0", + "@eslint/plugin-kit": "^0.2.0", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.3.0", "@nodelib/fs.walk": "^1.2.8", @@ -5283,13 +5283,13 @@ } }, "node_modules/matter-history": { - "version": "1.1.15-dev.1", - "resolved": "https://registry.npmjs.org/matter-history/-/matter-history-1.1.15-dev.1.tgz", - "integrity": "sha512-HorJnsg63ddGYfyGnqaTMYDR5ujZLj/LDt8WjRB4MNgoWIiQ3/2T1Hf2wFocIDJZZtElcDhSGtyCuyMYFpcWVw==", + "version": "1.1.15-dev.2", + "resolved": "https://registry.npmjs.org/matter-history/-/matter-history-1.1.15-dev.2.tgz", + "integrity": "sha512-tWfUrvOBEpKJYtycoBHv4CJoi6FIQgO7br7kCxQ5lRX8WFXxrjQkdKwyVO7Jhro8iVfZLNAXX+KTvpvOLsL1wQ==", "license": "Apache-2.0", "dependencies": { - "@project-chip/matter-node.js": "0.10.4", - "@project-chip/matter.js": "0.10.4", + "@project-chip/matter-node.js": "0.10.5", + "@project-chip/matter.js": "0.10.5", "moment": "2.30.1", "node-ansi-logger": "3.0.0" }, diff --git a/package.json b/package.json index 677e0e33..53b10ccf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matterbridge", - "version": "1.5.8-dev.4", + "version": "1.5.8-dev.5", "description": "Matterbridge plugin manager for Matter", "author": "https://github.com/Luligu", "license": "Apache-2.0", @@ -126,26 +126,26 @@ "install:jest": "npm install --save-dev jest ts-jest @types/jest eslint-plugin-jest" }, "dependencies": { - "@project-chip/matter-node.js": "^0.10.4", - "@project-chip/matter.js": "^0.10.4", + "@project-chip/matter-node.js": "^0.10.5", + "@project-chip/matter.js": "^0.10.5", "archiver": "7.0.1", "express": "4.21.0", "glob": "11.0.0", "https": "1.0.0", - "matter-history": "^1.1.15-dev.1", + "matter-history": "^1.1.15-dev.2", "node-ansi-logger": "3.0.0", "node-persist-manager": "1.0.8", "ws": "8.18.0" }, "devDependencies": { - "@eslint/js": "9.10.0", + "@eslint/js": "9.11.0", "@types/archiver": "6.0.2", "@types/eslint__js": "8.42.3", "@types/express": "4.17.21", "@types/jest": "29.5.13", "@types/node": "22.5.5", "@types/ws": "8.5.12", - "eslint": "9.10.0", + "eslint": "9.11.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-jest": "28.8.3", "eslint-plugin-prettier": "5.2.1", From f9f50a091fce58dca73c85b65705cee921677200 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Sat, 21 Sep 2024 09:12:24 +0200 Subject: [PATCH 17/22] Add instructions for granting sudo access to npm without password --- README-SERVICE.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README-SERVICE.md b/README-SERVICE.md index 34504d03..37194e40 100644 --- a/README-SERVICE.md +++ b/README-SERVICE.md @@ -115,9 +115,18 @@ If that is not the case run ``` sudo visudo ``` + add this line replacing USER with your user name (e.g. radxa ALL=(ALL) NOPASSWD: ALL) + ``` ALL=(ALL) NOPASSWD: ALL ``` -save the file and restart + +or if you prefers to only give access to npm without password (e.g. radxa ALL=(ALL) NOPASSWD: /usr/bin/npm) + +``` + ALL=(ALL) NOPASSWD: /usr/bin/npm +``` + +save the file and restart the system. From 3e7f8e6de1e1ebc832e0ae525b5beba1938df383 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Sat, 21 Sep 2024 09:21:38 +0200 Subject: [PATCH 18/22] Add instructions for granting sudo access to npm without password --- README-SERVICE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-SERVICE.md b/README-SERVICE.md index 37194e40..6bbacbc0 100644 --- a/README-SERVICE.md +++ b/README-SERVICE.md @@ -122,7 +122,7 @@ add this line replacing USER with your user name (e.g. radxa ALL=(ALL) NOPASSWD: ALL=(ALL) NOPASSWD: ALL ``` -or if you prefers to only give access to npm without password (e.g. radxa ALL=(ALL) NOPASSWD: /usr/bin/npm) +or if you prefers to only give access to npm without password try (e.g. radxa ALL=(ALL) NOPASSWD: /usr/bin/npm) ``` ALL=(ALL) NOPASSWD: /usr/bin/npm From af6a50a4ed46cb4cbe69ad39400f8c2c1fd53f56 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Sat, 21 Sep 2024 09:24:02 +0200 Subject: [PATCH 19/22] Add instructions for granting sudo access to npm without password --- README-SERVICE.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README-SERVICE.md b/README-SERVICE.md index 6bbacbc0..8494397c 100644 --- a/README-SERVICE.md +++ b/README-SERVICE.md @@ -111,7 +111,14 @@ sudo systemctl restart systemd-journald ### Verify that with your distro you can run sudo npm install -g matterbridge without the password -If that is not the case run +Run the following command to verify if you can install Matterbridge globally without being prompted for a password: + +``` +sudo npm install -g matterbridge +``` +If you are not prompted for a password, no further action is required. + +If that is not the case open the sudoers file for editing using visudo ``` sudo visudo ``` From d70e5ab01bf3efd2172f8eb93e02df66aef0d6d5 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Sat, 21 Sep 2024 11:08:53 +0200 Subject: [PATCH 20/22] 1.5.8-dev.6 --- CHANGELOG.md | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f08923a9..77dc1d00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ If you like this project and find it useful, please consider giving it a star on The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository. +### New Apple firmware + +Please read this: https://github.com/Luligu/matterbridge/discussions/135 + ## [1.5.8] - 2024-09-20 ### Added @@ -16,6 +20,7 @@ The Home Assistant Community Add-ons and plugins are not verified to work with M - [readme]: Added instructions for setting permanent journalctl settings in service mode to prevent journal to grow - [readme]: Added instructions for removing sudo password for npm install in service mode - [readme]: Refactor systemd instructions for Matterbridge service +- [readme]: Added link to install matterbridge like ha addon https://github.com/Luligu/matterbridge-home-assistant-addon ### Changed diff --git a/package.json b/package.json index 53b10ccf..2b5df8c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matterbridge", - "version": "1.5.8-dev.5", + "version": "1.5.8-dev.6", "description": "Matterbridge plugin manager for Matter", "author": "https://github.com/Luligu", "license": "Apache-2.0", From 3ad7e0b118cbd08fff073253b3c9f0589a1421f7 Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Sat, 21 Sep 2024 14:13:17 +0200 Subject: [PATCH 21/22] 1.5.8-dev.7 --- .github/workflows/docker-buildx-dev.yml | 10 ++++++++++ CHANGELOG.md | 4 ++-- docker/Dockerfile.main | 2 +- docker/Dockerfile.test | 18 ++++++++++++++++++ package.json | 2 +- 5 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 docker/Dockerfile.test diff --git a/.github/workflows/docker-buildx-dev.yml b/.github/workflows/docker-buildx-dev.yml index f0ac78f2..96ae3223 100644 --- a/.github/workflows/docker-buildx-dev.yml +++ b/.github/workflows/docker-buildx-dev.yml @@ -63,6 +63,16 @@ jobs: docker manifest inspect luligu/matterbridge:dev_shelly timeout-minutes: 60 + - name: Run Docker Buildx on test + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64,linux/arm/v7 \ + -f docker/Dockerfile.test \ + -t luligu/matterbridge:test \ + --push . + docker manifest inspect luligu/matterbridge:test + timeout-minutes: 60 + - name: Run Docker Buildx on dev run: | docker buildx build \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 77dc1d00..c3be379a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,11 +8,11 @@ If you like this project and find it useful, please consider giving it a star on The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository. -### New Apple firmware +### New Apple firmware v. 18.0 Please read this: https://github.com/Luligu/matterbridge/discussions/135 -## [1.5.8] - 2024-09-20 +## [1.5.8] - 2024-09-21 ### Added diff --git a/docker/Dockerfile.main b/docker/Dockerfile.main index f7cb26c7..ee5798e0 100644 --- a/docker/Dockerfile.main +++ b/docker/Dockerfile.main @@ -1,4 +1,4 @@ -FROM node:20-bullseye-slim AS base +FROM node:22-bookworm-slim AS base WORKDIR /app # RUN npm install -g npm@10.7.0 diff --git a/docker/Dockerfile.test b/docker/Dockerfile.test new file mode 100644 index 00000000..0f599983 --- /dev/null +++ b/docker/Dockerfile.test @@ -0,0 +1,18 @@ +FROM node:22-bookworm-slim +WORKDIR /app +RUN npm install -g npm@latest && \ + npm install -g matterbridge && \ + npm install -g matterbridge-zigbee2mqtt && \ + npm install -g matterbridge-somfy-tahoma && \ + npm install -g matterbridge-shelly && \ + npm install -g matterbridge-example-accessory-platform && \ + npm install -g matterbridge-example-dynamic-platform && \ + npm install -g matterbridge-eve-door && \ + npm install -g matterbridge-eve-motion && \ + npm install -g matterbridge-eve-energy && \ + npm install -g matterbridge-eve-room && \ + npm install -g matterbridge-eve-weather && \ + node -v && \ + npm -v && \ + npm list -g +CMD ["matterbridge", "-docker"] diff --git a/package.json b/package.json index 2b5df8c3..f28b2eb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matterbridge", - "version": "1.5.8-dev.6", + "version": "1.5.8-dev.7", "description": "Matterbridge plugin manager for Matter", "author": "https://github.com/Luligu", "license": "Apache-2.0", From c9fc6a27d9d41a677acabd4f59cd03634e52310c Mon Sep 17 00:00:00 2001 From: Luligu <132135057+Luligu@users.noreply.github.com> Date: Sat, 21 Sep 2024 15:03:41 +0200 Subject: [PATCH 22/22] Release 1.5.8 --- .github/workflows/docker-buildx-dev.yml | 10 ---- .github/workflows/docker-buildx-main.yml | 2 +- docker/Dockerfile.latest | 61 ++++++++++++++++++++++++ docker/Dockerfile.main | 36 -------------- docker/Dockerfile.test | 18 ------- package-lock.json | 22 ++++----- package.json | 8 ++-- 7 files changed, 77 insertions(+), 80 deletions(-) create mode 100644 docker/Dockerfile.latest delete mode 100644 docker/Dockerfile.main delete mode 100644 docker/Dockerfile.test diff --git a/.github/workflows/docker-buildx-dev.yml b/.github/workflows/docker-buildx-dev.yml index 96ae3223..f0ac78f2 100644 --- a/.github/workflows/docker-buildx-dev.yml +++ b/.github/workflows/docker-buildx-dev.yml @@ -63,16 +63,6 @@ jobs: docker manifest inspect luligu/matterbridge:dev_shelly timeout-minutes: 60 - - name: Run Docker Buildx on test - run: | - docker buildx build \ - --platform linux/amd64,linux/arm64,linux/arm/v7 \ - -f docker/Dockerfile.test \ - -t luligu/matterbridge:test \ - --push . - docker manifest inspect luligu/matterbridge:test - timeout-minutes: 60 - - name: Run Docker Buildx on dev run: | docker buildx build \ diff --git a/.github/workflows/docker-buildx-main.yml b/.github/workflows/docker-buildx-main.yml index 6e4aa6fc..bd71cfb4 100644 --- a/.github/workflows/docker-buildx-main.yml +++ b/.github/workflows/docker-buildx-main.yml @@ -47,7 +47,7 @@ jobs: run: | docker buildx build \ --platform linux/amd64,linux/arm64,linux/arm/v7 \ - -f docker/Dockerfile.main \ + -f docker/Dockerfile.latest \ -t luligu/matterbridge:latest \ -t luligu/matterbridge:${{ env.VERSION }} \ --push . diff --git a/docker/Dockerfile.latest b/docker/Dockerfile.latest new file mode 100644 index 00000000..16b42b15 --- /dev/null +++ b/docker/Dockerfile.latest @@ -0,0 +1,61 @@ +FROM node:22-bookworm-slim AS builder +WORKDIR /app +COPY ./package.json ./ +COPY ./tsconfig.json ./ +COPY ./src ./src +COPY ./frontend/build ./frontend/build +RUN npm ci && npm run build && npm link + + +FROM builder AS release +WORKDIR /app +COPY --from=builder /app/package.json ./ +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/frontend/build ./frontend/build +RUN npm link + +# Install Matterbridge plugins +RUN npm install -g npm@latest && \ + npm install -g matterbridge-zigbee2mqtt && \ + npm install -g matterbridge-somfy-tahoma && \ + npm install -g matterbridge-shelly && \ + npm install -g matterbridge-example-accessory-platform && \ + npm install -g matterbridge-example-dynamic-platform && \ + npm install -g matterbridge-eve-door && \ + npm install -g matterbridge-eve-motion && \ + npm install -g matterbridge-eve-energy && \ + npm install -g matterbridge-eve-room && \ + npm install -g matterbridge-eve-weather && \ + node -v && \ + npm -v && \ + npm list -g + +WORKDIR /app +CMD ["matterbridge", "-docker"] + + + + + + + + +FROM node:22-bookworm-slim +WORKDIR /app +RUN npm install -g npm@latest && \ + npm install -g matterbridge && \ + npm install -g matterbridge-zigbee2mqtt && \ + npm install -g matterbridge-somfy-tahoma && \ + npm install -g matterbridge-shelly && \ + npm install -g matterbridge-example-accessory-platform && \ + npm install -g matterbridge-example-dynamic-platform && \ + npm install -g matterbridge-eve-door && \ + npm install -g matterbridge-eve-motion && \ + npm install -g matterbridge-eve-energy && \ + npm install -g matterbridge-eve-room && \ + npm install -g matterbridge-eve-weather && \ + node -v && \ + npm -v && \ + npm list -g +CMD ["matterbridge", "-docker"] diff --git a/docker/Dockerfile.main b/docker/Dockerfile.main deleted file mode 100644 index ee5798e0..00000000 --- a/docker/Dockerfile.main +++ /dev/null @@ -1,36 +0,0 @@ -FROM node:22-bookworm-slim AS base -WORKDIR /app -# RUN npm install -g npm@10.7.0 - - -FROM base AS builder -WORKDIR /app -COPY ./package.json ./ -COPY ./tsconfig.json ./ -COPY ./src ./src -COPY ./frontend/build ./frontend/build -RUN npm install && npm run build && npm link - - -FROM base AS release -WORKDIR /app -COPY --from=builder /app/package.json ./ -COPY --from=builder /app/dist ./dist -COPY --from=builder /app/node_modules ./node_modules -COPY --from=builder /app/frontend/build ./frontend/build -RUN npm link - -# Install Matterbridge plugins -RUN npm -g install matterbridge-example-accessory-platform -RUN npm -g install matterbridge-example-dynamic-platform -RUN npm -g install matterbridge-zigbee2mqtt -RUN npm -g install matterbridge-somfy-tahoma -RUN npm -g install matterbridge-shelly -RUN npm -g install matterbridge-eve-door -RUN npm -g install matterbridge-eve-motion -RUN npm -g install matterbridge-eve-energy -RUN npm -g install matterbridge-eve-room -RUN npm -g install matterbridge-eve-weather - -WORKDIR /app -CMD ["matterbridge", "-docker"] diff --git a/docker/Dockerfile.test b/docker/Dockerfile.test deleted file mode 100644 index 0f599983..00000000 --- a/docker/Dockerfile.test +++ /dev/null @@ -1,18 +0,0 @@ -FROM node:22-bookworm-slim -WORKDIR /app -RUN npm install -g npm@latest && \ - npm install -g matterbridge && \ - npm install -g matterbridge-zigbee2mqtt && \ - npm install -g matterbridge-somfy-tahoma && \ - npm install -g matterbridge-shelly && \ - npm install -g matterbridge-example-accessory-platform && \ - npm install -g matterbridge-example-dynamic-platform && \ - npm install -g matterbridge-eve-door && \ - npm install -g matterbridge-eve-motion && \ - npm install -g matterbridge-eve-energy && \ - npm install -g matterbridge-eve-room && \ - npm install -g matterbridge-eve-weather && \ - node -v && \ - npm -v && \ - npm list -g -CMD ["matterbridge", "-docker"] diff --git a/package-lock.json b/package-lock.json index b875e267..2301ee65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,21 +1,21 @@ { "name": "matterbridge", - "version": "1.5.8-dev.5", + "version": "1.5.8-dev.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "matterbridge", - "version": "1.5.8-dev.5", + "version": "1.5.8-dev.7", "license": "Apache-2.0", "dependencies": { - "@project-chip/matter-node.js": "^0.10.5", - "@project-chip/matter.js": "^0.10.5", + "@project-chip/matter-node.js": "0.10.5", + "@project-chip/matter.js": "0.10.5", "archiver": "7.0.1", "express": "4.21.0", "glob": "11.0.0", "https": "1.0.0", - "matter-history": "^1.1.15-dev.2", + "matter-history": "1.1.15", "node-ansi-logger": "3.0.0", "node-persist-manager": "1.0.8", "ws": "8.18.0" @@ -3068,9 +3068,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.26", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.26.tgz", - "integrity": "sha512-Z+OMe9M/V6Ep9n/52+b7lkvYEps26z4Yz3vjWL1V61W0q+VLF1pOHhMY17sa4roz4AWmULSI8E6SAojZA5L0YQ==", + "version": "1.5.27", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.27.tgz", + "integrity": "sha512-o37j1vZqCoEgBuWWXLHQgTN/KDKe7zwpiY5CPeq2RvUqOyJw9xnrULzZAEVQ5p4h+zjMk7hgtOoPdnLxr7m/jw==", "dev": true, "license": "ISC" }, @@ -5283,9 +5283,9 @@ } }, "node_modules/matter-history": { - "version": "1.1.15-dev.2", - "resolved": "https://registry.npmjs.org/matter-history/-/matter-history-1.1.15-dev.2.tgz", - "integrity": "sha512-tWfUrvOBEpKJYtycoBHv4CJoi6FIQgO7br7kCxQ5lRX8WFXxrjQkdKwyVO7Jhro8iVfZLNAXX+KTvpvOLsL1wQ==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/matter-history/-/matter-history-1.1.15.tgz", + "integrity": "sha512-Oj94/qZkmATEhBpPFeidWUkpSYHkv01rERooWwMeMefOQdrXEwbKr0wb77Oe2ez/EFXYYlsmVoVWiA1cKauXgA==", "license": "Apache-2.0", "dependencies": { "@project-chip/matter-node.js": "0.10.5", diff --git a/package.json b/package.json index f28b2eb3..13c85874 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matterbridge", - "version": "1.5.8-dev.7", + "version": "1.5.8", "description": "Matterbridge plugin manager for Matter", "author": "https://github.com/Luligu", "license": "Apache-2.0", @@ -126,13 +126,13 @@ "install:jest": "npm install --save-dev jest ts-jest @types/jest eslint-plugin-jest" }, "dependencies": { - "@project-chip/matter-node.js": "^0.10.5", - "@project-chip/matter.js": "^0.10.5", + "@project-chip/matter-node.js": "0.10.5", + "@project-chip/matter.js": "0.10.5", "archiver": "7.0.1", "express": "4.21.0", "glob": "11.0.0", "https": "1.0.0", - "matter-history": "^1.1.15-dev.2", + "matter-history": "1.1.15", "node-ansi-logger": "3.0.0", "node-persist-manager": "1.0.8", "ws": "8.18.0"