@matter/model 0.14.0-alpha.0-20250527-b2a4cc12b → 0.14.0-alpha.0-20250528-d6d12ae65
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/README.md +16 -16
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -65,27 +65,27 @@ for (const attribute of OnOffCluster.attributes) {
|
|
|
65
65
|
|
|
66
66
|
The base model includes [global datatypes](src/models/Globals.ts) defined by the Matter specification. We generate other
|
|
67
67
|
elements of the [standard model](src/standard/MatterDefinition.ts) by merging models in the
|
|
68
|
-
[top-level models package](../../models/README.md).
|
|
68
|
+
[top-level models package](../../support/models/README.md).
|
|
69
69
|
|
|
70
70
|
To recreate the standard model files:
|
|
71
71
|
|
|
72
72
|
```sh
|
|
73
|
-
cd matter.js/codegen
|
|
73
|
+
cd matter.js/support/codegen
|
|
74
74
|
npm run generate-model
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
### Spec data model
|
|
78
78
|
|
|
79
|
-
Input model _[spec.ts](../../models/src/v1.
|
|
79
|
+
Input model _[spec.ts](../../support/models/src/v1.4.1/spec.ts)_ is the data model defined by the Matter specification.
|
|
80
80
|
|
|
81
|
-
We generate [spec.ts](../../models/src/v1.
|
|
81
|
+
We generate [spec.ts](../../support/models/src/v1.4.1/spec.ts) from the Matter specification documents. This ensures our
|
|
82
82
|
definitions align with the specification and gives us detailed information unavailable elsewhere.
|
|
83
83
|
|
|
84
|
-
The spec generator is [generate-spec.ts](../../codegen/src/generate-spec.ts).
|
|
84
|
+
The spec generator is [generate-spec.ts](../../support/codegen/src/generate-spec.ts).
|
|
85
85
|
To run:
|
|
86
86
|
|
|
87
87
|
```sh
|
|
88
|
-
cd matter.js/codegen
|
|
88
|
+
cd matter.js/support/codegen
|
|
89
89
|
npm run generate-spec
|
|
90
90
|
```
|
|
91
91
|
|
|
@@ -95,23 +95,23 @@ conformance, constraints, etc.
|
|
|
95
95
|
|
|
96
96
|
### Local data model
|
|
97
97
|
|
|
98
|
-
Input model _[local.ts](../../models/src/local.ts)_ defines elements that are unavailable (or incorrect) in the
|
|
98
|
+
Input model _[local.ts](../../support/models/src/local.ts)_ defines elements that are unavailable (or incorrect) in the
|
|
99
99
|
other models. This partial model is the result of editorial decisions by matter.js contributors.
|
|
100
100
|
|
|
101
101
|
### CHIP data model
|
|
102
102
|
|
|
103
|
-
Model [chip.ts](../../models/src/v1.1/chip.ts) is the CHIP data model. _CHIP_ is [Project CHIP's connectedhomeip
|
|
103
|
+
Model [chip.ts](../../support/models/src/v1.1/chip.ts) is the CHIP data model. _CHIP_ is [Project CHIP's connectedhomeip
|
|
104
104
|
repository](https://github.com/project-chip/connectedhomeip/). Originally this was the most robust
|
|
105
105
|
open-source programmatic definition of Matter elements.
|
|
106
106
|
|
|
107
|
-
We generate [chip.ts](../../models/src/v1.1/chip.ts) from
|
|
107
|
+
We generate [chip.ts](../../support/models/src/v1.1/chip.ts) from
|
|
108
108
|
[CHIP definitions](https://github.com/project-chip/connectedhomeip/tree/master/src/app/zap-templates/zcl/data-model). This
|
|
109
109
|
ensures our definitions align with CHIP's.
|
|
110
110
|
|
|
111
|
-
The CHIP generator is [generate-chip](../../codegen/src/generate-chip.ts). To run:
|
|
111
|
+
The CHIP generator is [generate-chip](../../support/codegen/src/generate-chip.ts). To run:
|
|
112
112
|
|
|
113
113
|
```sh
|
|
114
|
-
cd matter.js/codegen
|
|
114
|
+
cd matter.js/support/codegen
|
|
115
115
|
npm run generate-chip
|
|
116
116
|
```
|
|
117
117
|
We still include the CHIP generator and model in our repository but no longer use it as input for the matter.js model.
|
|
@@ -121,13 +121,13 @@ We still include the CHIP generator and model in our repository but no longer us
|
|
|
121
121
|
Unlike above data models, the _standard data model_ in [src/model/standard](./src/standard) is part of the matter.js public
|
|
122
122
|
API. This represents our best attempt at a complete Matter data model.
|
|
123
123
|
|
|
124
|
-
[generate-model.ts](../../codegen/src/generate-model.ts) creates this model by analyzing and combining elements from
|
|
124
|
+
[generate-model.ts](../../support/codegen/src/generate-model.ts) creates this model by analyzing and combining elements from
|
|
125
125
|
the models above.
|
|
126
126
|
|
|
127
127
|
To update the standard model:
|
|
128
128
|
|
|
129
129
|
```sh
|
|
130
|
-
cd matter.js/codegen
|
|
130
|
+
cd matter.js/support/codegen
|
|
131
131
|
npm run generate-model
|
|
132
132
|
```
|
|
133
133
|
|
|
@@ -136,11 +136,11 @@ npm run generate-model
|
|
|
136
136
|
One of the ways we use the Matter Object Model is to generate cluster
|
|
137
137
|
implementations.
|
|
138
138
|
|
|
139
|
-
The cluster generator is [generate-cluster.ts](../../codegen/src/generate-clusters.ts).
|
|
139
|
+
The cluster generator is [generate-cluster.ts](../../support/codegen/src/generate-clusters.ts).
|
|
140
140
|
To run:
|
|
141
141
|
|
|
142
142
|
```sh
|
|
143
|
-
cd matter.js/codegen
|
|
143
|
+
cd matter.js/support/codegen
|
|
144
144
|
npm run generate
|
|
145
145
|
```
|
|
146
146
|
|
|
@@ -148,7 +148,7 @@ Note that this will rebuild the model (above) and the clusters. If you know the
|
|
|
148
148
|
generate the clusters:
|
|
149
149
|
|
|
150
150
|
```sh
|
|
151
|
-
cd matter.js/codegen
|
|
151
|
+
cd matter.js/support/codegen
|
|
152
152
|
npm run generate-clusters
|
|
153
153
|
```
|
|
154
154
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/model",
|
|
3
|
-
"version": "0.14.0-alpha.0-
|
|
3
|
+
"version": "0.14.0-alpha.0-20250528-d6d12ae65",
|
|
4
4
|
"description": "Matter data model",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iot",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"embed-examples": "embedme **/README.md"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@matter/general": "0.14.0-alpha.0-
|
|
36
|
+
"@matter/general": "0.14.0-alpha.0-20250528-d6d12ae65"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@matter/testing": "0.14.0-alpha.0-
|
|
40
|
-
"@matter/tools": "0.14.0-alpha.0-
|
|
39
|
+
"@matter/testing": "0.14.0-alpha.0-20250528-d6d12ae65",
|
|
40
|
+
"@matter/tools": "0.14.0-alpha.0-20250528-d6d12ae65"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"dist/**/*",
|