matterbridge-bthome 0.0.1 → 0.0.3
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 +29 -0
- package/README.md +1 -1
- package/dist/platform.js +13 -3
- package/npm-shrinkwrap.json +70 -16
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,35 @@ 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
|
+
## [0.0.3] - 2025-05-19
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- [platform]: Updated deprecated import to run with matterbridge 3.0.3.
|
|
16
|
+
- [package]: Updated package.
|
|
17
|
+
|
|
18
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
19
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
20
|
+
</a>
|
|
21
|
+
|
|
22
|
+
## [0.0.2] - 2025-05-15
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- [logger]: Added onChangeLoggerLevel action.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- [package]: Updated dependencies.
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- [update]: Fixed bug on update with multiple properties.
|
|
35
|
+
|
|
36
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
37
|
+
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
|
38
|
+
</a>
|
|
39
|
+
|
|
11
40
|
## [0.0.1] - 2025-05-05
|
|
12
41
|
|
|
13
42
|
First published release.
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ This plugin allows you to expose any BTHome device to Matter using the native bl
|
|
|
17
17
|
|
|
18
18
|
Features:
|
|
19
19
|
|
|
20
|
-
- The bluetooth works correctly on all platforms and is based the @stoprocent fork of noble.
|
|
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
22
|
- The plugin has also a command line to test and verify the bluetooth adapter and the ble network.
|
|
23
23
|
|
package/dist/platform.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { bridgedNode, contactSensor, genericSwitch, humiditySensor, lightSensor, MatterbridgeDynamicPlatform, MatterbridgeEndpoint,
|
|
2
|
-
import { db, debugStringify, idn, rs, BLUE } from 'matterbridge/logger';
|
|
1
|
+
import { bridgedNode, contactSensor, genericSwitch, humiditySensor, lightSensor, MatterbridgeDynamicPlatform, MatterbridgeEndpoint, occupancySensor, powerSource, pressureSensor, temperatureSensor, } from 'matterbridge';
|
|
2
|
+
import { db, debugStringify, idn, rs, BLUE, nf } from 'matterbridge/logger';
|
|
3
3
|
import { isValidArray } from 'matterbridge/utils';
|
|
4
|
+
import { NumberTag } from 'matterbridge/matter';
|
|
4
5
|
import { BTHome } from './BTHome.js';
|
|
5
6
|
export class Platform extends MatterbridgeDynamicPlatform {
|
|
6
7
|
btHome = new BTHome();
|
|
@@ -72,6 +73,10 @@ export class Platform extends MatterbridgeDynamicPlatform {
|
|
|
72
73
|
this.log.notice('The storage has been reset');
|
|
73
74
|
}
|
|
74
75
|
}
|
|
76
|
+
async onChangeLoggerLevel(logLevel) {
|
|
77
|
+
this.log.info(`Changing logger level for platform ${idn}${this.config.name}${rs}${nf} to ${logLevel}`);
|
|
78
|
+
this.bridgedDevices.forEach((device) => (device.log.logLevel = logLevel));
|
|
79
|
+
}
|
|
75
80
|
async onShutdown(reason) {
|
|
76
81
|
this.log.info('onShutdown called with reason:', reason ?? 'none');
|
|
77
82
|
await this.savePeripherals();
|
|
@@ -143,7 +148,12 @@ export class Platform extends MatterbridgeDynamicPlatform {
|
|
|
143
148
|
if (!matterbridgeDevice)
|
|
144
149
|
return;
|
|
145
150
|
for (const property in device.data) {
|
|
146
|
-
const
|
|
151
|
+
const [name, _index] = property.split(':');
|
|
152
|
+
const converter = this.converter.find((converter) => converter.reading === name);
|
|
153
|
+
if (!converter) {
|
|
154
|
+
this.log.debug(`***No converter found for property ${property} in device mac ${device.mac} model ${device.localName}`);
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
147
157
|
if (converter && converter.deviceType && converter.cluster && converter.attribute) {
|
|
148
158
|
const child = matterbridgeDevice.getChildEndpointByName(property);
|
|
149
159
|
let value = device.data[property];
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-bthome",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge-bthome",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.3",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@stoprocent/noble": "
|
|
13
|
-
"node-ansi-logger": "
|
|
14
|
-
"node-persist-manager": "
|
|
15
|
-
"rimraf": "
|
|
12
|
+
"@stoprocent/noble": "2.3.0",
|
|
13
|
+
"node-ansi-logger": "3.0.1",
|
|
14
|
+
"node-persist-manager": "1.0.8",
|
|
15
|
+
"rimraf": "6.0.1"
|
|
16
16
|
},
|
|
17
17
|
"bin": {
|
|
18
18
|
"bthome": "bin/bthome.js"
|
|
@@ -185,6 +185,24 @@
|
|
|
185
185
|
"url": "https://opencollective.com/serialport/donate"
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
|
+
"node_modules/@serialport/bindings-cpp/node_modules/debug": {
|
|
189
|
+
"version": "4.4.0",
|
|
190
|
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
|
191
|
+
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
|
192
|
+
"license": "MIT",
|
|
193
|
+
"optional": true,
|
|
194
|
+
"dependencies": {
|
|
195
|
+
"ms": "^2.1.3"
|
|
196
|
+
},
|
|
197
|
+
"engines": {
|
|
198
|
+
"node": ">=6.0"
|
|
199
|
+
},
|
|
200
|
+
"peerDependenciesMeta": {
|
|
201
|
+
"supports-color": {
|
|
202
|
+
"optional": true
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
188
206
|
"node_modules/@serialport/bindings-cpp/node_modules/node-addon-api": {
|
|
189
207
|
"version": "8.3.0",
|
|
190
208
|
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.3.0.tgz",
|
|
@@ -352,6 +370,24 @@
|
|
|
352
370
|
"url": "https://opencollective.com/serialport/donate"
|
|
353
371
|
}
|
|
354
372
|
},
|
|
373
|
+
"node_modules/@serialport/stream/node_modules/debug": {
|
|
374
|
+
"version": "4.4.0",
|
|
375
|
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
|
376
|
+
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
|
377
|
+
"license": "MIT",
|
|
378
|
+
"optional": true,
|
|
379
|
+
"dependencies": {
|
|
380
|
+
"ms": "^2.1.3"
|
|
381
|
+
},
|
|
382
|
+
"engines": {
|
|
383
|
+
"node": ">=6.0"
|
|
384
|
+
},
|
|
385
|
+
"peerDependenciesMeta": {
|
|
386
|
+
"supports-color": {
|
|
387
|
+
"optional": true
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
},
|
|
355
391
|
"node_modules/@stoprocent/bluetooth-hci-socket": {
|
|
356
392
|
"version": "2.2.1",
|
|
357
393
|
"resolved": "https://registry.npmjs.org/@stoprocent/bluetooth-hci-socket/-/bluetooth-hci-socket-2.2.1.tgz",
|
|
@@ -604,9 +640,9 @@
|
|
|
604
640
|
}
|
|
605
641
|
},
|
|
606
642
|
"node_modules/debug": {
|
|
607
|
-
"version": "4.4.
|
|
608
|
-
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.
|
|
609
|
-
"integrity": "sha512-
|
|
643
|
+
"version": "4.4.1",
|
|
644
|
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
|
|
645
|
+
"integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
|
|
610
646
|
"license": "MIT",
|
|
611
647
|
"dependencies": {
|
|
612
648
|
"ms": "^2.1.3"
|
|
@@ -1297,9 +1333,9 @@
|
|
|
1297
1333
|
}
|
|
1298
1334
|
},
|
|
1299
1335
|
"node_modules/patch-package/node_modules/semver": {
|
|
1300
|
-
"version": "7.7.
|
|
1301
|
-
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.
|
|
1302
|
-
"integrity": "sha512-
|
|
1336
|
+
"version": "7.7.2",
|
|
1337
|
+
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
|
|
1338
|
+
"integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
|
|
1303
1339
|
"license": "ISC",
|
|
1304
1340
|
"optional": true,
|
|
1305
1341
|
"bin": {
|
|
@@ -1471,6 +1507,24 @@
|
|
|
1471
1507
|
"url": "https://opencollective.com/serialport/donate"
|
|
1472
1508
|
}
|
|
1473
1509
|
},
|
|
1510
|
+
"node_modules/serialport/node_modules/debug": {
|
|
1511
|
+
"version": "4.4.0",
|
|
1512
|
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
|
|
1513
|
+
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
|
|
1514
|
+
"license": "MIT",
|
|
1515
|
+
"optional": true,
|
|
1516
|
+
"dependencies": {
|
|
1517
|
+
"ms": "^2.1.3"
|
|
1518
|
+
},
|
|
1519
|
+
"engines": {
|
|
1520
|
+
"node": ">=6.0"
|
|
1521
|
+
},
|
|
1522
|
+
"peerDependenciesMeta": {
|
|
1523
|
+
"supports-color": {
|
|
1524
|
+
"optional": true
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
},
|
|
1474
1528
|
"node_modules/set-function-length": {
|
|
1475
1529
|
"version": "1.2.2",
|
|
1476
1530
|
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
|
@@ -1670,16 +1724,16 @@
|
|
|
1670
1724
|
"optional": true
|
|
1671
1725
|
},
|
|
1672
1726
|
"node_modules/yaml": {
|
|
1673
|
-
"version": "2.
|
|
1674
|
-
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.
|
|
1675
|
-
"integrity": "sha512-
|
|
1727
|
+
"version": "2.8.0",
|
|
1728
|
+
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz",
|
|
1729
|
+
"integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==",
|
|
1676
1730
|
"license": "ISC",
|
|
1677
1731
|
"optional": true,
|
|
1678
1732
|
"bin": {
|
|
1679
1733
|
"yaml": "bin.mjs"
|
|
1680
1734
|
},
|
|
1681
1735
|
"engines": {
|
|
1682
|
-
"node": ">= 14"
|
|
1736
|
+
"node": ">= 14.6"
|
|
1683
1737
|
}
|
|
1684
1738
|
},
|
|
1685
1739
|
"node_modules/yocto-queue": {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge-bthome",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Matterbridge BTHome plugin",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
-
"homepage": "https://
|
|
7
|
+
"homepage": "https://www.npmjs.com/package/matterbridge-bthome",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"bin": {
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@stoprocent/noble": "
|
|
61
|
-
"node-ansi-logger": "
|
|
62
|
-
"node-persist-manager": "
|
|
63
|
-
"rimraf": "
|
|
60
|
+
"@stoprocent/noble": "2.3.0",
|
|
61
|
+
"node-ansi-logger": "3.0.1",
|
|
62
|
+
"node-persist-manager": "1.0.8",
|
|
63
|
+
"rimraf": "6.0.1"
|
|
64
64
|
}
|
|
65
65
|
}
|