Skip to content

Commit

Permalink
Set valid device types for application endpoints
Browse files Browse the repository at this point in the history
Several samples are using the root node device type for application
endpoints. This prevents proper identification of the device. Add
types to all non-root endpoints in examples/.

all-clusters-app does not correspond well with any single device type.
This sets it to on/off light. It may be useful to reorganize this
sample into additional endpoints each with a coherent device type.

Multiple root nodes is not compliant. From the spec, "Endpoint
Composition" section: There SHALL be only one root node endpoint for the
node.
  • Loading branch information
mspang committed Jan 18, 2022
1 parent 78a6636 commit 48a7eab
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1809,7 +1809,7 @@ server cluster NetworkCommissioning = 49 {
attribute(readonly) octet_string lastNetworkID = 6;
attribute(readonly) int32u lastConnectErrorValue = 7;
attribute(readonly) bitmap32 featureMap = 65532;
attribute(readonly) int16u clusterRevision = 65533;
attribute(readonly) int17u clusterRevision = 65533;

request struct AddOrUpdateThreadNetworkRequest {
OCTET_STRING operationalDataset = 0;
Expand Down
20 changes: 10 additions & 10 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -7204,9 +7204,9 @@
]
},
{
"name": "MA-rootdevice",
"deviceTypeName": "MA-rootdevice",
"deviceTypeCode": 22,
"name": "MA-onofflight",
"deviceTypeName": "MA-onofflight",
"deviceTypeCode": 256,
"deviceTypeProfileId": 259,
"clusters": [
{
Expand Down Expand Up @@ -17119,9 +17119,9 @@
]
},
{
"name": "MA-rootdevice",
"deviceTypeName": "MA-rootdevice",
"deviceTypeCode": 22,
"name": "MA-onofflight",
"deviceTypeName": "MA-onofflight",
"deviceTypeCode": 256,
"deviceTypeProfileId": 259,
"clusters": [
{
Expand Down Expand Up @@ -20121,22 +20121,22 @@
"deviceIdentifier": 22
},
{
"endpointTypeName": "MA-rootdevice",
"endpointTypeName": "MA-onofflight",
"endpointTypeIndex": 1,
"profileId": 259,
"endpointId": 1,
"networkId": 0,
"endpointVersion": 1,
"deviceIdentifier": 22
"deviceIdentifier": 256
},
{
"endpointTypeName": "MA-rootdevice",
"endpointTypeName": "MA-onofflight",
"endpointTypeIndex": 2,
"profileId": 259,
"endpointId": 2,
"networkId": 0,
"endpointVersion": 1,
"deviceIdentifier": 22
"deviceIdentifier": 256
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2471,10 +2471,10 @@
]
},
{
"name": "MA-rootdevice",
"deviceTypeName": "MA-rootdevice",
"name": "MA-tempsensor",
"deviceTypeName": "MA-tempsensor",
"deviceTypeCode": 22,
"deviceTypeProfileId": 259,
"deviceTypeProfileId": 770,
"clusters": [
{
"name": "Power Configuration",
Expand Down Expand Up @@ -3400,13 +3400,13 @@
"deviceIdentifier": 22
},
{
"endpointTypeName": "MA-rootdevice",
"endpointTypeName": "MA-tempsensor",
"endpointTypeIndex": 1,
"profileId": 259,
"endpointId": 1,
"networkId": 0,
"endpointVersion": 1,
"deviceIdentifier": 22
"deviceIdentifier": 770
}
]
}
}
20 changes: 10 additions & 10 deletions examples/tv-casting-app/tv-casting-common/tv-casting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6536,9 +6536,9 @@
]
},
{
"name": "MA-rootdevice",
"deviceTypeName": "MA-rootdevice",
"deviceTypeCode": 22,
"name": "MA-videoplayer",
"deviceTypeName": "MA-videoplayer",
"deviceTypeCode": 35,
"deviceTypeProfileId": 259,
"clusters": [
{
Expand Down Expand Up @@ -13559,9 +13559,9 @@
]
},
{
"name": "Anonymous Endpoint Type",
"deviceTypeName": "MA-rootdevice",
"deviceTypeCode": 22,
"name": "MA-occupancysensor",
"deviceTypeName": "MA-occupancysensor",
"deviceTypeCode": 263,
"deviceTypeProfileId": 259,
"clusters": [
{
Expand Down Expand Up @@ -16486,22 +16486,22 @@
"deviceIdentifier": 22
},
{
"endpointTypeName": "MA-rootdevice",
"endpointTypeName": "MA-videoplayer",
"endpointTypeIndex": 1,
"profileId": 259,
"endpointId": 1,
"networkId": 0,
"endpointVersion": 1,
"deviceIdentifier": 22
"deviceIdentifier": 35
},
{
"endpointTypeName": "Anonymous Endpoint Type",
"endpointTypeName": "MA-occupancysensor",
"endpointTypeIndex": 2,
"profileId": 259,
"endpointId": 2,
"networkId": 0,
"endpointVersion": 1,
"deviceIdentifier": 22
"deviceIdentifier": 263
}
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48a7eab

Please sign in to comment.