@matter/create 0.16.0-alpha.0-20251107-6bcb5baf4 → 0.16.0-alpha.0-20251108-514b3f69e
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.
|
@@ -315,6 +315,12 @@ export class RvcDeviceLogic extends Behavior {
|
|
|
315
315
|
await this.endpoint.setStateOf(CustomRvcRunModeServer, {
|
|
316
316
|
currentMode: RvcDeviceRunModes.Idle,
|
|
317
317
|
});
|
|
318
|
+
this.endpoint
|
|
319
|
+
.eventsOf(CustomRvcOperationalStateServer)
|
|
320
|
+
.operationCompletion.emit(
|
|
321
|
+
{ completionErrorCode: RvcOperationalState.ErrorState.NoError },
|
|
322
|
+
this.context,
|
|
323
|
+
);
|
|
318
324
|
}
|
|
319
325
|
}
|
|
320
326
|
|
package/dist/templates/device-robotic-vacuum-cleaner/behaviors/CustomRvcOperationalStateServer.ts
CHANGED
|
@@ -9,13 +9,17 @@ import { RvcOperationalStateServer } from "@matter/main/behaviors/rvc-operationa
|
|
|
9
9
|
import { OperationalState } from "@matter/main/clusters/operational-state";
|
|
10
10
|
import { RvcOperationalState } from "@matter/main/clusters/rvc-operational-state";
|
|
11
11
|
|
|
12
|
+
const RvcOperationalStateServerWithCompletionEvent = RvcOperationalStateServer.enable({
|
|
13
|
+
events: { operationCompletion: true },
|
|
14
|
+
});
|
|
15
|
+
|
|
12
16
|
/**
|
|
13
17
|
* This is a custom implementation of {@link RvcOperationalStateServer} that implements the needed methods goHome,
|
|
14
18
|
* pause and resume, that are optional and so can not be implemented in the base class.
|
|
15
19
|
* It also, adds custom events to the server that can be used by the device logic to more easily react on the needed
|
|
16
20
|
* actions.
|
|
17
21
|
*/
|
|
18
|
-
export class CustomRvcOperationalStateServer extends
|
|
22
|
+
export class CustomRvcOperationalStateServer extends RvcOperationalStateServerWithCompletionEvent {
|
|
19
23
|
declare events: CustomRvcOperationalStateServer.Events;
|
|
20
24
|
|
|
21
25
|
override async goHome(): Promise<RvcOperationalState.OperationalCommandResponse> {
|
|
@@ -37,7 +41,11 @@ export class CustomRvcOperationalStateServer extends RvcOperationalStateServer {
|
|
|
37
41
|
) {
|
|
38
42
|
if (
|
|
39
43
|
this.state.operationalState === RvcOperationalState.OperationalState.Charging ||
|
|
40
|
-
this.state.operationalState === RvcOperationalState.OperationalState.Docked
|
|
44
|
+
this.state.operationalState === RvcOperationalState.OperationalState.Docked ||
|
|
45
|
+
this.state.operationalState === RvcOperationalState.OperationalState.EmptyingDustBin ||
|
|
46
|
+
this.state.operationalState === RvcOperationalState.OperationalState.CleaningMop ||
|
|
47
|
+
this.state.operationalState === RvcOperationalState.OperationalState.FillingWaterTank ||
|
|
48
|
+
this.state.operationalState === RvcOperationalState.OperationalState.UpdatingMaps
|
|
41
49
|
) {
|
|
42
50
|
return {
|
|
43
51
|
commandResponseState: {
|
|
@@ -56,7 +64,13 @@ export class CustomRvcOperationalStateServer extends RvcOperationalStateServer {
|
|
|
56
64
|
result.commandResponseState.errorStateId === OperationalState.ErrorState.NoError &&
|
|
57
65
|
this.state.operationalState !== RvcOperationalState.OperationalState.Paused
|
|
58
66
|
) {
|
|
59
|
-
if (
|
|
67
|
+
if (
|
|
68
|
+
this.state.operationalState === RvcOperationalState.OperationalState.SeekingCharger ||
|
|
69
|
+
this.state.operationalState === RvcOperationalState.OperationalState.EmptyingDustBin ||
|
|
70
|
+
this.state.operationalState === RvcOperationalState.OperationalState.CleaningMop ||
|
|
71
|
+
this.state.operationalState === RvcOperationalState.OperationalState.FillingWaterTank ||
|
|
72
|
+
this.state.operationalState === RvcOperationalState.OperationalState.UpdatingMaps
|
|
73
|
+
) {
|
|
60
74
|
return {
|
|
61
75
|
commandResponseState: {
|
|
62
76
|
errorStateId: OperationalState.ErrorState.CommandInvalidInState,
|
|
@@ -71,7 +85,7 @@ export class CustomRvcOperationalStateServer extends RvcOperationalStateServer {
|
|
|
71
85
|
}
|
|
72
86
|
|
|
73
87
|
export namespace CustomRvcOperationalStateServer {
|
|
74
|
-
export class Events extends
|
|
88
|
+
export class Events extends RvcOperationalStateServerWithCompletionEvent.Events {
|
|
75
89
|
resumeTriggered = AsyncObservable();
|
|
76
90
|
pauseTriggered = AsyncObservable();
|
|
77
91
|
goHomeTriggered = AsyncObservable();
|
|
@@ -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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e",
|
|
17
|
+
"@project-chip/matter.js": "~0.16.0-alpha.0-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e",
|
|
82
|
+
"@matter/main": "~0.16.0-alpha.0-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
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-20251108-514b3f69e"
|
|
115
115
|
},
|
|
116
116
|
"description": "A simple on/off device",
|
|
117
117
|
"entrypoint": "main.ts"
|
|
@@ -119,7 +119,7 @@
|
|
|
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-20251108-514b3f69e"
|
|
123
123
|
},
|
|
124
124
|
"description": "Smoke CO Alarm Example",
|
|
125
125
|
"entrypoint": "SmokeCOAlarmDeviceNode.ts"
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
{
|
|
128
128
|
"name": "mqtt-device",
|
|
129
129
|
"dependencies": {
|
|
130
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
130
|
+
"@matter/main": "~0.16.0-alpha.0-20251108-514b3f69e"
|
|
131
131
|
},
|
|
132
132
|
"description": "Example device with MQTT control enabled",
|
|
133
133
|
"entrypoint": "MqttDevice.ts"
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
{
|
|
136
136
|
"name": "web-socket-device",
|
|
137
137
|
"dependencies": {
|
|
138
|
-
"@matter/main": "~0.16.0-alpha.0-
|
|
138
|
+
"@matter/main": "~0.16.0-alpha.0-20251108-514b3f69e"
|
|
139
139
|
},
|
|
140
140
|
"description": "Example device with WebSocket control enabled",
|
|
141
141
|
"entrypoint": "WebSocketDevice.ts"
|
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-20251108-514b3f69e",
|
|
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-20251108-514b3f69e",
|
|
36
36
|
"@types/node": "^24.10.0",
|
|
37
37
|
"@types/tar-stream": "^3.1.4"
|
|
38
38
|
},
|