diff --git a/README.md b/README.md index f95e97bf..3dde9425 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,18 @@ TBD --> ## Changelog + +### __WORK IN PROGRESS__ +* (@Apollon77) Makes sure to delete all objects and stop device when a device is deleted in UI +* (@Apollon77) When a devices/bridge object is deleted and adapter runs we try to detect this and stop the device/bridge +* (@Apollon77) Optimizes close handling of adapter +* (@Apollon77) Uses adapter version as Software and Hardware versions in the exposed Matter devices +* (@Apollon77) Fixes "auto" flags in backend when make no sense in objects +* (@Apollon77) Fixes "auto" flag in UI +* (@Apollon77) Prevents cyclic state updates when a state is updated by the adapter to matter +* (@Apollon77) Log warnings when device optional device states are not mapped +* (@Apollon77) Hides Product-ID and VendorId fields in UI when adding devices into a bridge + ### 0.2.2 (2024-11-28) * (@Apollon77) Uses plain matter.js logs for better readability * (@Apollon77) Prevents ghost connection entries in the UI diff --git a/package-lock.json b/package-lock.json index 935fd7ef..25ec8145 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,9 +13,9 @@ "@iobroker/dm-utils": "^0.6.9", "@iobroker/i18n": "^0.3.1", "@iobroker/type-detector": "^4.0.1", - "@matter/main": "0.11.6", - "@matter/nodejs": "0.11.6", - "@project-chip/matter.js": "0.11.6", + "@matter/main": "0.11.8", + "@matter/nodejs": "0.11.8", + "@project-chip/matter.js": "0.11.8", "axios": "^1.7.8", "jsonwebtoken": "^9.0.2" }, @@ -40,7 +40,7 @@ "node": ">=18" }, "optionalDependencies": { - "@matter/nodejs-ble": "0.11.6" + "@matter/nodejs-ble": "0.11.8" } }, "node_modules/@alcalzone/pak": { @@ -747,64 +747,64 @@ } }, "node_modules/@matter/general": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@matter/general/-/general-0.11.6.tgz", - "integrity": "sha512-HPFTmaCREFAXPW5JLWwOU5Esbu1fAu2zBnlEbt0+c60vZzoLWbMLxXv0fKz2bSgNuvmly0ccX/1DF4CAlzeDbQ==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@matter/general/-/general-0.11.8.tgz", + "integrity": "sha512-DBfa8A//DNVIpPWJzxQuE81svMTwxwKKNlODEhbJSXohXG8FaYwal2tcUQJCJwVb8eyWybOgKA30oX8qhpbHZw==", "license": "Apache-2.0", "dependencies": { "@noble/curves": "^1.7.0" } }, "node_modules/@matter/main": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@matter/main/-/main-0.11.6.tgz", - "integrity": "sha512-NJRFAEF9Pgf2X8oMppAGOUEJdMUzi+evzkLpw4X96f2OpiMjfB3Nvef6C9QmYSzhh8hleCW4PV4ablmBIh9Kig==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@matter/main/-/main-0.11.8.tgz", + "integrity": "sha512-6se6hK21KzpltK0BgV3wtsKVeGaT0H9VEkQZQ51InVx7O0EQjib0PoqNorFgdubGTISJnkcR/s/0vYw4PdiDxg==", "license": "Apache-2.0", "dependencies": { - "@matter/general": "0.11.6", - "@matter/model": "0.11.6", - "@matter/node": "0.11.6", - "@matter/protocol": "0.11.6", - "@matter/types": "0.11.6", + "@matter/general": "0.11.8", + "@matter/model": "0.11.8", + "@matter/node": "0.11.8", + "@matter/protocol": "0.11.8", + "@matter/types": "0.11.8", "@noble/curves": "^1.7.0" }, "optionalDependencies": { - "@matter/nodejs": "0.11.6" + "@matter/nodejs": "0.11.8" } }, "node_modules/@matter/model": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@matter/model/-/model-0.11.6.tgz", - "integrity": "sha512-D8w2datMmqoSwUejOlm9BONG4vSnc0+MF0GmicTEq1fUnvu1bOcgergtg0IcbyeIkm1n7ngJAAtBxcG5ENh99g==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@matter/model/-/model-0.11.8.tgz", + "integrity": "sha512-EPZ8DEiVXYN4VJ3ylHj1hJVwlBJQk2QuePOfXxA2KaM1GSXUKiHW4TeyI+Jez7BzCfuWdyymCufA5grQn6pmEA==", "license": "Apache-2.0", "dependencies": { - "@matter/general": "0.11.6", + "@matter/general": "0.11.8", "@noble/curves": "^1.7.0" } }, "node_modules/@matter/node": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@matter/node/-/node-0.11.6.tgz", - "integrity": "sha512-zMNWdEhG9TluKbz2J3yBEwtGPlmLYQQQR7Xg1nr2xzUgLaxSal/GXuyr20VdwMa5RvLcdMeW3zJ+uoVhS1Q9zw==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@matter/node/-/node-0.11.8.tgz", + "integrity": "sha512-TqcsQGlclFcXw5MpnhF4xFSp6B90IDpDDafYRlO+/Zoe4HojdLnRWHyA3OJfoQy7+HXSDVy2aqVi591KotZHng==", "license": "Apache-2.0", "dependencies": { - "@matter/general": "0.11.6", - "@matter/model": "0.11.6", - "@matter/protocol": "0.11.6", - "@matter/types": "0.11.6", + "@matter/general": "0.11.8", + "@matter/model": "0.11.8", + "@matter/protocol": "0.11.8", + "@matter/types": "0.11.8", "@noble/curves": "^1.7.0" } }, "node_modules/@matter/nodejs": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@matter/nodejs/-/nodejs-0.11.6.tgz", - "integrity": "sha512-nJCMh34AEigLM3/GvHJJ/V0n4+6i9rpH0n19PcdkbKW4Yxvo5cE3l/Nq5Yh9ajTIUMx5Wh13s1N0nlM62WuOdw==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@matter/nodejs/-/nodejs-0.11.8.tgz", + "integrity": "sha512-4DuO+qnnGCrh0ppt+FkY4HN351ehuFmnrWcD7GNVvog+aNJozjbZm2KrugJczUnd8VEISDFJtUmbQWmx5vVXeA==", "license": "Apache-2.0", "dependencies": { - "@matter/general": "0.11.6", - "@matter/node": "0.11.6", - "@matter/protocol": "0.11.6", - "@matter/types": "0.11.6", + "@matter/general": "0.11.8", + "@matter/node": "0.11.8", + "@matter/protocol": "0.11.8", + "@matter/types": "0.11.8", "node-localstorage": "^3.0.5" }, "engines": { @@ -812,15 +812,15 @@ } }, "node_modules/@matter/nodejs-ble": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@matter/nodejs-ble/-/nodejs-ble-0.11.6.tgz", - "integrity": "sha512-FUUhhIK1gp7vg9Bs8eg8o+D74WX4srYde2hrHuxLDjI66dlgUYCnjaKiA+1BC1vmGdmdCjJx397ALKuf197FeQ==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@matter/nodejs-ble/-/nodejs-ble-0.11.8.tgz", + "integrity": "sha512-vDgHL66wUomRJVFhHn0tjjgEZNl9kiKLsQfpNr6ZkMiU4e81o9IKO0pyeEjZ1A1VMVDIlYaSwAn/onuMA56dbA==", "license": "Apache-2.0", "optional": true, "dependencies": { - "@matter/general": "0.11.6", - "@matter/protocol": "0.11.6", - "@matter/types": "0.11.6" + "@matter/general": "0.11.8", + "@matter/protocol": "0.11.8", + "@matter/types": "0.11.8" }, "engines": { "node": ">=18.0.0" @@ -831,25 +831,25 @@ } }, "node_modules/@matter/protocol": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@matter/protocol/-/protocol-0.11.6.tgz", - "integrity": "sha512-FA0FUBGhXljzNyevS5hmGfRUYQlHetfpX+9RuPs/WD+Xc5ZG3myjLvXkQWiwDdEkR5m1jHzF9uyex5hpUaDstA==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@matter/protocol/-/protocol-0.11.8.tgz", + "integrity": "sha512-/Sc/m2X4uEvMoO4g9gX17ZedPhYG2EYEmNvsX9zRMBnL+YAfX4/MrsOl+6Xr6Qe05n02doOpxaNodcQGJE5C/g==", "license": "Apache-2.0", "dependencies": { - "@matter/general": "0.11.6", - "@matter/model": "0.11.6", - "@matter/types": "0.11.6", + "@matter/general": "0.11.8", + "@matter/model": "0.11.8", + "@matter/types": "0.11.8", "@noble/curves": "^1.7.0" } }, "node_modules/@matter/types": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@matter/types/-/types-0.11.6.tgz", - "integrity": "sha512-TKaBh1+OFJ1IKuK2x6FG05/udWaNseH8DVJluF5hYIz17rNkkeCBEu6HjRtZpqFpLxOAOlgzrNGmp8BMK+9hJg==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@matter/types/-/types-0.11.8.tgz", + "integrity": "sha512-APva+1an3NSNIP3KyYsHxQKEzSwmPn+6nWFIOCiRX3VC5+vTRRBYSAOg/0KMPApHhTrwjbB8R9AhBmPbTIVvdw==", "license": "Apache-2.0", "dependencies": { - "@matter/general": "0.11.6", - "@matter/model": "0.11.6", + "@matter/general": "0.11.8", + "@matter/model": "0.11.8", "@noble/curves": "^1.7.0" } }, @@ -1012,16 +1012,16 @@ } }, "node_modules/@project-chip/matter.js": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@project-chip/matter.js/-/matter.js-0.11.6.tgz", - "integrity": "sha512-546FM6h+lKjYkmaW/luB45HLGKlE07MP03/y1peiwy96TMGTcvhbJIUQE0WCGBJM/zBY2XeyR0OVqgw8OmDKzw==", + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@project-chip/matter.js/-/matter.js-0.11.8.tgz", + "integrity": "sha512-6wF2k7W0RNN0aknB9Vn7Yv3vOQzwcJ7XL3qXSMES62OIe5ZIjNteN3Co/vgyz6r4j2deAif4+4xcMMIy/RqPjA==", "license": "Apache-2.0", "dependencies": { - "@matter/general": "0.11.6", - "@matter/model": "0.11.6", - "@matter/node": "0.11.6", - "@matter/protocol": "0.11.6", - "@matter/types": "0.11.6", + "@matter/general": "0.11.8", + "@matter/model": "0.11.8", + "@matter/node": "0.11.8", + "@matter/protocol": "0.11.8", + "@matter/types": "0.11.8", "@noble/curves": "^1.7.0" } }, diff --git a/package.json b/package.json index 1949a1ab..0abb01bc 100644 --- a/package.json +++ b/package.json @@ -23,16 +23,16 @@ "url": "https://github.com/ioBroker/ioBroker.matter" }, "optionalDependencies": { - "@matter/nodejs-ble": "0.11.6" + "@matter/nodejs-ble": "0.11.8" }, "dependencies": { "@iobroker/adapter-core": "^3.2.2", "@iobroker/i18n": "^0.3.1", "@iobroker/dm-utils": "^0.6.9", "@iobroker/type-detector": "^4.0.1", - "@matter/main": "0.11.6", - "@matter/nodejs": "0.11.6", - "@project-chip/matter.js": "0.11.6", + "@matter/main": "0.11.8", + "@matter/nodejs": "0.11.8", + "@project-chip/matter.js": "0.11.8", "axios": "^1.7.8", "jsonwebtoken": "^9.0.2" }, diff --git a/src-admin/package-lock.json b/src-admin/package-lock.json index b7688e65..60c93b0c 100644 --- a/src-admin/package-lock.json +++ b/src-admin/package-lock.json @@ -1,12 +1,12 @@ { "name": "iobroker.matter", - "version": "0.2.1", + "version": "0.2.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iobroker.matter", - "version": "0.2.1", + "version": "0.2.2", "dependencies": { "@foxriver76/iob-component-lib": "^0.1.6", "@iobroker/adapter-react-v5": "^7.4.2", diff --git a/src-admin/src/Tabs/Bridges.tsx b/src-admin/src/Tabs/Bridges.tsx index 94f688f9..afe524f4 100644 --- a/src-admin/src/Tabs/Bridges.tsx +++ b/src-admin/src/Tabs/Bridges.tsx @@ -157,6 +157,7 @@ interface AddCustomDeviceDialog { oid: string; name: string; deviceType: Types | ''; + detectedDeviceType?: Types; bridgeIndex: number; hasOnState?: boolean; } @@ -796,6 +797,7 @@ export class Bridges extends BridgesAndDevices { addCustomDeviceDialog: { oid, name, + detectedDeviceType: deviceType, deviceType: SUPPORTED_DEVICES.includes(deviceType) ? deviceType : '', bridgeIndex: this.bridgeIndex as number, hasOnState: controls[0].devices[0].hasOnState, @@ -819,7 +821,7 @@ export class Bridges extends BridgesAndDevices { socket={this.props.socket} detectedDevices={this.props.detectedDevices} setDetectedDevices={(detectedDevices: DetectedRoom[]) => this.props.setDetectedDevices(detectedDevices)} - type="device" + type="bridge" name={this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].name} /> ); @@ -992,6 +994,9 @@ export class Bridges extends BridgesAndDevices { onClick={() => { const addCustomDeviceDialog = this.state.addCustomDeviceDialog; if (addCustomDeviceDialog) { + const isAutoType = + !!addCustomDeviceDialog.detectedDeviceType && + addCustomDeviceDialog.detectedDeviceType === addCustomDeviceDialog.deviceType; void this.addDevicesToBridge( [ { @@ -999,7 +1004,8 @@ export class Bridges extends BridgesAndDevices { common: { name: addCustomDeviceDialog.name, }, - deviceType: addCustomDeviceDialog.deviceType as Types, + deviceType: (addCustomDeviceDialog.deviceType ?? + addCustomDeviceDialog.detectedDeviceType) as Types, hasOnState: addCustomDeviceDialog.hasOnState, // ignored type: 'device', @@ -1008,7 +1014,7 @@ export class Bridges extends BridgesAndDevices { }, ], addCustomDeviceDialog.bridgeIndex, - false, + isAutoType, ); } diff --git a/src-admin/src/Tabs/Devices.tsx b/src-admin/src/Tabs/Devices.tsx index 330e9573..282f6ab2 100644 --- a/src-admin/src/Tabs/Devices.tsx +++ b/src-admin/src/Tabs/Devices.tsx @@ -88,6 +88,7 @@ interface DevicesState extends BridgesAndDevicesState { oid: string; name: string; deviceType: Types | ''; + detectedDeviceType?: Types; vendorID: string; productID: string; noComposed?: boolean; @@ -657,24 +658,30 @@ class Devices extends BridgesAndDevices {