@matter/create 0.13.0-alpha.0-20250318-c1aa38b08 → 0.13.0-alpha.0-20250323-770919c6a
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/dist/esm/build.config.ts.js +3 -3
- package/dist/esm/build.config.ts.js.map +1 -1
- package/dist/templates/controller/ControllerNode.ts +14 -11
- package/dist/templates/device-onoff-advanced/DeviceNodeFull.ts +4 -3
- package/dist/templates/device-onoff-advanced/cluster/DummyThreadNetworkCommissioningServer.ts +2 -2
- package/dist/templates/index.json +13 -13
- package/package.json +2 -2
- package/src/build.config.ts +3 -3
|
@@ -36,7 +36,7 @@ async function before({ project }) {
|
|
|
36
36
|
dependencies[pkgName] = matterJsVersion;
|
|
37
37
|
continue;
|
|
38
38
|
}
|
|
39
|
-
const version = examplesPkg.json.dependencies[pkgName];
|
|
39
|
+
const version = examplesPkg.json.dependencies?.[pkgName];
|
|
40
40
|
if (version !== void 0) {
|
|
41
41
|
dependencies[pkgName] = version;
|
|
42
42
|
}
|
|
@@ -56,8 +56,8 @@ async function before({ project }) {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
const tools = project.pkg.findPackage("@matter/tools").json;
|
|
59
|
-
const typescriptVersion = tools.dependencies
|
|
60
|
-
const nodeTypesVersion = tools.devDependencies["@types/node"];
|
|
59
|
+
const typescriptVersion = tools.dependencies?.typescript;
|
|
60
|
+
const nodeTypesVersion = tools.devDependencies?.["@types/node"];
|
|
61
61
|
const config = {
|
|
62
62
|
typescriptVersion,
|
|
63
63
|
nodeTypesVersion,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/build.config.ts"],
|
|
4
|
-
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,SAAS,OAAO,UAAU,iBAAiB;AAC3C,SAAS,UAAU,eAAe;AAMlC,eAAsB,OAAO,EAAE,QAAQ,GAA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Q;AACtE,YAAM,MAAM,QAAQ,WAAW,GAAG,EAAE,WAAW,KAAK,CAAC;AACrD,YAAM,UAAU,aAAa,MAAM;AAAA,IACvC;AAEA,QAAI,CAAC,YAAY;AACb;AAAA,IACJ;AAEA,cAAU,KAAK;AAAA,MACX;AAAA,MACA;AAAA,MACA,aAAa,MAAM,CAAC;AAAA,MACpB;AAAA,IACJ,CAAC;AAAA,EACL;AAEA,QAAM,QAAQ,QAAQ,IAAI,YAAY,eAAe,EAAE;AACvD,QAAM,oBAAoB,MAAM,cAAc;AAC9C,QAAM,mBAAmB,MAAM,kBAAkB,aAAa;AAE9D,QAAM,SAAiB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAEA,QAAM,UAAU,UAAU,QAAQ,2BAA2B,GAAG,KAAK,UAAU,QAAQ,QAAW,CAAC,CAAC;AACxG;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* because you need to adjust the code in any way depending on your use case.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { Environment, Logger, singleton, StorageService, Time } from "@matter/main";
|
|
14
|
+
import { Diagnostic, Environment, Logger, singleton, StorageService, Time } from "@matter/main";
|
|
15
15
|
import { BasicInformationCluster, DescriptorCluster, GeneralCommissioning, OnOff } from "@matter/main/clusters";
|
|
16
|
-
import { Ble, ClusterClientObj
|
|
16
|
+
import { Ble, ClusterClientObj } from "@matter/main/protocol";
|
|
17
17
|
import { ManualPairingCodeCodec, NodeId } from "@matter/main/types";
|
|
18
18
|
import { NodeJsBle } from "@matter/nodejs-ble";
|
|
19
19
|
import { CommissioningController, NodeCommissioningOptions } from "@project-chip/matter.js";
|
|
@@ -78,7 +78,7 @@ class ControllerNode {
|
|
|
78
78
|
shortDiscriminator = pairingCodeCodec.shortDiscriminator;
|
|
79
79
|
longDiscriminator = undefined;
|
|
80
80
|
setupPin = pairingCodeCodec.passcode;
|
|
81
|
-
logger.debug(`Data extracted from pairing code: ${
|
|
81
|
+
logger.debug(`Data extracted from pairing code: ${Diagnostic.json(pairingCodeCodec)}`);
|
|
82
82
|
} else {
|
|
83
83
|
longDiscriminator =
|
|
84
84
|
environment.vars.number("longDiscriminator") ??
|
|
@@ -93,7 +93,7 @@ class ControllerNode {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
// Collect commissioning options from commandline parameters
|
|
96
|
-
const commissioningOptions:
|
|
96
|
+
const commissioningOptions: NodeCommissioningOptions["commissioning"] = {
|
|
97
97
|
regulatoryLocation: GeneralCommissioning.RegulatoryLocationType.IndoorOutdoor,
|
|
98
98
|
regulatoryCountryCode: "XX",
|
|
99
99
|
};
|
|
@@ -152,7 +152,7 @@ class ControllerNode {
|
|
|
152
152
|
},
|
|
153
153
|
passcode: setupPin,
|
|
154
154
|
};
|
|
155
|
-
logger.info(`Commissioning ... ${
|
|
155
|
+
logger.info(`Commissioning ... ${Diagnostic.json(options)}`);
|
|
156
156
|
const nodeId = await commissioningController.commissionNode(options);
|
|
157
157
|
|
|
158
158
|
console.log(`Commissioning successfully done with nodeId ${nodeId}`);
|
|
@@ -161,7 +161,7 @@ class ControllerNode {
|
|
|
161
161
|
// After commissioning or if we have a commissioned node we can connect to it
|
|
162
162
|
try {
|
|
163
163
|
const nodes = commissioningController.getCommissionedNodes();
|
|
164
|
-
console.log("Found commissioned nodes:",
|
|
164
|
+
console.log("Found commissioned nodes:", Diagnostic.json(nodes));
|
|
165
165
|
|
|
166
166
|
const nodeId = NodeId(environment.vars.number("nodeid") ?? nodes[0]);
|
|
167
167
|
if (!nodes.includes(nodeId)) {
|
|
@@ -169,7 +169,10 @@ class ControllerNode {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
const nodeDetails = commissioningController.getCommissionedNodesDetails();
|
|
172
|
-
console.log(
|
|
172
|
+
console.log(
|
|
173
|
+
"Commissioned nodes details:",
|
|
174
|
+
Diagnostic.json(nodeDetails.find(node => node.nodeId === nodeId)),
|
|
175
|
+
);
|
|
173
176
|
|
|
174
177
|
// Get the node instance
|
|
175
178
|
const node = await commissioningController.getNode(nodeId);
|
|
@@ -177,14 +180,14 @@ class ControllerNode {
|
|
|
177
180
|
// Subscribe to events of the node
|
|
178
181
|
node.events.attributeChanged.on(({ path: { nodeId, clusterId, endpointId, attributeName }, value }) =>
|
|
179
182
|
console.log(
|
|
180
|
-
`attributeChangedCallback ${nodeId}: Attribute ${endpointId}/${clusterId}/${attributeName} changed to ${
|
|
183
|
+
`attributeChangedCallback ${nodeId}: Attribute ${endpointId}/${clusterId}/${attributeName} changed to ${Diagnostic.json(
|
|
181
184
|
value,
|
|
182
185
|
)}`,
|
|
183
186
|
),
|
|
184
187
|
);
|
|
185
188
|
node.events.eventTriggered.on(({ path: { nodeId, clusterId, endpointId, eventName }, events }) =>
|
|
186
189
|
console.log(
|
|
187
|
-
`eventTriggeredCallback ${nodeId}: Event ${endpointId}/${clusterId}/${eventName} triggered with ${
|
|
190
|
+
`eventTriggeredCallback ${nodeId}: Event ${endpointId}/${clusterId}/${eventName} triggered with ${Diagnostic.json(
|
|
188
191
|
events,
|
|
189
192
|
)}`,
|
|
190
193
|
),
|
|
@@ -246,7 +249,7 @@ class ControllerNode {
|
|
|
246
249
|
|
|
247
250
|
// Example to get all Attributes of the commissioned node: */*/*
|
|
248
251
|
//const attributesAll = await interactionClient.getAllAttributes();
|
|
249
|
-
//console.log("Attributes-All:",
|
|
252
|
+
//console.log("Attributes-All:", Diagnostic.json(attributesAll));
|
|
250
253
|
|
|
251
254
|
// Example to get all Attributes of all Descriptor Clusters of the commissioned node: */DescriptorCluster/*
|
|
252
255
|
//const attributesAllDescriptor = await interactionClient.getMultipleAttributes([{ clusterId: DescriptorCluster.id} ]);
|
|
@@ -260,7 +263,7 @@ class ControllerNode {
|
|
|
260
263
|
if (devices[0] && devices[0].number === 1) {
|
|
261
264
|
// Example to subscribe to all Attributes of endpoint 1 of the commissioned node: */*/*
|
|
262
265
|
//await interactionClient.subscribeMultipleAttributes([{ endpointId: 1, /* subscribe anything from endpoint 1 */ }], 0, 180, data => {
|
|
263
|
-
// console.log("Subscribe-All Data:",
|
|
266
|
+
// console.log("Subscribe-All Data:", Diagnostic.json(data));
|
|
264
267
|
//});
|
|
265
268
|
|
|
266
269
|
const onOff: ClusterClientObj<OnOff.Complete> | undefined = devices[0].getClusterClient(OnOff.Complete);
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
Endpoint,
|
|
27
27
|
EndpointServer,
|
|
28
28
|
Environment,
|
|
29
|
+
LogDestination,
|
|
29
30
|
LogLevel,
|
|
30
31
|
Logger,
|
|
31
32
|
ServerNode,
|
|
32
33
|
StorageService,
|
|
33
34
|
Time,
|
|
34
35
|
VendorId,
|
|
35
|
-
logLevelFromString,
|
|
36
36
|
singleton,
|
|
37
37
|
} from "@matter/main";
|
|
38
38
|
import { OnOffServer } from "@matter/main/behaviors";
|
|
@@ -97,8 +97,9 @@ function executeCommand(scriptParamName: string) {
|
|
|
97
97
|
|
|
98
98
|
const logFile = environment.vars.string("logfile.filename");
|
|
99
99
|
if (logFile !== undefined) {
|
|
100
|
-
Logger.
|
|
101
|
-
|
|
100
|
+
Logger.destinations.filelogger = LogDestination({
|
|
101
|
+
write: await createFileLogger(logFile),
|
|
102
|
+
level: LogLevel(environment.vars.get("logfile.loglevel", "debug")),
|
|
102
103
|
});
|
|
103
104
|
}
|
|
104
105
|
|
package/dist/templates/device-onoff-advanced/cluster/DummyThreadNetworkCommissioningServer.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Bytes,
|
|
7
|
+
import { Bytes, Diagnostic } from "@matter/main";
|
|
8
8
|
import { GeneralCommissioningBehavior } from "@matter/main/behaviors/general-commissioning";
|
|
9
9
|
import { NetworkCommissioningBehavior } from "@matter/main/behaviors/network-commissioning";
|
|
10
10
|
import { NetworkCommissioning } from "@matter/main/clusters";
|
|
@@ -48,7 +48,7 @@ export class DummyThreadNetworkCommissioningServer extends NetworkCommissioningB
|
|
|
48
48
|
lqi: 50,
|
|
49
49
|
},
|
|
50
50
|
];
|
|
51
|
-
console.log(
|
|
51
|
+
console.log(Diagnostic.json(threadScanResults));
|
|
52
52
|
|
|
53
53
|
return {
|
|
54
54
|
networkingStatus,
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
{
|
|
6
6
|
"name": "controller",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
9
|
-
"@matter/nodejs-ble": "~0.13.0-alpha.0-
|
|
10
|
-
"@project-chip/matter.js": "~0.13.0-alpha.0-
|
|
8
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a",
|
|
9
|
+
"@matter/nodejs-ble": "~0.13.0-alpha.0-20250323-770919c6a",
|
|
10
|
+
"@project-chip/matter.js": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
11
11
|
},
|
|
12
12
|
"description": "Controller example to commission and connect devices",
|
|
13
13
|
"entrypoint": "ControllerNode.ts"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
{
|
|
16
16
|
"name": "device-bridge-onoff",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
18
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
19
19
|
},
|
|
20
20
|
"description": "Bridge for multiple OnOff light/sockets with a CLI command execution interface",
|
|
21
21
|
"entrypoint": "BridgedDevicesNode.ts"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
{
|
|
24
24
|
"name": "device-composed-onoff",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
26
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
27
27
|
},
|
|
28
28
|
"description": "Composed device for multiple OnOff light/sockets with a CLI command execution interface",
|
|
29
29
|
"entrypoint": "ComposedDeviceNode.ts"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
{
|
|
32
32
|
"name": "device-composed-wc-light",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
34
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
35
35
|
},
|
|
36
36
|
"description": "Composed device with Window covering and a light endpoint that logs changes",
|
|
37
37
|
"entrypoint": "IlluminatedRollerShade.ts"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
{
|
|
40
40
|
"name": "device-measuring-socket",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
42
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
43
43
|
},
|
|
44
44
|
"description": "Socket device that reports random Energy and Power measurements",
|
|
45
45
|
"entrypoint": "MeasuredSocketDevice.ts"
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
{
|
|
60
60
|
"name": "device-onoff-advanced",
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@matter/nodejs": "~0.13.0-alpha.0-
|
|
63
|
-
"@matter/nodejs-ble": "~0.13.0-alpha.0-
|
|
64
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
62
|
+
"@matter/nodejs": "~0.13.0-alpha.0-20250323-770919c6a",
|
|
63
|
+
"@matter/nodejs-ble": "~0.13.0-alpha.0-20250323-770919c6a",
|
|
64
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
65
65
|
},
|
|
66
66
|
"description": "OnOff light/socket device with BLE support and advanced API usage",
|
|
67
67
|
"entrypoint": "DeviceNodeFull.ts"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
{
|
|
70
70
|
"name": "device-onoff-light",
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
72
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
73
73
|
},
|
|
74
74
|
"description": "OnOff light example which logs the state changes to the console",
|
|
75
75
|
"entrypoint": "LightDevice.ts"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
{
|
|
78
78
|
"name": "device-sensor",
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
80
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
81
81
|
},
|
|
82
82
|
"description": "Temperature/Humidity sensor with a CLI command interface to get the value",
|
|
83
83
|
"entrypoint": "SensorDeviceNode.ts"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
{
|
|
86
86
|
"name": "device-simple",
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@matter/main": "~0.13.0-alpha.0-
|
|
88
|
+
"@matter/main": "~0.13.0-alpha.0-20250323-770919c6a"
|
|
89
89
|
},
|
|
90
90
|
"description": "A simple on/off device",
|
|
91
91
|
"entrypoint": "main.ts"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/create",
|
|
3
|
-
"version": "0.13.0-alpha.0-
|
|
3
|
+
"version": "0.13.0-alpha.0-20250323-770919c6a",
|
|
4
4
|
"description": "Matter.js skeleton project generator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/project-chip/matter.js#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@matter/tools": "0.13.0-alpha.0-
|
|
35
|
+
"@matter/tools": "0.13.0-alpha.0-20250323-770919c6a",
|
|
36
36
|
"@types/node": "^22.13.10",
|
|
37
37
|
"@types/tar-stream": "^3.1.3"
|
|
38
38
|
},
|
package/src/build.config.ts
CHANGED
|
@@ -55,7 +55,7 @@ export async function before({ project }: Project.Context) {
|
|
|
55
55
|
continue;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const version = examplesPkg.json.dependencies[pkgName];
|
|
58
|
+
const version = examplesPkg.json.dependencies?.[pkgName];
|
|
59
59
|
if (version !== undefined) {
|
|
60
60
|
dependencies[pkgName] = version;
|
|
61
61
|
}
|
|
@@ -79,8 +79,8 @@ export async function before({ project }: Project.Context) {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
const tools = project.pkg.findPackage("@matter/tools").json;
|
|
82
|
-
const typescriptVersion = tools.dependencies
|
|
83
|
-
const nodeTypesVersion = tools.devDependencies["@types/node"];
|
|
82
|
+
const typescriptVersion = tools.dependencies?.typescript as string;
|
|
83
|
+
const nodeTypesVersion = tools.devDependencies?.["@types/node"] as string;
|
|
84
84
|
|
|
85
85
|
const config: Config = {
|
|
86
86
|
typescriptVersion,
|