Skip to content

Commit

Permalink
lighting-app: Remove OccupancySensing Server
Browse files Browse the repository at this point in the history
This change removes the OccupancySensing server from this app as this is
against the spec and causes test_TC_IDM_10_1 to fail.

With this change, now TC_DeviceBasicComposition.py passes for this
example app.
  • Loading branch information
soares-sergio committed Oct 3, 2024
1 parent d404400 commit 26ecaf5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 169 deletions.
72 changes: 0 additions & 72 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2569,70 +2569,6 @@ cluster ColorControl = 768 {
command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76;
}

/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */
cluster OccupancySensing = 1030 {
revision 5;

enum OccupancySensorTypeEnum : enum8 {
kPIR = 0;
kUltrasonic = 1;
kPIRAndUltrasonic = 2;
kPhysicalContact = 3;
}

bitmap Feature : bitmap32 {
kOther = 0x1;
kPassiveInfrared = 0x2;
kUltrasonic = 0x4;
kPhysicalContact = 0x8;
kActiveInfrared = 0x10;
kRadar = 0x20;
kRFSensing = 0x40;
kVision = 0x80;
}

bitmap OccupancyBitmap : bitmap8 {
kOccupied = 0x1;
}

bitmap OccupancySensorTypeBitmap : bitmap8 {
kPIR = 0x1;
kUltrasonic = 0x2;
kPhysicalContact = 0x4;
}

struct HoldTimeLimitsStruct {
int16u holdTimeMin = 0;
int16u holdTimeMax = 1;
int16u holdTimeDefault = 2;
}

info event OccupancyChanged = 0 {
OccupancyBitmap occupancy = 0;
}

readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
attribute access(write: manage) optional int16u holdTime = 3;
readonly attribute optional HoldTimeLimitsStruct holdTimeLimits = 4;
attribute access(write: manage) optional int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) optional int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) optional int8u PIRUnoccupiedToOccupiedThreshold = 18;
attribute access(write: manage) optional int16u ultrasonicOccupiedToUnoccupiedDelay = 32;
attribute access(write: manage) optional int16u ultrasonicUnoccupiedToOccupiedDelay = 33;
attribute access(write: manage) optional int8u ultrasonicUnoccupiedToOccupiedThreshold = 34;
attribute access(write: manage) optional int16u physicalContactOccupiedToUnoccupiedDelay = 48;
attribute access(write: manage) optional int16u physicalContactUnoccupiedToOccupiedDelay = 49;
attribute access(write: manage) optional int8u physicalContactUnoccupiedToOccupiedThreshold = 50;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

endpoint 0 {
device type ma_rootdevice = 22, version 1;

Expand Down Expand Up @@ -3120,14 +3056,6 @@ endpoint 1 {
handle command MoveColorTemperature;
handle command StepColorTemperature;
}

server cluster OccupancySensing {
ram attribute occupancy;
ram attribute occupancySensorType;
ram attribute occupancySensorTypeBitmap;
callback attribute featureMap;
ram attribute clusterRevision default = 5;
}
}


104 changes: 7 additions & 97 deletions examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data"
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"path": "../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"category": "matter",
"version": "chip-v1"
"version": 1,
"description": "Matter SDK ZCL data"
}
],
"endpointTypes": [
Expand Down Expand Up @@ -5638,96 +5638,6 @@
"reportableChange": 0
}
]
},
{
"name": "Occupancy Sensing",
"code": 1030,
"mfgCode": null,
"define": "OCCUPANCY_SENSING_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
{
"name": "Occupancy",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "OccupancyBitmap",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "OccupancySensorType",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "OccupancySensorTypeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "OccupancySensorTypeBitmap",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "OccupancySensorTypeBitmap",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "5",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
}
]
}
Expand Down

0 comments on commit 26ecaf5

Please sign in to comment.