diff --git a/CHANGELOG.md b/CHANGELOG.md
index 02caf0d..ba710db 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,22 @@ If you like this project and find it useful, please consider giving it a star on
All notable changes to this project will be documented in this file.
+## [2.4.0] - 2025-01-08
+
+### Added
+
+- [selectDevice]: Added selectDevice to get the device names from a list in the config editor.
+- [configUrl]: Added configUrl to get a link to the zigbee2mqtt frontend from the Matterbridge frontend Devices page.
+
+### Changed
+
+- [illuminace_lux]: Follow removal of illuminace_lux https://github.com/Koenkk/zigbee-herdsman-converters/pull/8304
+- [package]: Updated dependencies.
+
+
+
+
+
## [2.3.2] - 2024-12-24
### Changed
diff --git a/matterbridge-zigbee2mqtt.schema.json b/matterbridge-zigbee2mqtt.schema.json
index 04e0e01..0acaaab 100644
--- a/matterbridge-zigbee2mqtt.schema.json
+++ b/matterbridge-zigbee2mqtt.schema.json
@@ -2,7 +2,11 @@
"title": "Matterbridge zigbee2mqtt plugin",
"description": "matterbridge-zigbee2mqtt v. 2.0.17 by https://github.com/Luligu",
"type": "object",
- "required": ["host", "port", "topic"],
+ "required": [
+ "host",
+ "port",
+ "topic"
+ ],
"properties": {
"name": {
"description": "Plugin name",
@@ -46,36 +50,42 @@
"description": "The devices in the list will not be exposed.",
"type": "array",
"items": {
- "type": "string"
- }
+ "type": "string",
+ "default": "device or group name"
+ },
+ "selectFrom": "name"
},
"whiteList": {
"description": "Only the devices in the list will be exposed.",
"type": "array",
"items": {
"type": "string"
- }
+ },
+ "selectFrom": "name"
},
"switchList": {
"description": "The devices in the list will be exposed like switches (don't use it for Alexa, use lightList or outletList instead).",
"type": "array",
"items": {
"type": "string"
- }
+ },
+ "selectFrom": "name"
},
"lightList": {
"description": "The devices in the list will be exposed like lights.",
"type": "array",
"items": {
"type": "string"
- }
+ },
+ "selectFrom": "name"
},
"outletList": {
"description": "The devices in the list will be exposed like outlets.",
"type": "array",
"items": {
"type": "string"
- }
+ },
+ "selectFrom": "name"
},
"featureBlackList": {
"description": "The features in the list will not be exposed for all devices.",
@@ -110,4 +120,4 @@
"default": false
}
}
-}
+}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 52931ce..600f20d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "matterbridge-zigbee2mqtt",
- "version": "2.3.2",
+ "version": "2.4.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "matterbridge-zigbee2mqtt",
- "version": "2.3.2",
+ "version": "2.4.0",
"license": "Apache-2.0",
"dependencies": {
"moment": "2.30.1",
@@ -18,7 +18,7 @@
"@eslint/js": "9.17.0",
"@types/eslint__js": "8.42.3",
"@types/jest": "29.5.14",
- "@types/node": "22.10.2",
+ "@types/node": "22.10.5",
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jest": "28.10.0",
@@ -27,7 +27,7 @@
"prettier": "3.4.2",
"ts-jest": "29.2.5",
"typescript": "5.7.2",
- "typescript-eslint": "8.18.2"
+ "typescript-eslint": "8.19.1"
},
"engines": {
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0"
@@ -1441,9 +1441,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
- "version": "22.10.2",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.2.tgz",
- "integrity": "sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==",
+ "version": "22.10.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz",
+ "integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.20.0"
@@ -1493,21 +1493,21 @@
"license": "MIT"
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz",
- "integrity": "sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.19.1.tgz",
+ "integrity": "sha512-tJzcVyvvb9h/PB96g30MpxACd9IrunT7GF9wfA9/0TJ1LxGOJx1TdPzSbBBnNED7K9Ka8ybJsnEpiXPktolTLg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
- "@typescript-eslint/scope-manager": "8.18.2",
- "@typescript-eslint/type-utils": "8.18.2",
- "@typescript-eslint/utils": "8.18.2",
- "@typescript-eslint/visitor-keys": "8.18.2",
+ "@typescript-eslint/scope-manager": "8.19.1",
+ "@typescript-eslint/type-utils": "8.19.1",
+ "@typescript-eslint/utils": "8.19.1",
+ "@typescript-eslint/visitor-keys": "8.19.1",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
"natural-compare": "^1.4.0",
- "ts-api-utils": "^1.3.0"
+ "ts-api-utils": "^2.0.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1523,16 +1523,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.2.tgz",
- "integrity": "sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.19.1.tgz",
+ "integrity": "sha512-67gbfv8rAwawjYx3fYArwldTQKoYfezNUT4D5ioWetr/xCrxXxvleo3uuiFuKfejipvq+og7mjz3b0G2bVyUCw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/scope-manager": "8.18.2",
- "@typescript-eslint/types": "8.18.2",
- "@typescript-eslint/typescript-estree": "8.18.2",
- "@typescript-eslint/visitor-keys": "8.18.2",
+ "@typescript-eslint/scope-manager": "8.19.1",
+ "@typescript-eslint/types": "8.19.1",
+ "@typescript-eslint/typescript-estree": "8.19.1",
+ "@typescript-eslint/visitor-keys": "8.19.1",
"debug": "^4.3.4"
},
"engines": {
@@ -1548,14 +1548,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.2.tgz",
- "integrity": "sha512-YJFSfbd0CJjy14r/EvWapYgV4R5CHzptssoag2M7y3Ra7XNta6GPAJPPP5KGB9j14viYXyrzRO5GkX7CRfo8/g==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.19.1.tgz",
+ "integrity": "sha512-60L9KIuN/xgmsINzonOcMDSB8p82h95hoBfSBtXuO4jlR1R9L1xSkmVZKgCPVfavDlXihh4ARNjXhh1gGnLC7Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.18.2",
- "@typescript-eslint/visitor-keys": "8.18.2"
+ "@typescript-eslint/types": "8.19.1",
+ "@typescript-eslint/visitor-keys": "8.19.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1566,16 +1566,16 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.2.tgz",
- "integrity": "sha512-AB/Wr1Lz31bzHfGm/jgbFR0VB0SML/hd2P1yxzKDM48YmP7vbyJNHRExUE/wZsQj2wUCvbWH8poNHFuxLqCTnA==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.19.1.tgz",
+ "integrity": "sha512-Rp7k9lhDKBMRJB/nM9Ksp1zs4796wVNyihG9/TU9R6KCJDNkQbc2EOKjrBtLYh3396ZdpXLtr/MkaSEmNMtykw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/typescript-estree": "8.18.2",
- "@typescript-eslint/utils": "8.18.2",
+ "@typescript-eslint/typescript-estree": "8.19.1",
+ "@typescript-eslint/utils": "8.19.1",
"debug": "^4.3.4",
- "ts-api-utils": "^1.3.0"
+ "ts-api-utils": "^2.0.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1590,9 +1590,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.2.tgz",
- "integrity": "sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.19.1.tgz",
+ "integrity": "sha512-JBVHMLj7B1K1v1051ZaMMgLW4Q/jre5qGK0Ew6UgXz1Rqh+/xPzV1aW581OM00X6iOfyr1be+QyW8LOUf19BbA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1604,20 +1604,20 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz",
- "integrity": "sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.19.1.tgz",
+ "integrity": "sha512-jk/TZwSMJlxlNnqhy0Eod1PNEvCkpY6MXOXE/WLlblZ6ibb32i2We4uByoKPv1d0OD2xebDv4hbs3fm11SMw8Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.18.2",
- "@typescript-eslint/visitor-keys": "8.18.2",
+ "@typescript-eslint/types": "8.19.1",
+ "@typescript-eslint/visitor-keys": "8.19.1",
"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"
+ "ts-api-utils": "^2.0.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1657,16 +1657,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.2.tgz",
- "integrity": "sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.19.1.tgz",
+ "integrity": "sha512-IxG5gLO0Ne+KaUc8iW1A+XuKLd63o4wlbI1Zp692n1xojCl/THvgIKXJXBZixTh5dd5+yTJ/VXH7GJaaw21qXA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
- "@typescript-eslint/scope-manager": "8.18.2",
- "@typescript-eslint/types": "8.18.2",
- "@typescript-eslint/typescript-estree": "8.18.2"
+ "@typescript-eslint/scope-manager": "8.19.1",
+ "@typescript-eslint/types": "8.19.1",
+ "@typescript-eslint/typescript-estree": "8.19.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -1681,13 +1681,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.2.tgz",
- "integrity": "sha512-zORcwn4C3trOWiCqFQP1x6G3xTRyZ1LYydnj51cRnJ6hxBlr/cKPckk+PKPUw/fXmvfKTcw7bwY3w9izgx5jZw==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.19.1.tgz",
+ "integrity": "sha512-fzmjU8CHK853V/avYZAvuVut3ZTfwN5YtMaoi+X9Y9MA9keaWNHC3zEQ9zvyX/7Hj+5JkNyK1l7TOR2hevHB6Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.18.2",
+ "@typescript-eslint/types": "8.19.1",
"eslint-visitor-keys": "^4.2.0"
},
"engines": {
@@ -1974,9 +1974,9 @@
"license": "MIT"
},
"node_modules/bl": {
- "version": "6.0.16",
- "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.16.tgz",
- "integrity": "sha512-V/kz+z2Mx5/6qDfRCilmrukUXcXuCoXKg3/3hDvzKKoSUx8CJKudfIoT29XZc3UE9xBvxs5qictiHdprwtteEg==",
+ "version": "6.0.18",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-6.0.18.tgz",
+ "integrity": "sha512-2k76XmWCuvu9HTvu3tFOl5HDdCH0wLZ/jHYva/LBVJmc9oX8yUtNQjxrFmbTdXsCSmIxwVTANZPNDfMQrvHFUw==",
"license": "MIT",
"dependencies": {
"@types/readable-stream": "^4.0.0",
@@ -2411,9 +2411,9 @@
}
},
"node_modules/electron-to-chromium": {
- "version": "1.5.76",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.76.tgz",
- "integrity": "sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ==",
+ "version": "1.5.79",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.79.tgz",
+ "integrity": "sha512-nYOxJNxQ9Om4EC88BE4pPoNI8xwSFf8pU/BAeOl4Hh/b/i6V4biTAzwV7pXi3ARKeoYO5JZKMIXTryXSVer5RA==",
"dev": true,
"license": "ISC"
},
@@ -2791,9 +2791,9 @@
"license": "Apache-2.0"
},
"node_modules/fast-glob": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
- "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
+ "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -2801,7 +2801,7 @@
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.2",
"merge2": "^1.3.0",
- "micromatch": "^4.0.4"
+ "micromatch": "^4.0.8"
},
"engines": {
"node": ">=8.6.0"
@@ -4844,9 +4844,9 @@
"license": "MIT"
},
"node_modules/readable-stream": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.6.0.tgz",
- "integrity": "sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw==",
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz",
+ "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==",
"license": "MIT",
"dependencies": {
"abort-controller": "^3.0.0",
@@ -5295,16 +5295,16 @@
}
},
"node_modules/ts-api-utils": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz",
- "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.0.tgz",
+ "integrity": "sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==",
"dev": true,
"license": "MIT",
"engines": {
- "node": ">=16"
+ "node": ">=18.12"
},
"peerDependencies": {
- "typescript": ">=4.2.0"
+ "typescript": ">=4.8.4"
}
},
"node_modules/ts-jest": {
@@ -5419,15 +5419,15 @@
}
},
"node_modules/typescript-eslint": {
- "version": "8.18.2",
- "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.2.tgz",
- "integrity": "sha512-KuXezG6jHkvC3MvizeXgupZzaG5wjhU3yE8E7e6viOvAvD9xAWYp8/vy0WULTGe9DYDWcQu7aW03YIV3mSitrQ==",
+ "version": "8.19.1",
+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.19.1.tgz",
+ "integrity": "sha512-LKPUQpdEMVOeKluHi8md7rwLcoXHhwvWp3x+sJkMuq3gGm9yaYJtPo8sRZSblMFJ5pcOGCAak/scKf1mvZDlQw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/eslint-plugin": "8.18.2",
- "@typescript-eslint/parser": "8.18.2",
- "@typescript-eslint/utils": "8.18.2"
+ "@typescript-eslint/eslint-plugin": "8.19.1",
+ "@typescript-eslint/parser": "8.19.1",
+ "@typescript-eslint/utils": "8.19.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
diff --git a/package.json b/package.json
index c18b23a..bf9cfdb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "matterbridge-zigbee2mqtt",
- "version": "2.3.2",
+ "version": "2.4.0",
"description": "Matterbridge zigbee2mqtt plugin",
"author": "https://github.com/Luligu",
"license": "Apache-2.0",
@@ -89,7 +89,7 @@
"@eslint/js": "9.17.0",
"@types/eslint__js": "8.42.3",
"@types/jest": "29.5.14",
- "@types/node": "22.10.2",
+ "@types/node": "22.10.5",
"eslint": "9.17.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jest": "28.10.0",
@@ -98,6 +98,6 @@
"prettier": "3.4.2",
"ts-jest": "29.2.5",
"typescript": "5.7.2",
- "typescript-eslint": "8.18.2"
+ "typescript-eslint": "8.19.1"
}
}
\ No newline at end of file
diff --git a/src/entity.ts b/src/entity.ts
index c8eabc7..d60401b 100644
--- a/src/entity.ts
+++ b/src/entity.ts
@@ -209,14 +209,6 @@ export class ZigbeeEntity extends EventEmitter {
// Modify voltage to battery_voltage
if (key === 'voltage' && this.isDevice && this.device?.power_source === 'Battery') key = 'battery_voltage';
- // Modify illuminance and illuminance_lux
- if (key === 'illuminance' && this.isDevice && this.device && this.device.definition && ['RTCGQ14LM'].includes(this.device.definition.model)) {
- key = 'illuminance_lux';
- }
- if (key === 'illuminance' && typeof value === 'number' && this.isDevice && this.device && this.device.definition && ['ZG-204ZL', 'ZG-205Z/A'].includes(this.device.definition.model)) {
- value = value * 10;
- }
-
// Lookup the property in the propertyMap and ZigbeeToMatter table
const propertyMap = this.propertyMap.get(key);
if (propertyMap) {
@@ -930,8 +922,7 @@ export const z2ms: ZigbeeToMatter[] = [
{ type: '', name: 'presence', property: 'presence', deviceType: occupancySensor, cluster: OccupancySensing.Cluster.id, attribute: 'occupancy', converter: (value) => { return { occupied: value as boolean } } },
{ type: '', name: 'occupancy', property: 'occupancy', deviceType: occupancySensor, cluster: OccupancySensing.Cluster.id, attribute: 'occupancy', converter: (value) => { return { occupied: value as boolean } } },
- { type: '', name: 'illuminance', property: 'illuminance', deviceType: lightSensor, cluster: IlluminanceMeasurement.Cluster.id, attribute: 'measuredValue', converter: (value) => { return Math.round(Math.max(Math.min(value, 0xfffe), 0)) } },
- { type: '', name: 'illuminance_lux', property: 'illuminance_lux', deviceType: lightSensor, cluster: IlluminanceMeasurement.Cluster.id, attribute: 'measuredValue', converter: (value) => { return Math.round(Math.max(Math.min(10000 * Math.log10(value), 0xfffe), 0)) } },
+ { type: '', name: 'illuminance', property: 'illuminance', deviceType: lightSensor, cluster: IlluminanceMeasurement.Cluster.id, attribute: 'measuredValue', converter: (value) => { return Math.round(Math.max(Math.min(10000 * Math.log10(value), 0xfffe), 0)) } },
{ type: '', name: 'contact', property: 'contact', deviceType: contactSensor, cluster: BooleanState.Cluster.id, attribute: 'stateValue', converter: (value) => { return value } },
{ type: '', name: 'water_leak', property: 'water_leak', deviceType: contactSensor, cluster: BooleanState.Cluster.id, attribute: 'stateValue', converter: (value) => { return !value } },
{ type: '', name: 'vibration', property: 'vibration', deviceType: contactSensor, cluster: BooleanState.Cluster.id, attribute: 'stateValue', converter: (value) => { return !value } },
diff --git a/src/index.test.ts b/src/index.test.ts
index 6421c6d..5d2880a 100644
--- a/src/index.test.ts
+++ b/src/index.test.ts
@@ -26,7 +26,7 @@ describe('initializePlugin', () => {
matterbridgeDirectory: './jest/matterbridge',
matterbridgePluginDirectory: './jest/plugins',
systemInformation: { ipv4Address: undefined },
- matterbridgeVersion: '1.6.7',
+ matterbridgeVersion: '1.7.1',
getDevices: jest.fn(() => {
// console.log('getDevices called');
return [];
diff --git a/src/platform.test.ts b/src/platform.test.ts
index d9b6039..f2c6c91 100644
--- a/src/platform.test.ts
+++ b/src/platform.test.ts
@@ -34,7 +34,7 @@ describe('TestPlatform', () => {
matterbridgeDirectory: './jest/matterbridge',
matterbridgePluginDirectory: './jest/plugins',
systemInformation: { ipv4Address: undefined },
- matterbridgeVersion: '1.6.7',
+ matterbridgeVersion: '1.7.1',
getDevices: jest.fn(() => {
// console.log('getDevices called');
return [];
diff --git a/src/platform.ts b/src/platform.ts
index 5a0d487..2a44b95 100644
--- a/src/platform.ts
+++ b/src/platform.ts
@@ -76,8 +76,8 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
super(matterbridge, log, config);
// Verify that Matterbridge is the correct version
- if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('1.6.6')) {
- throw new Error(`This plugin requires Matterbridge version >= "1.6.6". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend."`);
+ if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('1.7.1')) {
+ throw new Error(`This plugin requires Matterbridge version >= "1.7.1". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend."`);
}
// this.log.debug(`Config:')}${rs}`, config);
@@ -510,21 +510,8 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
}
}
- /*
- public validateWhiteBlackList(entityName: string) {
- if (this.whiteList.length > 0 && !this.whiteList.find((name) => name === entityName)) {
- this.log.warn(`Skipping ${dn}${entityName}${wr} because not in whitelist`);
- return false;
- }
- if (this.blackList.length > 0 && this.blackList.find((name) => name === entityName)) {
- this.log.warn(`Skipping ${dn}${entityName}${wr} because in blacklist`);
- return false;
- }
- return true;
- }
- */
-
private async registerZigbeeDevice(device: BridgeDevice): Promise {
+ this.selectDevice.set(device.ieee_address, { serial: device.ieee_address, name: device.friendly_name });
if (!this.validateDeviceWhiteBlackList(device.friendly_name)) {
return undefined;
}
@@ -533,6 +520,7 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
try {
matterDevice = await ZigbeeDevice.create(this, device);
if (matterDevice.bridgedDevice) {
+ matterDevice.bridgedDevice.configUrl = `http://${this.mqttHost}:8080/#/device/${device.ieee_address}/info`;
await this.registerDevice(matterDevice.bridgedDevice);
this.bridgedDevices.push(matterDevice.bridgedDevice);
this.zigbeeEntities.push(matterDevice);
@@ -545,6 +533,7 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
}
public async registerZigbeeGroup(group: BridgeGroup): Promise {
+ this.selectDevice.set(`group-${group.id}`, { serial: `group-${group.id}`, name: group.friendly_name });
if (!this.validateDeviceWhiteBlackList(group.friendly_name)) {
return undefined;
}
@@ -553,8 +542,8 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
try {
matterGroup = await ZigbeeGroup.create(this, group);
if (matterGroup.bridgedDevice) {
+ matterGroup.bridgedDevice.configUrl = `http://${this.mqttHost}:8080/#/group/${group.id}`;
await this.registerDevice(matterGroup.bridgedDevice);
- // console.error('Plugin:', matterGroup.bridgedDevice.plugin);
this.bridgedDevices.push(matterGroup.bridgedDevice);
this.zigbeeEntities.push(matterGroup);
this.log.debug(`Registered group ${gn}${group.friendly_name}${db} ID: ${zb}${group.id}${db}`);