matterbridge 3.0.7-dev-20250614-0d145a8 → 3.0.7-dev-20250615-2a6da14
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 +4 -0
- package/README-DEV.md +66 -35
- package/README.md +1 -1
- package/dist/devices/export.js +4 -0
- package/npm-shrinkwrap.json +3 -3
- package/package.json +22 -18
- /package/dist/{cluster → clusters}/export.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,10 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
10
10
|
|
|
11
11
|
## [3.0.7] - 2025-06-??
|
|
12
12
|
|
|
13
|
+
### Breaking Changes
|
|
14
|
+
|
|
15
|
+
- [devices]: The single devices (i.e. Rvc, Evse etc...) are exported from matterbridge/devices. Please update your imports to use the new export path. Refer to the [documentation](README-DEV.md) for details on imports.
|
|
16
|
+
|
|
13
17
|
### Added
|
|
14
18
|
|
|
15
19
|
### Changed
|
package/README-DEV.md
CHANGED
|
@@ -18,49 +18,53 @@
|
|
|
18
18
|
|
|
19
19
|
Matterbridge exports from:
|
|
20
20
|
|
|
21
|
-
"matterbridge"
|
|
21
|
+
### "matterbridge"
|
|
22
22
|
|
|
23
23
|
- Matterbridge and all Matterbridge related classes.
|
|
24
24
|
|
|
25
|
-
"matterbridge/
|
|
25
|
+
### "matterbridge/devices"
|
|
26
26
|
|
|
27
|
-
- All
|
|
27
|
+
- All single device classes like the Rvc, LaundryWasher, etc...
|
|
28
28
|
|
|
29
|
-
"matterbridge/
|
|
29
|
+
### "matterbridge/clusters"
|
|
30
30
|
|
|
31
|
-
- All matter.js
|
|
31
|
+
- All clusters not present in matter.js or modified.
|
|
32
32
|
|
|
33
|
-
"matterbridge/
|
|
33
|
+
### "matterbridge/utils"
|
|
34
34
|
|
|
35
|
-
- All
|
|
35
|
+
- All general utils and colorUtils functions.
|
|
36
36
|
|
|
37
|
-
"matterbridge/
|
|
37
|
+
### "matterbridge/logger"
|
|
38
38
|
|
|
39
|
-
-
|
|
39
|
+
- AnsiLogger class.
|
|
40
40
|
|
|
41
|
-
"matterbridge/
|
|
41
|
+
### "matterbridge/storage"
|
|
42
42
|
|
|
43
|
-
-
|
|
43
|
+
- NodeStorageManager and NodeStorage classes.
|
|
44
44
|
|
|
45
|
-
"matterbridge/matter
|
|
45
|
+
### "matterbridge/matter"
|
|
46
46
|
|
|
47
|
-
- All matter.js
|
|
47
|
+
- All relevant matter.js exports.
|
|
48
48
|
|
|
49
|
-
"matterbridge/
|
|
49
|
+
### "matterbridge/matter/behaviors"
|
|
50
50
|
|
|
51
|
-
- All
|
|
51
|
+
- All matter.js behaviors.
|
|
52
52
|
|
|
53
|
-
"matterbridge/
|
|
53
|
+
### "matterbridge/matter/clusters"
|
|
54
54
|
|
|
55
|
-
- All
|
|
55
|
+
- All matter.js clusters.
|
|
56
56
|
|
|
57
|
-
"matterbridge/
|
|
57
|
+
### "matterbridge/matter/devices"
|
|
58
58
|
|
|
59
|
-
-
|
|
59
|
+
- All matter.js devices.
|
|
60
60
|
|
|
61
|
-
"matterbridge/
|
|
61
|
+
### "matterbridge/matter/endpoints"
|
|
62
62
|
|
|
63
|
-
-
|
|
63
|
+
- All matter.js endpoints.
|
|
64
|
+
|
|
65
|
+
### "matterbridge/matter/types"
|
|
66
|
+
|
|
67
|
+
- All matter.js types.
|
|
64
68
|
|
|
65
69
|
# \***\*\*\*\*\***
|
|
66
70
|
|
|
@@ -72,7 +76,7 @@ Additionally, when Matterbridge updates the `matter.js` version, it should be co
|
|
|
72
76
|
|
|
73
77
|
A plugin must never install Matterbridge (neither as a dependency, devDependency, nor peerDependency).
|
|
74
78
|
|
|
75
|
-
Matterbridge must be linked to the plugin in development only.
|
|
79
|
+
Matterbridge must be linked to the plugin in development only. At runtime the plugin is loaded directly from the running Mattebridge instance.
|
|
76
80
|
|
|
77
81
|
```json
|
|
78
82
|
"scripts": {
|
|
@@ -82,9 +86,9 @@ Matterbridge must be linked to the plugin in development only.
|
|
|
82
86
|
}
|
|
83
87
|
```
|
|
84
88
|
|
|
85
|
-
On the machine you use for development
|
|
89
|
+
On the machine you use for development of your plugin, you need to clone matterbridge, built it locally and link it globally (npm link from the matterbridge package root).
|
|
86
90
|
|
|
87
|
-
|
|
91
|
+
If you want to develop a plugin using the dev branch of matterbridge, you have to clone the dev branch of matterbridge, build it locally and link it (npm run deepCleanBuild).
|
|
88
92
|
|
|
89
93
|
# \***\*\*\*\*\***
|
|
90
94
|
|
|
@@ -114,7 +118,7 @@ On windows:
|
|
|
114
118
|
cd $HOME\Matterbridge
|
|
115
119
|
```
|
|
116
120
|
|
|
117
|
-
On linux:
|
|
121
|
+
On linux or macOS:
|
|
118
122
|
|
|
119
123
|
```
|
|
120
124
|
cd ~/Matterbridge
|
|
@@ -126,6 +130,7 @@ then clone the plugin
|
|
|
126
130
|
git clone https://github.com/Luligu/matterbridge-example-accessory-platform
|
|
127
131
|
cd matterbridge-example-accessory-platform
|
|
128
132
|
npm install
|
|
133
|
+
npm link matterbridge
|
|
129
134
|
npm run build
|
|
130
135
|
```
|
|
131
136
|
|
|
@@ -150,37 +155,63 @@ The plugin platform type.
|
|
|
150
155
|
The plugin config (loaded before the platform constructor is called and saved after onShutdown() is called).
|
|
151
156
|
Here you can store your plugin configuration (see matterbridge-zigbee2mqtt for example)
|
|
152
157
|
|
|
158
|
+
### constructor(matterbridge: Matterbridge, log: AnsiLogger, config: PlatformConfig)
|
|
159
|
+
|
|
160
|
+
The contructor is called when is plugin is loaded.
|
|
161
|
+
|
|
153
162
|
### async onStart(reason?: string)
|
|
154
163
|
|
|
155
|
-
The method onStart() is where you have to create your
|
|
164
|
+
The method onStart() is where you have to create your MatterbridgeEndpoint and add all needed clusters.
|
|
165
|
+
|
|
166
|
+
After add the command handlers and subscribe to the attributes when needed.
|
|
156
167
|
|
|
157
|
-
The
|
|
168
|
+
The MatterbridgeEndpoint class has the create cluster methods already done and all command handlers needed (see plugin examples).
|
|
158
169
|
|
|
159
170
|
The method is called when Matterbridge load the plugin.
|
|
160
171
|
|
|
161
172
|
### async onConfigure()
|
|
162
173
|
|
|
163
|
-
The method onConfigure() is where you can configure
|
|
174
|
+
The method onConfigure() is where you can configure your matter device.
|
|
164
175
|
|
|
165
|
-
The method is called when the platform is
|
|
176
|
+
The method is called when the server node the platform belongs to is online.
|
|
177
|
+
|
|
178
|
+
Since the persistent attributes are loaded from the storage when the server node goes online, you may need to set them in onConfigure().
|
|
166
179
|
|
|
167
180
|
### async onShutdown(reason?: string)
|
|
168
181
|
|
|
169
|
-
The method onShutdown() is where you have to
|
|
182
|
+
The method onShutdown() is where you have to stop your platform and cleanup all the used resources.
|
|
183
|
+
|
|
184
|
+
The method is called when Matterbridge is shutting down or when the plugin is disabled.
|
|
185
|
+
|
|
186
|
+
Since the frontend can enable and disable the plugin many times, you need to clean all resources (i.e. handlers, intervals, timers...) here.
|
|
187
|
+
|
|
188
|
+
### async onChangeLoggerLevel(logLevel: LogLevel)
|
|
189
|
+
|
|
190
|
+
It is called when the user changes the logger level in the frontend.
|
|
191
|
+
|
|
192
|
+
### async onAction(action: string, value?: string, id?: string, formData?: PlatformConfig)
|
|
193
|
+
|
|
194
|
+
It is called when a plugin config includes an action button or an action button with text field.
|
|
195
|
+
|
|
196
|
+
### async onConfigChanged(config: PlatformConfig)
|
|
197
|
+
|
|
198
|
+
It is called when the plugin config has been updated.
|
|
199
|
+
|
|
200
|
+
### hasDeviceName(deviceName: string): boolean
|
|
170
201
|
|
|
171
|
-
|
|
202
|
+
Checks if a device with this name is already registered in the platform.
|
|
172
203
|
|
|
173
|
-
### async registerDevice(device:
|
|
204
|
+
### async registerDevice(device: MatterbridgeEndpoint)
|
|
174
205
|
|
|
175
|
-
After you created your device, add it to the platform.
|
|
206
|
+
After you have created your device, add it to the platform.
|
|
176
207
|
|
|
177
|
-
### async unregisterDevice(device:
|
|
208
|
+
### async unregisterDevice(device: MatterbridgeEndpoint)
|
|
178
209
|
|
|
179
210
|
You can unregister one or more device.
|
|
180
211
|
|
|
181
212
|
### async unregisterAllDevices()
|
|
182
213
|
|
|
183
|
-
You can unregister all devices you added.
|
|
214
|
+
You can unregister all the devices you added.
|
|
184
215
|
|
|
185
216
|
It can be useful to call this method from onShutdown() if you don't want to keep all the devices during development.
|
|
186
217
|
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
6
6
|
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
7
7
|

|
|
8
|
-

|
|
9
9
|
|
|
10
10
|
[](https://www.npmjs.com/package/matter-history)
|
|
11
11
|
[](https://www.npmjs.com/package/node-ansi-logger)
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.0.7-dev-
|
|
3
|
+
"version": "3.0.7-dev-20250615-2a6da14",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "3.0.7-dev-
|
|
9
|
+
"version": "3.0.7-dev-20250615-2a6da14",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@matter/main": "0.14.0",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"matterbridge": "dist/cli.js"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
|
-
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
|
|
25
|
+
"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"
|
|
26
26
|
},
|
|
27
27
|
"funding": {
|
|
28
28
|
"type": "buymeacoffee",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.0.7-dev-
|
|
3
|
+
"version": "3.0.7-dev-20250615-2a6da14",
|
|
4
4
|
"description": "Matterbridge plugin manager for Matter",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,13 +45,33 @@
|
|
|
45
45
|
"matterbridge": "dist/cli.js"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
|
-
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
|
|
48
|
+
"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"
|
|
49
49
|
},
|
|
50
50
|
"exports": {
|
|
51
51
|
".": {
|
|
52
52
|
"import": "./dist/index.js",
|
|
53
53
|
"types": "./dist/index.d.ts"
|
|
54
54
|
},
|
|
55
|
+
"./devices": {
|
|
56
|
+
"import": "./dist/devices/export.js",
|
|
57
|
+
"types": "./dist/devices/export.d.ts"
|
|
58
|
+
},
|
|
59
|
+
"./clusters": {
|
|
60
|
+
"import": "./dist/clusters/export.js",
|
|
61
|
+
"types": "./dist/clusters/export.d.ts"
|
|
62
|
+
},
|
|
63
|
+
"./utils": {
|
|
64
|
+
"import": "./dist/utils/export.js",
|
|
65
|
+
"types": "./dist/utils/export.d.ts"
|
|
66
|
+
},
|
|
67
|
+
"./logger": {
|
|
68
|
+
"import": "./dist/logger/export.js",
|
|
69
|
+
"types": "./dist/logger/export.d.ts"
|
|
70
|
+
},
|
|
71
|
+
"./storage": {
|
|
72
|
+
"import": "./dist/storage/export.js",
|
|
73
|
+
"types": "./dist/storage/export.d.ts"
|
|
74
|
+
},
|
|
55
75
|
"./matter": {
|
|
56
76
|
"import": "./dist/matter/export.js",
|
|
57
77
|
"types": "./dist/matter/export.d.ts"
|
|
@@ -75,22 +95,6 @@
|
|
|
75
95
|
"./matter/types": {
|
|
76
96
|
"import": "./dist/matter/types.js",
|
|
77
97
|
"types": "./dist/matter/types.d.ts"
|
|
78
|
-
},
|
|
79
|
-
"./cluster": {
|
|
80
|
-
"import": "./dist/cluster/export.js",
|
|
81
|
-
"types": "./dist/cluster/export.d.ts"
|
|
82
|
-
},
|
|
83
|
-
"./utils": {
|
|
84
|
-
"import": "./dist/utils/export.js",
|
|
85
|
-
"types": "./dist/utils/export.d.ts"
|
|
86
|
-
},
|
|
87
|
-
"./logger": {
|
|
88
|
-
"import": "./dist/logger/export.js",
|
|
89
|
-
"types": "./dist/logger/export.d.ts"
|
|
90
|
-
},
|
|
91
|
-
"./storage": {
|
|
92
|
-
"import": "./dist/storage/export.js",
|
|
93
|
-
"types": "./dist/storage/export.d.ts"
|
|
94
98
|
}
|
|
95
99
|
},
|
|
96
100
|
"dependencies": {
|
|
File without changes
|