@matter/create 0.16.0-alpha.0-20251006-3fe1e7c57 → 0.16.0-alpha.0-20251013-89bb7099d
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.
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
{
|
|
6
6
|
"name": "control-onoff",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
8
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
9
9
|
},
|
|
10
10
|
"description": "Simple light controller",
|
|
11
11
|
"entrypoint": "OnOffController.ts"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
{
|
|
14
14
|
"name": "controller",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
17
|
-
"@project-chip/matter.js": "~0.16.0-alpha.0-
|
|
16
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d",
|
|
17
|
+
"@project-chip/matter.js": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
18
18
|
},
|
|
19
19
|
"description": "Controller example to commission and connect devices",
|
|
20
20
|
"entrypoint": "ControllerNode.ts"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
{
|
|
23
23
|
"name": "device-air-quality-sensor",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
25
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
26
26
|
},
|
|
27
27
|
"description": "Air quality sensor example",
|
|
28
28
|
"entrypoint": "AirQualitySensorDeviceNode.ts"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
{
|
|
31
31
|
"name": "device-bridge-onoff",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
33
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
34
34
|
},
|
|
35
35
|
"description": "Bridge for multiple OnOff light/sockets with a CLI command execution interface",
|
|
36
36
|
"entrypoint": "BridgedDevicesNode.ts"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
{
|
|
39
39
|
"name": "device-composed-onoff",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
41
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
42
42
|
},
|
|
43
43
|
"description": "Composed device for multiple OnOff light/sockets with a CLI command execution interface",
|
|
44
44
|
"entrypoint": "ComposedDeviceNode.ts"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
{
|
|
47
47
|
"name": "device-composed-wc-light",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
49
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
50
50
|
},
|
|
51
51
|
"description": "Composed device with Window covering and a light endpoint that logs changes",
|
|
52
52
|
"entrypoint": "IlluminatedRollerShade.ts"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
{
|
|
55
55
|
"name": "device-measuring-socket",
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
57
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
58
58
|
},
|
|
59
59
|
"description": "Socket device that reports random Energy and Power measurements",
|
|
60
60
|
"entrypoint": "MeasuredSocketDevice.ts"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
{
|
|
63
63
|
"name": "device-multiple-onoff",
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
65
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
66
66
|
},
|
|
67
67
|
"description": "Multiple OnOff light/socket nodes in one process with a CLI command execution interface",
|
|
68
68
|
"entrypoint": "MultiDeviceNode.ts"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
{
|
|
71
71
|
"name": "device-onoff",
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
73
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
74
74
|
},
|
|
75
75
|
"description": "OnOff light/socket device with a CLI command execution interface",
|
|
76
76
|
"entrypoint": "DeviceNode.ts"
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
{
|
|
79
79
|
"name": "device-onoff-advanced",
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@matter/nodejs": "~0.16.0-alpha.0-
|
|
82
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
81
|
+
"@matter/nodejs": "~0.16.0-alpha.0-20251013-89bb7099d",
|
|
82
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
83
83
|
},
|
|
84
84
|
"description": "OnOff light/socket device with BLE support and advanced API usage",
|
|
85
85
|
"entrypoint": "DeviceNodeFull.ts"
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
{
|
|
88
88
|
"name": "device-onoff-light",
|
|
89
89
|
"dependencies": {
|
|
90
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
90
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
91
91
|
},
|
|
92
92
|
"description": "OnOff light example which logs the state changes to the console",
|
|
93
93
|
"entrypoint": "LightDevice.ts"
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
{
|
|
96
96
|
"name": "device-robotic-vacuum-cleaner",
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
98
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
99
99
|
},
|
|
100
100
|
"description": "Robotic Vacuum Cleaner Example",
|
|
101
101
|
"entrypoint": "RoboticVacuumCleanerDevice.ts"
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
{
|
|
104
104
|
"name": "device-sensor",
|
|
105
105
|
"dependencies": {
|
|
106
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
106
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
107
107
|
},
|
|
108
108
|
"description": "Temperature/Humidity sensor with a CLI command interface to get the value",
|
|
109
109
|
"entrypoint": "SensorDeviceNode.ts"
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
{
|
|
112
112
|
"name": "device-simple",
|
|
113
113
|
"dependencies": {
|
|
114
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
114
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
115
115
|
},
|
|
116
116
|
"description": "A simple on/off device",
|
|
117
117
|
"entrypoint": "main.ts"
|
|
@@ -119,10 +119,26 @@
|
|
|
119
119
|
{
|
|
120
120
|
"name": "device-smoke-co-alarm",
|
|
121
121
|
"dependencies": {
|
|
122
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
122
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
123
123
|
},
|
|
124
124
|
"description": "Smoke CO Alarm Example",
|
|
125
125
|
"entrypoint": "SmokeCOAlarmDeviceNode.ts"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "mqtt-device",
|
|
129
|
+
"dependencies": {
|
|
130
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
131
|
+
},
|
|
132
|
+
"description": "Example device with MQTT control enabled",
|
|
133
|
+
"entrypoint": "MqttDevice.ts"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "web-socket-device",
|
|
137
|
+
"dependencies": {
|
|
138
|
+
"@matter/main": "~0.16.0-alpha.0-20251013-89bb7099d"
|
|
139
|
+
},
|
|
140
|
+
"description": "Example device with WebSocket control enabled",
|
|
141
|
+
"entrypoint": "WebSocketDevice.ts"
|
|
126
142
|
}
|
|
127
143
|
]
|
|
128
144
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// This demonstrates a matter.js device that supports an MQTT API on Node.js
|
|
9
|
+
|
|
10
|
+
import { MqttServer, ServerNode } from "@matter/main";
|
|
11
|
+
import { OnOffLightDevice, OnOffLightRequirements } from "@matter/main/devices/on-off-light";
|
|
12
|
+
|
|
13
|
+
// This plugin installs MQTT support for matter.js
|
|
14
|
+
import "@matter/mqtt";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Create node with MQTT APIs enabled.
|
|
18
|
+
*
|
|
19
|
+
* This requires an MQTT 5 broker. By default we configure the broker on localhost.
|
|
20
|
+
*
|
|
21
|
+
* You may configure the broker address here, or use environment variables:
|
|
22
|
+
*
|
|
23
|
+
* MATTER_MQTT_ADDRESS=mqtt://localhost/matter/light01
|
|
24
|
+
*
|
|
25
|
+
* or command line arguments:
|
|
26
|
+
*
|
|
27
|
+
* --mqtt-address=mqtt://localhost/matter/light01
|
|
28
|
+
*/
|
|
29
|
+
const node = await ServerNode.create(ServerNode.RootEndpoint.with(MqttServer));
|
|
30
|
+
|
|
31
|
+
// For demonstration purposes, this server prints state changes to the console
|
|
32
|
+
class ReportingOnOffServer extends OnOffLightRequirements.OnOffServer {
|
|
33
|
+
override initialize() {
|
|
34
|
+
this.events.onOff$Changed.on(value => {
|
|
35
|
+
console.log(`Light is now ${value ? "ON" : "OFF"}`);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
await node.add(OnOffLightDevice.with(ReportingOnOffServer));
|
|
41
|
+
|
|
42
|
+
await node.run();
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2022-2025 Matter.js Authors
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// This demonstrates a matter.js device that supports a WebSocket API on Node.js
|
|
9
|
+
|
|
10
|
+
import { ServerNode, WebSocketServer } from "@matter/main";
|
|
11
|
+
import { OnOffLightDevice, OnOffLightRequirements } from "@matter/main/devices/on-off-light";
|
|
12
|
+
|
|
13
|
+
// This plugin installs WebSocket support for matter.js on Node.js
|
|
14
|
+
import "@matter/nodejs-ws";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Create node with WebSocket APIs enabled.
|
|
18
|
+
*
|
|
19
|
+
* By default these listen on a UNIX socket under ~/.matter/matter.sock. You can change this here or by using
|
|
20
|
+
* environment variables:
|
|
21
|
+
*
|
|
22
|
+
* MATTER_WEBSOCKET_ADDRESS=ws://localhost
|
|
23
|
+
*
|
|
24
|
+
* or command line arguments:
|
|
25
|
+
*
|
|
26
|
+
* --websocket-address=ws://localhost
|
|
27
|
+
*/
|
|
28
|
+
const node = await ServerNode.create(ServerNode.RootEndpoint.with(WebSocketServer));
|
|
29
|
+
|
|
30
|
+
// For demonstration purposes, this server prints state changes to the console
|
|
31
|
+
class ReportingOnOffServer extends OnOffLightRequirements.OnOffServer {
|
|
32
|
+
override initialize() {
|
|
33
|
+
this.events.onOff$Changed.on(value => {
|
|
34
|
+
console.log(`Light is now ${value ? "ON" : "OFF"}`);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
await node.add(OnOffLightDevice.with(ReportingOnOffServer));
|
|
40
|
+
|
|
41
|
+
await node.run();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/create",
|
|
3
|
-
"version": "0.16.0-alpha.0-
|
|
3
|
+
"version": "0.16.0-alpha.0-20251013-89bb7099d",
|
|
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/matter-js/matter.js#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@matter/tools": "0.16.0-alpha.0-
|
|
35
|
+
"@matter/tools": "0.16.0-alpha.0-20251013-89bb7099d",
|
|
36
36
|
"@types/node": "^24.6.2",
|
|
37
37
|
"@types/tar-stream": "^3.1.4"
|
|
38
38
|
},
|