diff --git a/src/zspec/zcl/definition/cluster.ts b/src/zspec/zcl/definition/cluster.ts index dc5cec0919..e26b33b3f6 100644 --- a/src/zspec/zcl/definition/cluster.ts +++ b/src/zspec/zcl/definition/cluster.ts @@ -2113,11 +2113,6 @@ export const Clusters: Readonly> parameters: [ ], }, - boschCalibrateValve: { - ID: 0x41, - parameters: [ - ], - }, }, commandsResponse: { getWeeklyScheduleRsp: { @@ -2662,16 +2657,6 @@ export const Clusters: Readonly> parameters: [ ], }, - boschTestTamper: { - ID: 0xF3, - parameters: [ - {name: 'data', type: DataType.UINT8}, - ], - }, - boschSmokeDetectorSiren: { - ID: 0x80, - parameters: [{name: "data", type: DataType.UINT16}], - }, }, commandsResponse: { statusChangeNotification: { @@ -2870,12 +2855,6 @@ export const Clusters: Readonly> {name: 'squawkinfo', type: DataType.UINT8}, ], }, - boschOutdoorSiren: { - ID: 240, - parameters: [ - {name: 'data', type: DataType.UINT8}, - ], - }, }, commandsResponse: { }, @@ -5283,126 +5262,6 @@ export const Clusters: Readonly> commandsResponse: { }, }, - manuSpecificBosch: { - ID: 0xe000, - manufacturerCode: ManufacturerCode.ROBERT_BOSCH_GMBH, - attributes: { - sensitivity: {ID: 0x4003, type: DataType.UINT16}, - }, - commands: { - initiateTestMode: { - ID: 0x00, - parameters: [], - }, - }, - commandsResponse: {}, - }, - manuSpecificBosch3: { - ID: 0xe002, - manufacturerCode: ManufacturerCode.ROBERT_BOSCH_GMBH, - attributes: { - humidity : {ID: 0x4000, type: DataType.UINT16}, - unknown1 : {ID: 0x4001, type: DataType.UINT16}, - unknown2 : {ID: 0x4002, type: DataType.UINT16}, - airpurity : {ID: 0x4003, type: DataType.UINT16}, - temperature : {ID: 0x4004, type: DataType.INT16}, - illuminance_lux: {ID: 0x4005, type: DataType.UINT16}, - battery : {ID: 0x4006, type: DataType.UINT16}, - unknown3 : {ID: 0x4007, type: DataType.UINT16}, - unknown4 : {ID: 0x4008, type: DataType.UINT16}, - pressure : {ID: 0x4009, type: DataType.UINT16}, // Not yet confirmed - unknown6 : {ID: 0x400a, type: DataType.UINT16}, - unknown7 : {ID: 0x400b, type: DataType.UINT16}, - unknown8 : {ID: 0x400c, type: DataType.UINT16}, - }, - commands: {}, - commandsResponse: {}, - }, - manuSpecificBosch5: { - ID: 0xe004, - manufacturerCode: ManufacturerCode.ROBERT_BOSCH_GMBH, - attributes: { - unknown_attribute: {ID: 0x4000, type: DataType.BITMAP8}, // 0,1 ??? read during pairing - pre_alarm: {ID: 0x4001, type: DataType.BITMAP8}, // 0,1 on/off - }, - commands: {}, - commandsResponse: {}, - }, - manuSpecificBosch7: { - ID: 0xe006, - manufacturerCode: ManufacturerCode.ROBERT_BOSCH_GMBH, - attributes: { - unknown1: {ID: 0x5003, type: DataType.INT8}, // perhaps signal strength? -7? - unknown2: {ID: 0x5004, type: DataType.UINT8}, // ???? - heartbeat: {ID: 0x5005, type: DataType.BITMAP8}, // 0,1 on/off - }, - commands: { - pairingCompleted: { - ID: 0x01, - parameters: [], - }, - }, - commandsResponse: {}, - }, - manuSpecificBosch8: { - ID: 0xe007, - manufacturerCode: ManufacturerCode.ROBERT_BOSCH_GMBH, - attributes: { - alarm_status: {ID: 0x5000, type: DataType.BITMAP32}, - }, - commands: { /////////// VALIDATED //////////// - burglarAlarm: { - ID: 0x01, - parameters: [ - {name: 'data', type: DataType.UINT8}, // data:1 trips the siren data:0 should stop the siren - ], - }, - }, - commandsResponse: {}, - }, - manuSpecificBosch9: { - ID: 0xfca1, - manufacturerCode: ManufacturerCode.ROBERT_BOSCH_GMBH, - attributes: {}, - commands: { - confirmButtonPressed: { - ID: 0x0010, - parameters: [ - {name: 'data', type: BuffaloZclDataType.BUFFER}, - ], - }, - pairingCompleted: { - ID: 0x0012, - parameters: [ - {name: 'data', type: BuffaloZclDataType.BUFFER}, - ], - }, - }, - commandsResponse: {}, - }, - manuSpecificBosch10: { - ID: 0xfca0, - manufacturerCode: ManufacturerCode.ROBERT_BOSCH_GMBH, - attributes: { - deviceMode: {ID: 0x0000, type: DataType.ENUM8}, - switchType: {ID: 0x0001, type: DataType.ENUM8}, - calibrationOpeningTime: {ID: 0x0002, type: DataType.UINT32}, - calibrationClosingTime: {ID: 0x0003, type: DataType.UINT32}, - childLock: {ID: 0x0008, type: DataType.BOOLEAN}, - motorState: {ID: 0x0013, type: DataType.ENUM8}, - }, - commands: {}, - commandsResponse: {}, - }, - manuSpecificBosch11: { - ID: 0xfcac, - manufacturerCode: ManufacturerCode.ROBERT_BOSCH_GMBH, - attributes: { - alarmOnMotion: {ID: 0x0003, type: DataType.BOOLEAN}, - }, - commands: {}, - commandsResponse: {}, - }, manuSpecificAssaDoorLock: { ID: 0xFC00, attributes: { diff --git a/src/zspec/zcl/definition/tstype.ts b/src/zspec/zcl/definition/tstype.ts index 2fe5242530..c454290e85 100644 --- a/src/zspec/zcl/definition/tstype.ts +++ b/src/zspec/zcl/definition/tstype.ts @@ -128,7 +128,6 @@ export type ClusterName = ( 'tradfriButton' | 'heimanSpecificInfraRedRemote' | 'develcoSpecificAirQuality' | 'schneiderSpecificPilotMode' | 'elkoOccupancySettingClusterServer' | 'elkoSwitchConfigurationClusterServer' | 'manuSpecificSchneiderLightSwitchConfiguration' | 'manuSpecificSchneiderFanSwitchConfiguration' | 'sprutDevice' | 'sprutVoc' | 'sprutNoise' | 'sprutIrBlaster' | 'manuSpecificSiglisZigfred' | - 'manuSpecificInovelli' | 'owonClearMetering' | 'zosungIRTransmit' | 'zosungIRControl' | 'manuSpecificBosch' | 'manuSpecificBosch3' | - 'manuSpecificBosch5' | 'manuSpecificBosch7' | 'manuSpecificBosch8' | 'manuSpecificBosch9' | 'manuSpecificBosch10' | 'manuSpecificBosch11' | + 'manuSpecificInovelli' | 'owonClearMetering' | 'zosungIRTransmit' | 'zosungIRControl' | 'manuSpecificAssaDoorLock' | 'manuSpecificDoorman' | 'manuSpecificNodOnPilotWire' | 'manuSpecificProfalux1' | 'manuSpecificAmazonWWAH' -); \ No newline at end of file +); diff --git a/test/controller.test.ts b/test/controller.test.ts index b392d71389..e337b8dbed 100755 --- a/test/controller.test.ts +++ b/test/controller.test.ts @@ -1320,13 +1320,13 @@ describe('Controller', () => { expect(write[0]).toBe('0x170'); expect(write[1]).toBe(170); expect(write[2]).toBe(1); - expect(deepClone(write[3])).toStrictEqual({"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":true,"manufacturerSpecific":false},"transactionSequenceNumber":12,"manufacturerCode":null,"commandIdentifier":2},"payload":[{"attrId":16,"attrData":"0x0000012300000000","dataType":240}],"cluster":{"ID":1280,"attributes":{"zoneState":{"ID":0,"type":48,"name":"zoneState"},"zoneType":{"ID":1,"type":49,"name":"zoneType"},"zoneStatus":{"ID":2,"type":25,"name":"zoneStatus"},"iasCieAddr":{"ID":16,"type":240,"name":"iasCieAddr"},"zoneId":{"ID":17,"type":32,"name":"zoneId"},"numZoneSensitivityLevelsSupported":{"ID":18,"type":32,"name":"numZoneSensitivityLevelsSupported"},"currentZoneSensitivityLevel":{"ID":19,"type":32,"name":"currentZoneSensitivityLevel"},"develcoAlarmOffDelay":{"ID":32769,"type":33,"manufacturerCode":4117,"name":"develcoAlarmOffDelay"}},"name":"ssIasZone","commands":{"enrollRsp":{"ID":0,"parameters":[{"name":"enrollrspcode","type":32},{"name":"zoneid","type":32}],"name":"enrollRsp"},"initNormalOpMode":{"ID":1,"parameters":[],"name":"initNormalOpMode"},"initTestMode":{"ID":2,"parameters":[],"name":"initTestMode"},"boschTestTamper":{"ID":243,"parameters":[{"name":"data","type":32}],"name":"boschTestTamper"},"boschSmokeDetectorSiren":{"ID":128,"parameters":[{"name":"data","type":33}],"name":"boschSmokeDetectorSiren"}},"commandsResponse":{"statusChangeNotification":{"ID":0,"parameters":[{"name":"zonestatus","type":33},{"name":"extendedstatus","type":32}],"name":"statusChangeNotification"},"enrollReq":{"ID":1,"parameters":[{"name":"zonetype","type":33},{"name":"manucode","type":33}],"name":"enrollReq"}}},"command":{"ID":2,"name":"write","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}],"response":4}}); + expect(deepClone(write[3])).toStrictEqual({"header":{"frameControl":{"reservedBits":0,"frameType":0,"direction":0,"disableDefaultResponse":true,"manufacturerSpecific":false},"transactionSequenceNumber":12,"manufacturerCode":null,"commandIdentifier":2},"payload":[{"attrId":16,"attrData":"0x0000012300000000","dataType":240}],"cluster":{"ID":1280,"attributes":{"zoneState":{"ID":0,"type":48,"name":"zoneState"},"zoneType":{"ID":1,"type":49,"name":"zoneType"},"zoneStatus":{"ID":2,"type":25,"name":"zoneStatus"},"iasCieAddr":{"ID":16,"type":240,"name":"iasCieAddr"},"zoneId":{"ID":17,"type":32,"name":"zoneId"},"numZoneSensitivityLevelsSupported":{"ID":18,"type":32,"name":"numZoneSensitivityLevelsSupported"},"currentZoneSensitivityLevel":{"ID":19,"type":32,"name":"currentZoneSensitivityLevel"},"develcoAlarmOffDelay":{"ID":32769,"type":33,"manufacturerCode":4117,"name":"develcoAlarmOffDelay"}},"name":"ssIasZone","commands":{"enrollRsp":{"ID":0,"parameters":[{"name":"enrollrspcode","type":32},{"name":"zoneid","type":32}],"name":"enrollRsp"},"initNormalOpMode":{"ID":1,"parameters":[],"name":"initNormalOpMode"},"initTestMode":{"ID":2,"parameters":[],"name":"initTestMode"}},"commandsResponse":{"statusChangeNotification":{"ID":0,"parameters":[{"name":"zonestatus","type":33},{"name":"extendedstatus","type":32}],"name":"statusChangeNotification"},"enrollReq":{"ID":1,"parameters":[{"name":"zonetype","type":33},{"name":"manucode","type":33}],"name":"enrollReq"}}},"command":{"ID":2,"name":"write","parameters":[{"name":"attrId","type":33},{"name":"dataType","type":32},{"name":"attrData","type":1000}],"response":4}}); const enrollRsp = mocksendZclFrameToEndpoint.mock.calls[11]; expect(enrollRsp[0]).toBe('0x170'); expect(enrollRsp[1]).toBe(170); expect(enrollRsp[2]).toBe(1); - expect(deepClone(enrollRsp[3])).toStrictEqual({"header":{"frameControl":{"reservedBits":0,"frameType":1,"direction":0,"disableDefaultResponse":true,"manufacturerSpecific":false},"transactionSequenceNumber":13,"manufacturerCode":null,"commandIdentifier":0},"payload":{"enrollrspcode":0,"zoneid":23},"cluster":{"ID":1280,"attributes":{"zoneState":{"ID":0,"type":48,"name":"zoneState"},"zoneType":{"ID":1,"type":49,"name":"zoneType"},"zoneStatus":{"ID":2,"type":25,"name":"zoneStatus"},"iasCieAddr":{"ID":16,"type":240,"name":"iasCieAddr"},"zoneId":{"ID":17,"type":32,"name":"zoneId"},"numZoneSensitivityLevelsSupported":{"ID":18,"type":32,"name":"numZoneSensitivityLevelsSupported"},"currentZoneSensitivityLevel":{"ID":19,"type":32,"name":"currentZoneSensitivityLevel"},"develcoAlarmOffDelay":{"ID":32769,"type":33,"manufacturerCode":4117,"name":"develcoAlarmOffDelay"}},"name":"ssIasZone","commands":{"enrollRsp":{"ID":0,"parameters":[{"name":"enrollrspcode","type":32},{"name":"zoneid","type":32}],"name":"enrollRsp"},"initNormalOpMode":{"ID":1,"parameters":[],"name":"initNormalOpMode"},"initTestMode":{"ID":2,"parameters":[],"name":"initTestMode"},"boschTestTamper":{"ID":243,"parameters":[{"name":"data","type":32}],"name":"boschTestTamper"},"boschSmokeDetectorSiren":{"ID":128,"parameters":[{"name":"data","type":33}],"name":"boschSmokeDetectorSiren"}},"commandsResponse":{"statusChangeNotification":{"ID":0,"parameters":[{"name":"zonestatus","type":33},{"name":"extendedstatus","type":32}],"name":"statusChangeNotification"},"enrollReq":{"ID":1,"parameters":[{"name":"zonetype","type":33},{"name":"manucode","type":33}],"name":"enrollReq"}}},"command":{"ID":0,"parameters":[{"name":"enrollrspcode","type":32},{"name":"zoneid","type":32}],"name":"enrollRsp"}}); + expect(deepClone(enrollRsp[3])).toStrictEqual({"header":{"frameControl":{"reservedBits":0,"frameType":1,"direction":0,"disableDefaultResponse":true,"manufacturerSpecific":false},"transactionSequenceNumber":13,"manufacturerCode":null,"commandIdentifier":0},"payload":{"enrollrspcode":0,"zoneid":23},"cluster":{"ID":1280,"attributes":{"zoneState":{"ID":0,"type":48,"name":"zoneState"},"zoneType":{"ID":1,"type":49,"name":"zoneType"},"zoneStatus":{"ID":2,"type":25,"name":"zoneStatus"},"iasCieAddr":{"ID":16,"type":240,"name":"iasCieAddr"},"zoneId":{"ID":17,"type":32,"name":"zoneId"},"numZoneSensitivityLevelsSupported":{"ID":18,"type":32,"name":"numZoneSensitivityLevelsSupported"},"currentZoneSensitivityLevel":{"ID":19,"type":32,"name":"currentZoneSensitivityLevel"},"develcoAlarmOffDelay":{"ID":32769,"type":33,"manufacturerCode":4117,"name":"develcoAlarmOffDelay"}},"name":"ssIasZone","commands":{"enrollRsp":{"ID":0,"parameters":[{"name":"enrollrspcode","type":32},{"name":"zoneid","type":32}],"name":"enrollRsp"},"initNormalOpMode":{"ID":1,"parameters":[],"name":"initNormalOpMode"},"initTestMode":{"ID":2,"parameters":[],"name":"initTestMode"}},"commandsResponse":{"statusChangeNotification":{"ID":0,"parameters":[{"name":"zonestatus","type":33},{"name":"extendedstatus","type":32}],"name":"statusChangeNotification"},"enrollReq":{"ID":1,"parameters":[{"name":"zonetype","type":33},{"name":"manucode","type":33}],"name":"enrollReq"}}},"command":{"ID":0,"parameters":[{"name":"enrollrspcode","type":32},{"name":"zoneid","type":32}],"name":"enrollRsp"}}); }); it('Device joins and interview iAs enrollment fails', async () => { @@ -2502,7 +2502,7 @@ describe('Controller', () => { await controller.start(); await mockAdapterEvents['deviceJoined']({networkAddress: 129, ieeeAddr: '0x129'}); const device = controller.getDeviceByIeeeAddr('0x129'); - device.getEndpoint(1).zclCommandBroadcast(255, BroadcastAddress.SLEEPY, Zcl.Clusters.ssIasZone.ID, 'boschSmokeDetectorSiren', {data: 0x0000}); + device.getEndpoint(1).zclCommandBroadcast(255, BroadcastAddress.SLEEPY, Zcl.Clusters.ssIasZone.ID, 'initTestMode', {}); const sentFrame = mockZclFrame.create( Zcl.FrameType.SPECIFIC, Zcl.Direction.CLIENT_TO_SERVER, @@ -2510,9 +2510,9 @@ describe('Controller', () => { null, // @ts-expect-error private ZclTransactionSequenceNumber.number, - 'boschSmokeDetectorSiren', + 'initTestMode', Zcl.Clusters.ssIasZone.ID, - {data: 0x0000}, + {}, device.customClusters ); expect(mocksendZclFrameToAll.mock.calls[0][0]).toBe(255); @@ -2526,8 +2526,9 @@ describe('Controller', () => { await controller.start(); await mockAdapterEvents['deviceJoined']({networkAddress: 129, ieeeAddr: '0x129'}); const device = controller.getDeviceByIeeeAddr('0x129'); + device.addCustomCluster('ssIasZone', {ID: Zcl.Clusters.ssIasZone.ID, commands: {boschSmokeAlarmSiren: {ID: 0x80, parameters: [{name: 'data', type: Zcl.DataType.UINT16}]}}, commandsResponse: {}, attributes: {}}); const options = {manufacturerCode: Zcl.ManufacturerCode.ROBERT_BOSCH_GMBH}; - device.getEndpoint(1).zclCommandBroadcast(255, BroadcastAddress.SLEEPY, Zcl.Clusters.ssIasZone.ID, 'boschSmokeDetectorSiren', {data: 0x0000}, options); + device.getEndpoint(1).zclCommandBroadcast(255, BroadcastAddress.SLEEPY, Zcl.Clusters.ssIasZone.ID, 'boschSmokeAlarmSiren', {data: 0x0000}, options); const sentFrame = mockZclFrame.create( Zcl.FrameType.SPECIFIC, Zcl.Direction.CLIENT_TO_SERVER, @@ -2535,7 +2536,7 @@ describe('Controller', () => { Zcl.ManufacturerCode.ROBERT_BOSCH_GMBH, // @ts-expect-error private ZclTransactionSequenceNumber.number, - 'boschSmokeDetectorSiren', + 'boschSmokeAlarmSiren', Zcl.Clusters.ssIasZone.ID, {data: 0x0000}, device.customClusters diff --git a/test/zspec/zcl/utils.test.ts b/test/zspec/zcl/utils.test.ts index f72c3cc7b7..7843797d0f 100644 --- a/test/zspec/zcl/utils.test.ts +++ b/test/zspec/zcl/utils.test.ts @@ -5,7 +5,7 @@ const CUSTOM_CLUSTERS: CustomClusters = { genBasic: {ID: Zcl.Clusters.genBasic.ID, commands: {}, commandsResponse: {}, attributes: {myCustomAttr: {ID: 65533, type: Zcl.DataType.UINT8}}}, myCustomCluster: {ID: 65534, commands: {}, commandsResponse: {}, attributes: {myCustomAttr: {ID: 65533, type: Zcl.DataType.UINT8}}}, myCustomClusterManuf: {ID: 65533, manufacturerCode: 65534, commands: {}, commandsResponse: {}, attributes: {myCustomAttr: {ID: 65533, type: Zcl.DataType.UINT8}}}, - manuSpecificBosch10NoManuf: {ID: Zcl.Clusters.manuSpecificBosch10.ID, commands: {}, commandsResponse: {}, attributes: {myCustomAttr: {ID: 65533, type: Zcl.DataType.UINT8}}} + manuSpecificProfalux1NoManuf: {ID: Zcl.Clusters.manuSpecificProfalux1.ID, commands: {}, commandsResponse: {}, attributes: {myCustomAttr: {ID: 65533, type: Zcl.DataType.UINT8}}} }; describe('ZCL Utils', () => { @@ -85,12 +85,12 @@ describe('ZCL Utils', () => { {cluster: CUSTOM_CLUSTERS.genBasic, name: 'genBasic'}, ], [ - 'by ID ignoring same custom ID if Zcl is better match with manufacture code', + 'by ID ignoring same custom ID if Zcl is better match with manufacturer code', { - key: CUSTOM_CLUSTERS.manuSpecificBosch10NoManuf.ID, manufacturerCode: Zcl.ManufacturerCode.ROBERT_BOSCH_GMBH, + key: CUSTOM_CLUSTERS.manuSpecificProfalux1NoManuf.ID, manufacturerCode: Zcl.ManufacturerCode.PROFALUX, customClusters: CUSTOM_CLUSTERS }, - {cluster: Zcl.Clusters.manuSpecificBosch10, name: 'manuSpecificBosch10'}, + {cluster: Zcl.Clusters.manuSpecificProfalux1, name: 'manuSpecificProfalux1'}, ], ])('Gets cluster %s', (_name, payload, expected) => { const cluster = Zcl.Utils.getCluster(payload.key, payload.manufacturerCode, payload.customClusters);