matterbridge-zigbee2mqtt 2.4.5-dev.4 → 2.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,11 +4,26 @@ If you like this project and find it useful, please consider giving it a star on
4
4
 
5
5
  All notable changes to this project will be documented in this file.
6
6
 
7
- ## [2.4.5] - 2025-02-04
7
+ ## [2.4.6] - 2025-02-20
8
+
9
+ ### Changed
10
+
11
+ - [package]: Updated package.
12
+ - [package]: Updated dependencies.
13
+
14
+ ### Fixed
15
+
16
+ - [schema]: Fix wrong default in schema (thanks https://github.com/robvanoostenrijk).
17
+
18
+ <a href="https://www.buymeacoffee.com/luligugithub">
19
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
20
+ </a>
21
+
22
+ ## [2.4.5] - 2025-02-05
8
23
 
9
24
  ### Added
10
25
 
11
- - [thermostat]: Added fan_only mode (tested by https://github.com/robvanoostenrijk).
26
+ - [thermostat]: Added fan_only mode (tested by https://github.com/robvanoostenrijk). No controllers seem to support this mode in UI right now.
12
27
 
13
28
  ### Changed
14
29
 
package/dist/entity.js CHANGED
@@ -5,8 +5,8 @@ import * as color from 'matterbridge/utils';
5
5
  import { SwitchesTag, NumberTag } from 'matterbridge/matter';
6
6
  import { getClusterNameById, ClusterId } from 'matterbridge/matter/types';
7
7
  import { ElectricalEnergyMeasurement, ElectricalPowerMeasurement, OnOffCluster, LevelControlCluster, WindowCoveringCluster, DoorLockCluster, BridgedDeviceBasicInformation, OnOff, LevelControl, ColorControl, ColorControlCluster, TemperatureMeasurement, BooleanState, RelativeHumidityMeasurement, PressureMeasurement, OccupancySensing, IlluminanceMeasurement, PowerSource, WindowCovering, DoorLock, ThermostatCluster, Thermostat, AirQuality, TotalVolatileOrganicCompoundsConcentrationMeasurement, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, FormaldehydeConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm25ConcentrationMeasurement, Pm10ConcentrationMeasurement, } from 'matterbridge/matter/clusters';
8
- import EventEmitter from 'events';
9
- import { hostname } from 'os';
8
+ import EventEmitter from 'node:events';
9
+ import { hostname } from 'node:os';
10
10
  export class ZigbeeEntity extends EventEmitter {
11
11
  log;
12
12
  serial = '';
package/dist/platform.js CHANGED
@@ -2,7 +2,7 @@ import { MatterbridgeDynamicPlatform } from 'matterbridge';
2
2
  import { dn, gn, db, wr, zb, payloadStringify, rs, debugStringify, CYAN, er, nf } from 'matterbridge/logger';
3
3
  import { isValidNumber, isValidString, waiter } from 'matterbridge/utils';
4
4
  import { BridgedDeviceBasicInformation, DoorLock } from 'matterbridge/matter/clusters';
5
- import path from 'path';
5
+ import path from 'node:path';
6
6
  import { ZigbeeDevice, ZigbeeGroup } from './entity.js';
7
7
  import { Zigbee2MQTT } from './zigbee2mqtt.js';
8
8
  export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
@@ -358,6 +358,9 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
358
358
  }
359
359
  async onShutdown(reason) {
360
360
  await super.onShutdown(reason);
361
+ this.z2m.removeAllListeners();
362
+ this.z2m.stop();
363
+ this.publishCallBack = undefined;
361
364
  this.log.debug('Shutting down zigbee2mqtt platform: ' + reason);
362
365
  for (const entity of this.zigbeeEntities) {
363
366
  entity.destroy();
@@ -370,8 +373,6 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
370
373
  this.availabilityTimer = undefined;
371
374
  if (this.config.unregisterOnShutdown === true)
372
375
  await this.unregisterAllDevices();
373
- this.z2m.stop();
374
- this.publishCallBack = undefined;
375
376
  this.log.info(`Shutdown zigbee2mqtt dynamic platform v${this.version}`);
376
377
  }
377
378
  setPublishCallBack(onPublish) {
@@ -1,11 +1,11 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import * as util from 'util';
4
- import * as crypto from 'crypto';
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import * as util from 'node:util';
4
+ import * as crypto from 'node:crypto';
5
5
  import { connectAsync } from 'mqtt';
6
- import { EventEmitter } from 'events';
6
+ import { EventEmitter } from 'node:events';
7
7
  import { AnsiLogger, rs, db, dn, gn, er, zb, hk, id, idn, ign, REVERSE, REVERSEOFF } from 'node-ansi-logger';
8
- import { mkdir } from 'fs/promises';
8
+ import { mkdir } from 'node:fs/promises';
9
9
  const writeFile = util.promisify(fs.writeFile);
10
10
  export class Zigbee2MQTT extends EventEmitter {
11
11
  log;
@@ -51,8 +51,7 @@
51
51
  "description": "The devices in the list will not be exposed.",
52
52
  "type": "array",
53
53
  "items": {
54
- "type": "string",
55
- "default": "device or group name"
54
+ "type": "string"
56
55
  },
57
56
  "uniqueItems": true,
58
57
  "selectFrom": "name"
@@ -61,8 +60,7 @@
61
60
  "description": "Only the devices in the list will be exposed.",
62
61
  "type": "array",
63
62
  "items": {
64
- "type": "string",
65
- "default": "device or group name"
63
+ "type": "string"
66
64
  },
67
65
  "uniqueItems": true,
68
66
  "selectFrom": "name"
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "matterbridge-zigbee2mqtt",
3
- "version": "2.4.5-dev.4",
3
+ "version": "2.4.6",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-zigbee2mqtt",
9
- "version": "2.4.5-dev.4",
9
+ "version": "2.4.6",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "moment": "2.30.1",
13
13
  "mqtt": "5.10.3",
14
- "node-ansi-logger": "3.0.0",
14
+ "node-ansi-logger": "3.0.1",
15
15
  "node-persist-manager": "1.0.8"
16
16
  },
17
17
  "engines": {
18
- "node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0"
18
+ "node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
19
19
  },
20
20
  "funding": {
21
21
  "type": "buymeacoffee",
@@ -23,9 +23,9 @@
23
23
  }
24
24
  },
25
25
  "node_modules/@babel/runtime": {
26
- "version": "7.26.7",
27
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.7.tgz",
28
- "integrity": "sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ==",
26
+ "version": "7.26.9",
27
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.9.tgz",
28
+ "integrity": "sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
31
  "regenerator-runtime": "^0.14.0"
@@ -35,9 +35,9 @@
35
35
  }
36
36
  },
37
37
  "node_modules/@types/node": {
38
- "version": "22.13.1",
39
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.1.tgz",
40
- "integrity": "sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==",
38
+ "version": "22.13.4",
39
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz",
40
+ "integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==",
41
41
  "license": "MIT",
42
42
  "dependencies": {
43
43
  "undici-types": "~6.20.0"
@@ -335,12 +335,12 @@
335
335
  "license": "MIT"
336
336
  },
337
337
  "node_modules/node-ansi-logger": {
338
- "version": "3.0.0",
339
- "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.0.0.tgz",
340
- "integrity": "sha512-OkXtONak4f+mH1ECBP7xoM2sD4ZiFKyKVb/QrMCMwX8k/W8ZuDA0WgskD9PJMZqgaUF1wUQA39yVdpGH/xUsuw==",
338
+ "version": "3.0.1",
339
+ "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.0.1.tgz",
340
+ "integrity": "sha512-Nx7nkO6Sby8Eti1UFFdff3gImEC35izuvf+aRFh3mrDZ8hgXM/cZdflkpDMnDdxnabYl91LVi4RhB/dm5Yk9iA==",
341
341
  "license": "MIT",
342
342
  "engines": {
343
- "node": "18.x || 20.x || 22.x"
343
+ "node": ">=18.0.0"
344
344
  },
345
345
  "funding": {
346
346
  "type": "buymeacoffee",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-zigbee2mqtt",
3
- "version": "2.4.5-dev.4",
3
+ "version": "2.4.6",
4
4
  "description": "Matterbridge zigbee2mqtt plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
@@ -38,12 +38,12 @@
38
38
  "zigbee2mqtt"
39
39
  ],
40
40
  "engines": {
41
- "node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0"
41
+ "node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
42
42
  },
43
43
  "dependencies": {
44
44
  "moment": "2.30.1",
45
45
  "mqtt": "5.10.3",
46
- "node-ansi-logger": "3.0.0",
46
+ "node-ansi-logger": "3.0.1",
47
47
  "node-persist-manager": "1.0.8"
48
48
  }
49
49
  }