Skip to content

Commit

Permalink
Merge pull request #31 from Luligu/dev
Browse files Browse the repository at this point in the history
Release 2.1.1
  • Loading branch information
Luligu committed Jun 20, 2024
2 parents c4b49c4 + 014cff0 commit 4c9e2d5
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 19 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

All notable changes to this project will be documented in this file.

## [2.1.1] - 2024-06-20

### Added

- [dependencies]: Update dependencies (mqtt to 5.7.2).
- [schema]: Added info log when the plugin starts to register devices and groups. Added empty bridge/config and bridge/definitions handlers.

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

## [2.1.0] - 2024-06-19

### Added
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "matterbridge-zigbee2mqtt",
"version": "2.1.0",
"version": "2.1.1",
"description": "Matterbridge zigbee2mqtt plugin",
"author": "https://github.com/Luligu",
"license": "Apache-2.0",
Expand Down Expand Up @@ -85,14 +85,14 @@
},
"dependencies": {
"moment": "^2.30.1",
"mqtt": "^5.7.1",
"mqtt": "^5.7.2",
"node-ansi-logger": "^1.9.5"
},
"devDependencies": {
"@eslint/js": "^9.5.0",
"@types/eslint__js": "^8.42.3",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.5",
"@types/node": "^20.14.6",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.6.0",
"eslint-plugin-prettier": "^5.1.3",
Expand Down
6 changes: 3 additions & 3 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,23 +327,23 @@ export class ZigbeePlatform extends MatterbridgeDynamicPlatform {
this.log.debug('Setting flag to start when zigbee2mqtt sends devices: ', reason);
}

// if (this.debugEnabled) Logger.defaultLogLevel = Level.INFO;

if (!this.z2mDevicesRegistered && this.z2mBridgeDevices) {
this.log.info(`Registering ${this.z2mBridgeDevices.length} devices`);
for (const device of this.z2mBridgeDevices) {
await this.registerZigbeeDevice(device);
}
this.z2mDevicesRegistered = true;
}

if (!this.z2mGroupsRegistered && this.z2mBridgeGroups) {
this.log.info(`Registering ${this.z2mBridgeGroups.length} groups`);
for (const group of this.z2mBridgeGroups) {
await this.registerZigbeeGroup(group);
}
this.z2mGroupsRegistered = true;
}

// if (this.debugEnabled) Logger.defaultLogLevel = Level.DEBUG;
this.log.info(`Started zigbee2mqtt dynamic platform v${this.version}: ` + reason);
}

override async onConfigure() {
Expand Down
14 changes: 13 additions & 1 deletion src/zigbee2mqtt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @file zigbee2mqtt.ts
* @author Luca Liguori
* @date 2023-06-30
* @version 2.2.28
* @version 2.2.29
*
* Copyright 2023, 2024 Luca Liguori.
*
Expand Down Expand Up @@ -795,6 +795,18 @@ export class Zigbee2MQTT extends EventEmitter {
} else if (topic.startsWith(this.mqttTopic + '/bridge/logging')) {
// const data = JSON.parse(payload.toString());
// this.log.debug('classZigbee2MQTT=>Message bridge/logging', data);
} else if (topic.startsWith(this.mqttTopic + '/bridge/config')) {
this.log.debug(`Message topic: ${topic}`);
// const data = JSON.parse(payload.toString());
// this.log.debug('classZigbee2MQTT=>Message bridge/config', data);
} else if (topic.startsWith(this.mqttTopic + '/bridge/definitions')) {
this.log.debug(`Message topic: ${topic}`);
// const data = JSON.parse(payload.toString());
// this.log.debug('classZigbee2MQTT=>Message bridge/definitions', data);
} else if (topic.startsWith(this.mqttTopic + '/bridge')) {
this.log.debug(`Message topic: ${topic}`);
// const data = JSON.parse(payload.toString());
// this.log.debug('classZigbee2MQTT=>Message bridge/definitions', data);
} else {
let entity = topic.replace(this.mqttTopic + '/', '');
let service = '';
Expand Down

0 comments on commit 4c9e2d5

Please sign in to comment.