matterbridge-bthome 0.0.3 → 1.0.0
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 +22 -0
- package/README.md +1 -1
- package/bin/bthome.js +1 -0
- package/dist/BTHome.js +2 -3
- package/dist/{platform.js → module.js} +5 -7
- package/matterbridge-bthome.config.json +9 -0
- package/npm-shrinkwrap.json +210 -669
- package/package.json +6 -7
- package/dist/index.js +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,28 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
8
8
|
<img src="bmc-button.svg" alt="Buy me a coffee" width="120">
|
|
9
9
|
</a>
|
|
10
10
|
|
|
11
|
+
## [1.0.0] - 2025-10-28
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- [package]: Updated dependencies.
|
|
16
|
+
- [package]: Bumped platform to v.1.0.0.
|
|
17
|
+
- [package]: Bumped package to automator v.2.0.10.
|
|
18
|
+
- [jest]: Bumped jestHelpers to v.1.0.10.
|
|
19
|
+
- [package]: Require matterbridge v.3.3.0.
|
|
20
|
+
- [package]: Added default config.
|
|
21
|
+
- [platform]: Updated to new signature PlatformMatterbridge.
|
|
22
|
+
- [workflows]: Ignore any .md in build.yaml.
|
|
23
|
+
- [workflows]: Ignore any .md in codeql.yaml.
|
|
24
|
+
- [workflows]: Ignore any .md in codecov.yaml.
|
|
25
|
+
- [workflows]: Improved speed on Node CI.
|
|
26
|
+
- [devcontainer]: Added the plugin name to the container.
|
|
27
|
+
- [devcontainer]: Improved performance of first build with shallow clone.
|
|
28
|
+
|
|
29
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
30
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
31
|
+
</a>
|
|
32
|
+
|
|
11
33
|
## [0.0.3] - 2025-05-19
|
|
12
34
|
|
|
13
35
|
### Changed
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Features:
|
|
|
19
19
|
|
|
20
20
|
- The bluetooth works correctly on all platforms and is based on the @stoprocent fork of noble.
|
|
21
21
|
- The discovered BTHome are stored with all attributes to easily restart the plugin.
|
|
22
|
-
- The plugin has also a command line to test and verify the bluetooth adapter and the ble network.
|
|
22
|
+
- The plugin has also a command line **bthome** to test and verify the bluetooth adapter and the ble network.
|
|
23
23
|
|
|
24
24
|
If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-bthome and sponsoring it.
|
|
25
25
|
|
package/bin/bthome.js
CHANGED
package/dist/BTHome.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
2
2
|
import { hasParameter, isValidNumber, isValidString } from 'matterbridge/utils';
|
|
3
3
|
import { AnsiLogger, nf, BLUE, GREEN, MAGENTA, YELLOW } from 'matterbridge/logger';
|
|
4
|
-
import {
|
|
4
|
+
import { CYAN } from 'node-ansi-logger';
|
|
5
5
|
import { decodeBTHome } from './BTHomeDecoder.js';
|
|
6
6
|
import { decodeShellyManufacturerData } from './BTHomeShellyMdDecoder.js';
|
|
7
|
-
import { CYAN } from 'node-ansi-logger';
|
|
8
7
|
const _blushellies = [
|
|
9
8
|
'38:39:8f:8b:d2:29',
|
|
10
9
|
'28:68:47:fc:9a:6b',
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import { bridgedNode, contactSensor, genericSwitch, humiditySensor, lightSensor, MatterbridgeDynamicPlatform, MatterbridgeEndpoint, occupancySensor, powerSource, pressureSensor, temperatureSensor, } from 'matterbridge';
|
|
2
2
|
import { db, debugStringify, idn, rs, BLUE, nf } from 'matterbridge/logger';
|
|
3
|
-
import { isValidArray } from 'matterbridge/utils';
|
|
4
3
|
import { NumberTag } from 'matterbridge/matter';
|
|
5
4
|
import { BTHome } from './BTHome.js';
|
|
5
|
+
export default function initializePlugin(matterbridge, log, config) {
|
|
6
|
+
return new Platform(matterbridge, log, config);
|
|
7
|
+
}
|
|
6
8
|
export class Platform extends MatterbridgeDynamicPlatform {
|
|
7
9
|
btHome = new BTHome();
|
|
8
10
|
bridgedDevices = new Map();
|
|
9
11
|
constructor(matterbridge, log, config) {
|
|
10
12
|
super(matterbridge, log, config);
|
|
11
|
-
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.
|
|
12
|
-
throw new Error(`This plugin requires Matterbridge version >= "3.
|
|
13
|
+
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('3.3.0')) {
|
|
14
|
+
throw new Error(`This plugin requires Matterbridge version >= "3.3.0". Please update Matterbridge to the latest version in the frontend.`);
|
|
13
15
|
}
|
|
14
16
|
this.log.info('Initializing platform:', this.config.name);
|
|
15
|
-
if (!isValidArray(config.whiteList))
|
|
16
|
-
config.whiteList = [];
|
|
17
|
-
if (!isValidArray(config.blackList))
|
|
18
|
-
config.blackList = [];
|
|
19
17
|
this.btHome.on('discovered', async (device) => {
|
|
20
18
|
this.log.notice(`Discovered new BTHome device: ${device.mac}`);
|
|
21
19
|
this.log.info('- name:', device.localName);
|