@matter/create 0.13.1-alpha.0-20250520-d699cd56d → 0.14.0-alpha.0-20250521-979eda05d

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.
@@ -12,12 +12,11 @@
12
12
  * It can be used as CLI script and starting point for your own device node implementation.
13
13
  */
14
14
 
15
- import { Endpoint, EndpointServer, Environment, ServerNode, StorageService, Time, VendorId } from "@matter/main";
15
+ import { Endpoint, Environment, ServerNode, StorageService, Time, VendorId } from "@matter/main";
16
16
  import { BridgedDeviceBasicInformationServer } from "@matter/main/behaviors/bridged-device-basic-information";
17
17
  import { OnOffLightDevice } from "@matter/main/devices/on-off-light";
18
18
  import { OnOffPlugInUnitDevice } from "@matter/main/devices/on-off-plug-in-unit";
19
19
  import { AggregatorEndpoint } from "@matter/main/endpoints/aggregator";
20
- import { logEndpoint } from "@matter/main/protocol";
21
20
  import { execSync } from "node:child_process";
22
21
 
23
22
  /** Initialize configuration values */
@@ -132,7 +131,7 @@ await server.start();
132
131
  /**
133
132
  * Log the endpoint structure for debugging reasons and to allow to verify anything is correct
134
133
  */
135
- logEndpoint(EndpointServer.forEndpoint(server));
134
+ //logEndpoint(EndpointServer.forEndpoint(server));
136
135
 
137
136
  /*
138
137
  If you want to dynamically add another device during runtime you can do so by doing the following:
@@ -12,13 +12,14 @@
12
12
  * It can be used as CLI script and starting point for your own device node implementation.
13
13
  */
14
14
 
15
- import { Endpoint, EndpointServer, Environment, ServerNode, StorageService, Time } from "@matter/main";
15
+ import { Endpoint, Environment, Logger, ServerNode, StorageService, Time } from "@matter/main";
16
16
  import { OnOffLightDevice } from "@matter/main/devices/on-off-light";
17
17
  import { OnOffPlugInUnitDevice } from "@matter/main/devices/on-off-plug-in-unit";
18
- import { logEndpoint } from "@matter/main/protocol";
19
18
  import { DeviceTypeId, VendorId } from "@matter/main/types";
20
19
  import { execSync } from "node:child_process";
21
20
 
21
+ const logger = Logger.get("ComposedDeviceNode");
22
+
22
23
  /** Initialize configuration values */
23
24
  const { isSocket, deviceName, vendorName, passcode, discriminator, vendorId, productName, productId, port, uniqueId } =
24
25
  await getConfiguration();
@@ -103,7 +104,7 @@ for (let idx = 0; idx < isSocket.length; idx++) {
103
104
  /**
104
105
  * Log the endpoint structure for debugging reasons and to allow to verify anything is correct
105
106
  */
106
- logEndpoint(EndpointServer.forEndpoint(server));
107
+ logger.info(server);
107
108
 
108
109
  /**
109
110
  * In order to start the node and announce it into the network we use the run method which resolves when the node goes
@@ -12,21 +12,13 @@
12
12
  * It can be used as CLI script and starting point for your own device node implementation.
13
13
  */
14
14
 
15
- import {
16
- DeviceTypeId,
17
- Endpoint,
18
- EndpointServer,
19
- Environment,
20
- ServerNode,
21
- StorageService,
22
- Time,
23
- VendorId,
24
- } from "@matter/main";
15
+ import { DeviceTypeId, Endpoint, Environment, Logger, ServerNode, StorageService, Time, VendorId } from "@matter/main";
25
16
  import { OnOffLightDevice } from "@matter/main/devices/on-off-light";
26
17
  import { OnOffPlugInUnitDevice } from "@matter/main/devices/on-off-plug-in-unit";
27
- import { logEndpoint } from "@matter/main/protocol";
28
18
  import { execSync } from "node:child_process";
29
19
 
20
+ const logger = Logger.get("MultiDeviceNode");
21
+
30
22
  const devices = await getConfiguration();
31
23
  for (let idx = 1; idx < devices.length; idx++) {
32
24
  const {
@@ -112,7 +104,7 @@ for (let idx = 1; idx < devices.length; idx++) {
112
104
  /**
113
105
  * Log the endpoint structure for debugging reasons and to allow to verify anything is correct
114
106
  */
115
- logEndpoint(EndpointServer.forEndpoint(server));
107
+ logger.info(server);
116
108
 
117
109
  console.log("----------------------------");
118
110
  console.log(`QR Code for Device ${i} on port ${port}:`);
@@ -11,20 +11,12 @@
11
11
  * This example is CJS conform and do not use top level await's.
12
12
  */
13
13
 
14
- import {
15
- DeviceTypeId,
16
- Endpoint,
17
- EndpointServer,
18
- Environment,
19
- ServerNode,
20
- StorageService,
21
- Time,
22
- VendorId,
23
- } from "@matter/main";
14
+ import { DeviceTypeId, Endpoint, Environment, Logger, ServerNode, StorageService, Time, VendorId } from "@matter/main";
24
15
  import { OnOffLightDevice, OnOffPlugInUnitDevice } from "@matter/main/devices";
25
- import { logEndpoint } from "@matter/main/protocol";
26
16
  import { execSync } from "node:child_process";
27
17
 
18
+ const logger = Logger.get("DeviceNode");
19
+
28
20
  async function main() {
29
21
  /** Initialize configuration values */
30
22
  const {
@@ -112,7 +104,7 @@ async function main() {
112
104
  /**
113
105
  * Log the endpoint structure for debugging reasons and to allow to verify anything is correct
114
106
  */
115
- logEndpoint(EndpointServer.forEndpoint(server));
107
+ logger.info(server);
116
108
 
117
109
  /**
118
110
  * In order to start the node and announce it into the network we use the run method which resolves when the node goes
@@ -24,7 +24,6 @@ import {
24
24
  Bytes,
25
25
  DeviceTypeId,
26
26
  Endpoint,
27
- EndpointServer,
28
27
  Environment,
29
28
  LogDestination,
30
29
  LogLevel,
@@ -39,7 +38,7 @@ import { OnOffServer } from "@matter/main/behaviors";
39
38
  import { GeneralDiagnostics, NetworkCommissioning, OnOff } from "@matter/main/clusters";
40
39
  import { OnOffLightDevice, OnOffPlugInUnitDevice } from "@matter/main/devices";
41
40
  import { RootRequirements } from "@matter/main/endpoints";
42
- import { Ble, FabricAction, logEndpoint } from "@matter/main/protocol";
41
+ import { Ble, FabricAction } from "@matter/main/protocol";
43
42
  import { QrCode } from "@matter/main/types";
44
43
  import { createFileLogger } from "@matter/nodejs";
45
44
  import { NodeJsBle } from "@matter/nodejs-ble";
@@ -52,6 +51,8 @@ import {
52
51
  MyFancyOwnFunctionalityBehavior,
53
52
  } from "./cluster/MyFancyOwnFunctionality.js";
54
53
 
54
+ const logger = Logger.get("DeviceNodeFull");
55
+
55
56
  /**
56
57
  * The following code brings some convenience to the CLI script. It allows to set the log level and format via
57
58
  * command line parameters. It also initializes the BLE stack if the `--ble` parameter is present.
@@ -377,7 +378,7 @@ endpoint.events.identify.stopIdentifying.on(() => {
377
378
  // Note that you may serve multiple nodes from a single process. We only have one, however, so we can use the run()
378
379
  // method of the node.
379
380
 
380
- logEndpoint(EndpointServer.forEndpoint(server));
381
+ logger.info(server);
381
382
 
382
383
  /**
383
384
  * In order to start the node and announce it into the network we start the node. This method resolves when the Matter
@@ -11,13 +11,14 @@
11
11
  * This example is CJS conform and do not use top level await's.
12
12
  */
13
13
 
14
- import { Endpoint, EndpointServer, Environment, ServerNode, StorageService, Time } from "@matter/main";
14
+ import { Endpoint, Environment, Logger, ServerNode, StorageService, Time } from "@matter/main";
15
15
  import { HumiditySensorDevice } from "@matter/main/devices/humidity-sensor";
16
16
  import { TemperatureSensorDevice } from "@matter/main/devices/temperature-sensor";
17
- import { logEndpoint } from "@matter/main/protocol";
18
17
  import { DeviceTypeId, VendorId } from "@matter/main/types";
19
18
  import { execSync } from "node:child_process";
20
19
 
20
+ const logger = Logger.get("SensorDeviceNode");
21
+
21
22
  async function main() {
22
23
  /** Initialize configuration values */
23
24
  const {
@@ -110,7 +111,7 @@ async function main() {
110
111
  /**
111
112
  * Log the endpoint structure for debugging reasons and to allow to verify anything is correct
112
113
  */
113
- logEndpoint(EndpointServer.forEndpoint(server));
114
+ logger.info(server);
114
115
 
115
116
  const updateInterval = setInterval(() => {
116
117
  let setter: Promise<void>;
@@ -5,9 +5,9 @@
5
5
  {
6
6
  "name": "controller",
7
7
  "dependencies": {
8
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d",
9
- "@matter/nodejs-ble": "~0.13.1-alpha.0-20250520-d699cd56d",
10
- "@project-chip/matter.js": "~0.13.1-alpha.0-20250520-d699cd56d"
8
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d",
9
+ "@matter/nodejs-ble": "~0.14.0-alpha.0-20250521-979eda05d",
10
+ "@project-chip/matter.js": "~0.14.0-alpha.0-20250521-979eda05d"
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-air-quality-sensor",
17
17
  "dependencies": {
18
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
18
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
19
19
  },
20
20
  "description": "Air quality sensor example",
21
21
  "entrypoint": "AirQualitySensorDeviceNode.ts"
@@ -23,7 +23,7 @@
23
23
  {
24
24
  "name": "device-bridge-onoff",
25
25
  "dependencies": {
26
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
26
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
27
27
  },
28
28
  "description": "Bridge for multiple OnOff light/sockets with a CLI command execution interface",
29
29
  "entrypoint": "BridgedDevicesNode.ts"
@@ -31,7 +31,7 @@
31
31
  {
32
32
  "name": "device-composed-onoff",
33
33
  "dependencies": {
34
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
34
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
35
35
  },
36
36
  "description": "Composed device for multiple OnOff light/sockets with a CLI command execution interface",
37
37
  "entrypoint": "ComposedDeviceNode.ts"
@@ -39,7 +39,7 @@
39
39
  {
40
40
  "name": "device-composed-wc-light",
41
41
  "dependencies": {
42
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
42
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
43
43
  },
44
44
  "description": "Composed device with Window covering and a light endpoint that logs changes",
45
45
  "entrypoint": "IlluminatedRollerShade.ts"
@@ -47,29 +47,33 @@
47
47
  {
48
48
  "name": "device-measuring-socket",
49
49
  "dependencies": {
50
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
50
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
51
51
  },
52
52
  "description": "Socket device that reports random Energy and Power measurements",
53
53
  "entrypoint": "MeasuredSocketDevice.ts"
54
54
  },
55
55
  {
56
56
  "name": "device-multiple-onoff",
57
- "dependencies": {},
57
+ "dependencies": {
58
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
59
+ },
58
60
  "description": "Multiple OnOff light/socket nodes in one process with a CLI command execution interface",
59
61
  "entrypoint": "MultiDeviceNode.ts"
60
62
  },
61
63
  {
62
64
  "name": "device-onoff",
63
- "dependencies": {},
65
+ "dependencies": {
66
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
67
+ },
64
68
  "description": "OnOff light/socket device with a CLI command execution interface",
65
69
  "entrypoint": "DeviceNode.ts"
66
70
  },
67
71
  {
68
72
  "name": "device-onoff-advanced",
69
73
  "dependencies": {
70
- "@matter/nodejs": "~0.13.1-alpha.0-20250520-d699cd56d",
71
- "@matter/nodejs-ble": "~0.13.1-alpha.0-20250520-d699cd56d",
72
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
74
+ "@matter/nodejs": "~0.14.0-alpha.0-20250521-979eda05d",
75
+ "@matter/nodejs-ble": "~0.14.0-alpha.0-20250521-979eda05d",
76
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
73
77
  },
74
78
  "description": "OnOff light/socket device with BLE support and advanced API usage",
75
79
  "entrypoint": "DeviceNodeFull.ts"
@@ -77,7 +81,7 @@
77
81
  {
78
82
  "name": "device-onoff-light",
79
83
  "dependencies": {
80
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
84
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
81
85
  },
82
86
  "description": "OnOff light example which logs the state changes to the console",
83
87
  "entrypoint": "LightDevice.ts"
@@ -85,7 +89,7 @@
85
89
  {
86
90
  "name": "device-robotic-vacuum-cleaner",
87
91
  "dependencies": {
88
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
92
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
89
93
  },
90
94
  "description": "Robotic Vacuum Cleaner Example",
91
95
  "entrypoint": "RoboticVacuumCleanerDevice.ts"
@@ -93,7 +97,7 @@
93
97
  {
94
98
  "name": "device-sensor",
95
99
  "dependencies": {
96
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
100
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
97
101
  },
98
102
  "description": "Temperature/Humidity sensor with a CLI command interface to get the value",
99
103
  "entrypoint": "SensorDeviceNode.ts"
@@ -101,7 +105,7 @@
101
105
  {
102
106
  "name": "device-simple",
103
107
  "dependencies": {
104
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
108
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
105
109
  },
106
110
  "description": "A simple on/off device",
107
111
  "entrypoint": "main.ts"
@@ -109,7 +113,7 @@
109
113
  {
110
114
  "name": "device-smoke-co-alarm",
111
115
  "dependencies": {
112
- "@matter/main": "~0.13.1-alpha.0-20250520-d699cd56d"
116
+ "@matter/main": "~0.14.0-alpha.0-20250521-979eda05d"
113
117
  },
114
118
  "description": "Smoke CO Alarm Example",
115
119
  "entrypoint": "SmokeCOAlarmDeviceNode.ts"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matter/create",
3
- "version": "0.13.1-alpha.0-20250520-d699cd56d",
3
+ "version": "0.14.0-alpha.0-20250521-979eda05d",
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.1-alpha.0-20250520-d699cd56d",
35
+ "@matter/tools": "0.14.0-alpha.0-20250521-979eda05d",
36
36
  "@types/node": "^22.15.19",
37
37
  "@types/tar-stream": "^3.1.3"
38
38
  },