matterbridge-bthome 1.0.3 → 1.0.4

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
@@ -1,11 +1,41 @@
1
1
  # <img src="https://matterbridge.io/assets/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px">&nbsp;&nbsp;&nbsp;Matterbridge webhooks plugin changelog
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/matterbridge-eve-door.svg)](https://www.npmjs.com/package/matterbridge-eve-door)
4
+ [![npm downloads](https://img.shields.io/npm/dt/matterbridge-eve-door.svg)](https://www.npmjs.com/package/matterbridge-eve-door)
5
+ [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge/latest?label=docker%20version)](https://hub.docker.com/r/luligu/matterbridge)
6
+ [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge?label=docker%20pulls)](https://hub.docker.com/r/luligu/matterbridge)
7
+ ![Node.js CI](https://github.com/Luligu/matterbridge-bthome/actions/workflows/build.yml/badge.svg)
8
+ [![styled with prettier](https://img.shields.io/badge/styled_with-Prettier-f8bc45.svg?logo=prettier)](https://github.com/prettier/prettier)
9
+ [![linted with eslint](https://img.shields.io/badge/linted_with-ES_Lint-4B32C3.svg?logo=eslint)](https://github.com/eslint/eslint)
10
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
11
+ [![ESM](https://img.shields.io/badge/ESM-Node.js-339933?logo=node.js&logoColor=white)](https://nodejs.org/api/esm.html)
12
+ [![matterbridge.io](https://img.shields.io/badge/matterbridge.io-online-brightgreen)](https://matterbridge.io)
13
+
14
+ [![powered by](https://img.shields.io/badge/powered%20by-matterbridge-blue)](https://www.npmjs.com/package/matterbridge)
15
+ [![powered by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
16
+ [![powered by](https://img.shields.io/badge/powered%20by-node--ansi--logger-blue)](https://www.npmjs.com/package/node-ansi-logger)
17
+ [![powered by](https://img.shields.io/badge/powered%20by-node--persist--manager-blue)](https://www.npmjs.com/package/node-persist-manager)
18
+
19
+ ---
20
+
3
21
  All notable changes to this project will be documented in this file.
4
22
 
5
- If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-webhooks and sponsoring it.
23
+ If you like this project and find it useful, please consider giving it a star on [GitHub](https://github.com/Luligu/matterbridge-bthome) and sponsoring it.
6
24
 
7
25
  <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
8
26
 
27
+ ## [1.0.4] - 2026-02-07
28
+
29
+ ### Changed
30
+
31
+ - [package]: Updated dependencies.
32
+ - [package]: Bumped package to automator v.3.0.6.
33
+ - [package]: Bumped node-ansi-logger to v.3.2.0.
34
+ - [vite]: Added cache under .cache/vite.
35
+ - [workflow]: Migrated to trusted publishing / OIDC. Since you can authorize only one workflow with OIDC, publish.yml now does both the publishing with tag latest (on release) and with tag dev (on schedule or manual trigger).
36
+
37
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="80"></a>
38
+
9
39
  ## [1.0.3] - 2026-01-20
10
40
 
11
41
  ### Added
package/README.md CHANGED
@@ -1,15 +1,20 @@
1
1
  # <img src="https://matterbridge.io/assets/matterbridge.svg" alt="Matterbridge Logo" width="64px" height="64px">&nbsp;&nbsp;&nbsp;Matterbridge BTHome plugin
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/matterbridge-bthome.svg)](https://www.npmjs.com/package/matterbridge-bthome)
4
- [![npm downloads](https://img.shields.io/npm/dt/matterbridge-bthome.svg)](https://www.npmjs.com/package/matterbridge-bthome)
5
- [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge?label=docker%20version&sort=semver)](https://hub.docker.com/r/luligu/matterbridge)
6
- [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge.svg)](https://hub.docker.com/r/luligu/matterbridge)
3
+ [![npm version](https://img.shields.io/npm/v/matterbridge-eve-door.svg)](https://www.npmjs.com/package/matterbridge-eve-door)
4
+ [![npm downloads](https://img.shields.io/npm/dt/matterbridge-eve-door.svg)](https://www.npmjs.com/package/matterbridge-eve-door)
5
+ [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge/latest?label=docker%20version)](https://hub.docker.com/r/luligu/matterbridge)
6
+ [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge?label=docker%20pulls)](https://hub.docker.com/r/luligu/matterbridge)
7
7
  ![Node.js CI](https://github.com/Luligu/matterbridge-bthome/actions/workflows/build.yml/badge.svg)
8
+ [![styled with prettier](https://img.shields.io/badge/styled_with-Prettier-f8bc45.svg?logo=prettier)](https://github.com/prettier/prettier)
9
+ [![linted with eslint](https://img.shields.io/badge/linted_with-ES_Lint-4B32C3.svg?logo=eslint)](https://github.com/eslint/eslint)
10
+ [![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
11
+ [![ESM](https://img.shields.io/badge/ESM-Node.js-339933?logo=node.js&logoColor=white)](https://nodejs.org/api/esm.html)
12
+ [![matterbridge.io](https://img.shields.io/badge/matterbridge.io-online-brightgreen)](https://matterbridge.io)
8
13
 
9
- [![power by](https://img.shields.io/badge/powered%20by-matterbridge-blue)](https://www.npmjs.com/package/matterbridge)
10
- [![power by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
11
- [![power by](https://img.shields.io/badge/powered%20by-node--ansi--logger-blue)](https://www.npmjs.com/package/node-ansi-logger)
12
- [![power by](https://img.shields.io/badge/powered%20by-node--persist--manager-blue)](https://www.npmjs.com/package/node-persist-manager)
14
+ [![powered by](https://img.shields.io/badge/powered%20by-matterbridge-blue)](https://www.npmjs.com/package/matterbridge)
15
+ [![powered by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
16
+ [![powered by](https://img.shields.io/badge/powered%20by-node--ansi--logger-blue)](https://www.npmjs.com/package/node-ansi-logger)
17
+ [![powered by](https://img.shields.io/badge/powered%20by-node--persist--manager-blue)](https://www.npmjs.com/package/node-persist-manager)
13
18
 
14
19
  ---
15
20
 
@@ -21,11 +26,9 @@ Features:
21
26
  - The discovered BTHome are stored with all attributes to easily restart the plugin.
22
27
  - The plugin has also a command line **bthome** to test and verify the bluetooth adapter and the ble network.
23
28
 
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.
29
+ If you like this project and find it useful, please consider giving it a star on [GitHub](https://github.com/Luligu/matterbridge-bthome) and sponsoring it.
25
30
 
26
- <a href="https://www.buymeacoffee.com/luligugithub">
27
- <img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120">
28
- </a>
31
+ <a href="https://www.buymeacoffee.com/luligugithub"><img src="https://matterbridge.io/assets/bmc-button.svg" alt="Buy me a coffee" width="120"></a>
29
32
 
30
33
  ## Prerequisites
31
34
 
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "matterbridge-bthome",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "matterbridge-bthome",
9
- "version": "1.0.3",
9
+ "version": "1.0.4",
10
10
  "license": "Apache-2.0",
11
11
  "dependencies": {
12
12
  "@stoprocent/noble": "2.3.10",
13
- "node-ansi-logger": "3.1.1",
13
+ "node-ansi-logger": "3.2.0",
14
14
  "node-persist-manager": "2.0.0"
15
15
  },
16
16
  "bin": {
@@ -921,13 +921,13 @@
921
921
  }
922
922
  },
923
923
  "node_modules/node-ansi-logger": {
924
- "version": "3.1.1",
925
- "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.1.1.tgz",
926
- "integrity": "sha512-tFeCSxwiRg5XaNda5nC27alzraZP76nLtUk1JDZqb9byhW4WYaSGL7/lmxFHEI16gypQDMEYljuF+wcG+cPPHw==",
924
+ "version": "3.2.0",
925
+ "resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.2.0.tgz",
926
+ "integrity": "sha512-HvKsTZpMSrEkO2x2egSvTpjgWkVpYO0xsXNxmCG+7vi0Ohs5yy9EdTKbTPYbNwzXY70g7nqsE10yE+Tsw5MA8w==",
927
927
  "hasShrinkwrap": true,
928
928
  "license": "Apache-2.0",
929
929
  "engines": {
930
- "node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
930
+ "node": ">=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
931
931
  },
932
932
  "funding": {
933
933
  "type": "buymeacoffee",
@@ -1069,9 +1069,9 @@
1069
1069
  }
1070
1070
  },
1071
1071
  "node_modules/semver": {
1072
- "version": "7.7.3",
1073
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
1074
- "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
1072
+ "version": "7.7.4",
1073
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
1074
+ "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
1075
1075
  "license": "ISC",
1076
1076
  "optional": true,
1077
1077
  "bin": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matterbridge-bthome",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Matterbridge BTHome plugin",
5
5
  "author": "https://github.com/Luligu",
6
6
  "license": "Apache-2.0",
@@ -8,6 +8,12 @@
8
8
  "type": "module",
9
9
  "main": "dist/module.js",
10
10
  "types": "dist/module.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/module.js",
14
+ "types": "./dist/module.d.ts"
15
+ }
16
+ },
11
17
  "bin": {
12
18
  "bthome": "./bin/bthome.js"
13
19
  },
@@ -52,7 +58,10 @@
52
58
  "BluetoothLowEnergy",
53
59
  "BluetoothLE",
54
60
  "BluetoothLEAdvertising",
55
- "BluetoothLEScan"
61
+ "BluetoothLEScan",
62
+ "childbridge",
63
+ "hass",
64
+ "hassio"
56
65
  ],
57
66
  "engines": {
58
67
  "node": ">=20.0.0 <21.0.0 || >=22.0.0 <23.0.0 || >=24.0.0 <25.0.0"
@@ -67,7 +76,7 @@
67
76
  ],
68
77
  "dependencies": {
69
78
  "@stoprocent/noble": "2.3.10",
70
- "node-ansi-logger": "3.1.1",
79
+ "node-ansi-logger": "3.2.0",
71
80
  "node-persist-manager": "2.0.0"
72
81
  }
73
82
  }
package/dist/BTHome.d.ts DELETED
@@ -1,54 +0,0 @@
1
- import { EventEmitter } from 'node:events';
2
- import { AnsiLogger, LogLevel } from 'matterbridge/logger';
3
- import type { PeripheralAddressType, PeripheralAdvertisement, PeripheralState, Service } from '@stoprocent/noble';
4
- export interface BleDevice {
5
- id: string;
6
- address: string;
7
- addressType: PeripheralAddressType;
8
- connectable: boolean;
9
- advertisement: PeripheralAdvertisement;
10
- rssi: number;
11
- mtu: number | null;
12
- services: Service[];
13
- state: PeripheralState;
14
- localName: string;
15
- lastSeen: Date;
16
- }
17
- export interface BTHomeDevice {
18
- mac: string;
19
- rssi: number;
20
- localName: string;
21
- version: number;
22
- encrypted: boolean;
23
- trigger: boolean;
24
- data: Record<string, boolean | number | string | object>;
25
- packetId: number;
26
- modelId?: number;
27
- modelIdShortName?: string;
28
- modelIdLongName?: string;
29
- lastSeen: Date;
30
- }
31
- interface BTHomeEvents {
32
- discovered: [device: BTHomeDevice];
33
- update: [device: BTHomeDevice];
34
- }
35
- export declare class BTHome extends EventEmitter<BTHomeEvents> {
36
- private noble;
37
- readonly log: AnsiLogger;
38
- isScanning: boolean;
39
- filterBle: boolean;
40
- filterBTHome: boolean;
41
- filterShellyBle: boolean;
42
- filterAddress: string[];
43
- readonly bthomePeripherals: Map<string, BTHomeDevice>;
44
- readonly blePeripherals: Map<string, BleDevice>;
45
- constructor(filterBle?: boolean, filterBTHome?: boolean, filterShellyBle?: boolean, filterAddress?: string[], logLevel?: LogLevel);
46
- private isShellyBlePeripheral;
47
- private isBTHomePeripheral;
48
- private handleDiscovery;
49
- private waitForPoweredOn;
50
- start(): Promise<void>;
51
- stop(): Promise<void>;
52
- logDevices(): void;
53
- }
54
- export {};
@@ -1,8 +0,0 @@
1
- export interface DecodedBTHome {
2
- version: number;
3
- encrypted: boolean;
4
- trigger: boolean;
5
- readings: Record<string, boolean | number | string | object>;
6
- unknown: string[];
7
- }
8
- export declare function decodeBTHome(buf: Buffer): DecodedBTHome;
@@ -1,18 +0,0 @@
1
- export declare function getShellyBluLongName(id: number): string | undefined;
2
- export declare function getShellyBluShortName(id: number): string | undefined;
3
- export interface ShellyFlags {
4
- discoverable: boolean;
5
- authEnabled: boolean;
6
- rpcEnabled: boolean;
7
- buzzerEnabled: boolean;
8
- inPairingMode: boolean;
9
- }
10
- export interface ShellyManufacturerData {
11
- companyId: number;
12
- flags?: ShellyFlags;
13
- modelId?: number;
14
- modelIdShortName?: string;
15
- modelIdLongName?: string;
16
- mac?: string;
17
- }
18
- export declare function decodeShellyManufacturerData(input: Buffer | string): ShellyManufacturerData | null;
@@ -1,8 +0,0 @@
1
- export interface BTHomeSpecEntry {
2
- name: string;
3
- bytes: number | null;
4
- signed?: boolean;
5
- factor?: number;
6
- parser?: (_buf: Buffer, _offset: number) => string | object;
7
- }
8
- export declare const BTHOME_SPEC: Readonly<Record<number, BTHomeSpecEntry>>;
package/dist/module.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import { MatterbridgeDynamicPlatform, MatterbridgeEndpoint, PlatformConfig, PlatformMatterbridge } from 'matterbridge';
2
- import { AnsiLogger, LogLevel } from 'matterbridge/logger';
3
- import { BTHome } from './BTHome.js';
4
- export type BTHomePlatformConfig = PlatformConfig & {
5
- whiteList: string[];
6
- blackList: string[];
7
- };
8
- export default function initializePlugin(matterbridge: PlatformMatterbridge, log: AnsiLogger, config: BTHomePlatformConfig): Platform;
9
- export declare class Platform extends MatterbridgeDynamicPlatform {
10
- readonly btHome: BTHome;
11
- readonly bridgedDevices: Map<string, MatterbridgeEndpoint>;
12
- constructor(matterbridge: PlatformMatterbridge, log: AnsiLogger, config: BTHomePlatformConfig);
13
- onStart(reason?: string): Promise<void>;
14
- onConfigure(): Promise<void>;
15
- onAction(action: string, value?: string, id?: string): Promise<void>;
16
- onChangeLoggerLevel(logLevel: LogLevel): Promise<void>;
17
- onShutdown(reason?: string): Promise<void>;
18
- private converter;
19
- private addDevice;
20
- private updateDevice;
21
- private loadPeripherals;
22
- private savePeripherals;
23
- }