Skip to content

Commit

Permalink
fix: Fix typo, change to commission (#793)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rotzbua authored Nov 6, 2023
1 parent cb252c1 commit e423928
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/api/modules/_src_controller_events_.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

### MessagePayloadType

Ƭ **MessagePayloadType**: \"attributeReport\" \| \"readResponse\" \| \"raw\" \| \"read\" \| \"write\" \| \"commandOn\" \| \"commandOffWithEffect\" \| \"commandStep\" \| \"commandStop\" \| \"commandHueNotification\" \| \"commandOff\" \| \"commandStepColorTemp\" \| \"commandMoveWithOnOff\" \| \"commandMove\" \| \"commandMoveHue\" \| \"commandMoveToSaturation\" \| \"commandStopWithOnOff\" \| \"commandMoveToLevelWithOnOff\" \| \"commandToggle\" \| \"commandTradfriArrowSingle\" \| \"commandTradfriArrowHold\" \| \"commandTradfriArrowRelease\" \| \"commandStepWithOnOff\" \| \"commandMoveToColorTemp\" \| \"commandMoveToColor\" \| \"commandOnWithTimedOff\" \| \"commandRecall\" \| \"commandArm\" \| \"commandPanic\" \| \"commandEmergency\" \| \"commandColorLoopSet\" \| \"commandOperationEventNotification\" \| \"commandStatusChangeNotification\" \| \"commandEnhancedMoveToHueAndSaturation\" \| \"commandUpOpen\" \| \"commandDownClose\" \| \"commandMoveToLevel\" \| \"commandMoveColorTemp\" \| \"commandGetData\" \| \"commandSetDataResponse\" \| \"commandGetWeeklyScheduleRsp\" \| \"commandQueryNextImageRequest\" \| \"commandNotification\" \| \"commandAlertsNotification\" \| \"commandProgrammingEventNotification\" \| \"commandGetPinCodeRsp\" \| \"commandArrivalSensorNotify\" \| \"commandCommisioningNotification\" \| \"commandAtHome\" \| \"commandGoOut\" \| \"commandCinema\" \| \"commandRepast\" \| \"commandSleep\" \| \"commandStudyKeyRsp\" \| \"commandCreateIdRsp\" \| \"commandGetIdAndKeyCodeListRsp\" \| \"commandSetTimeRequest\" \| \"commandGetPanelStatus\"
Ƭ **MessagePayloadType**: \"attributeReport\" \| \"readResponse\" \| \"raw\" \| \"read\" \| \"write\" \| \"commandOn\" \| \"commandOffWithEffect\" \| \"commandStep\" \| \"commandStop\" \| \"commandHueNotification\" \| \"commandOff\" \| \"commandStepColorTemp\" \| \"commandMoveWithOnOff\" \| \"commandMove\" \| \"commandMoveHue\" \| \"commandMoveToSaturation\" \| \"commandStopWithOnOff\" \| \"commandMoveToLevelWithOnOff\" \| \"commandToggle\" \| \"commandTradfriArrowSingle\" \| \"commandTradfriArrowHold\" \| \"commandTradfriArrowRelease\" \| \"commandStepWithOnOff\" \| \"commandMoveToColorTemp\" \| \"commandMoveToColor\" \| \"commandOnWithTimedOff\" \| \"commandRecall\" \| \"commandArm\" \| \"commandPanic\" \| \"commandEmergency\" \| \"commandColorLoopSet\" \| \"commandOperationEventNotification\" \| \"commandStatusChangeNotification\" \| \"commandEnhancedMoveToHueAndSaturation\" \| \"commandUpOpen\" \| \"commandDownClose\" \| \"commandMoveToLevel\" \| \"commandMoveColorTemp\" \| \"commandGetData\" \| \"commandSetDataResponse\" \| \"commandGetWeeklyScheduleRsp\" \| \"commandQueryNextImageRequest\" \| \"commandNotification\" \| \"commandAlertsNotification\" \| \"commandProgrammingEventNotification\" \| \"commandGetPinCodeRsp\" \| \"commandArrivalSensorNotify\" \| \"commandCommissioningNotification\" \| \"commandAtHome\" \| \"commandGoOut\" \| \"commandCinema\" \| \"commandRepast\" \| \"commandSleep\" \| \"commandStudyKeyRsp\" \| \"commandCreateIdRsp\" \| \"commandGetIdAndKeyCodeListRsp\" \| \"commandSetTimeRequest\" \| \"commandGetPanelStatus\"

*Defined in [src/controller/events.ts:91](https://github.com/Koenkk/zigbee-herdsman/blob/master/src/src/controller/events.ts#L91)*

Expand All @@ -52,7 +52,7 @@ Name | Type | Value |
`atHome` | \"commandAtHome\" | "commandAtHome" |
`cinema` | \"commandCinema\" | "commandCinema" |
`colorLoopSet` | \"commandColorLoopSet\" | "commandColorLoopSet" |
`commisioningNotification` | \"commandCommisioningNotification\" | "commandCommisioningNotification" |
`commissioningNotification` | \"commandCommissioningNotification\" | "commandCommissioningNotification" |
`createIdRsp` | \"commandCreateIdRsp\" | "commandCreateIdRsp" |
`downClose` | \"commandDownClose\" | "commandDownClose" |
`emergency` | \"commandEmergency\" | "commandEmergency" |
Expand Down
2 changes: 1 addition & 1 deletion src/adapter/ezsp/adapter/ezspAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class EZSPAdapter extends Adapter {
const zclFrame = ZclFrame.create(
FrameType.SPECIFIC, Direction.CLIENT_TO_SERVER, true,
null, frame.apsFrame.sequence,
(frame.messageType == 0xE0) ? 'commisioningNotification' : 'notification',
(frame.messageType == 0xE0) ? 'commissioningNotification' : 'notification',
frame.apsFrame.clusterId, frame.message);
const payload: Events.ZclDataPayload = {
frame: zclFrame,
Expand Down
4 changes: 2 additions & 2 deletions src/controller/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface LastSeenChangedPayload {

const CommandsLookup: {[s: string]: MessagePayloadType} = {
'notification': 'commandNotification',
'commisioningNotification': 'commandCommisioningNotification',
'commissioningNotification': 'commandCommissioningNotification',
'on': 'commandOn',
'offWithEffect': 'commandOffWithEffect',
'step': 'commandStep',
Expand Down Expand Up @@ -153,7 +153,7 @@ type MessagePayloadType =
'commandUpOpen' | 'commandDownClose' | 'commandMoveToLevel' | 'commandMoveColorTemp' | 'commandDataResponse' |
'commandDataReport' | 'commandGetWeeklyScheduleRsp' | 'commandQueryNextImageRequest' | 'commandNotification' |
'commandAlertsNotification' | 'commandProgrammingEventNotification' | 'commandGetPinCodeRsp' |
'commandArrivalSensorNotify' | 'commandCommisioningNotification' | 'commandGetUserStatusRsp' |
'commandArrivalSensorNotify' | 'commandCommissioningNotification' | 'commandGetUserStatusRsp' |
'commandAlarm' | 'commandUnlockDoorRsp' | 'commandMcuVersionResponse' |
'commandAtHome' | 'commandGoOut' | 'commandCinema' | 'commandRepast' | 'commandSleep' |
'commandStudyKeyRsp' | 'commandCreateIdRsp' | 'commandGetIdAndKeyCodeListRsp' | 'commandMcuSyncTime' |
Expand Down
2 changes: 1 addition & 1 deletion src/zcl/definition/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ const Cluster: {
{name: 'gppGddLink', type: DataType.uint8,conditions: [{type: 'bitMaskSet', param:'options', mask: 0x4000}]},
],
},
commisioningNotification: {
commissioningNotification: {
ID: 4,
parameters: [
{name: 'options', type: DataType.uint16},
Expand Down
12 changes: 6 additions & 6 deletions test/controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1044,9 +1044,9 @@ describe('Controller', () => {

// Green power
expect(mocksendZclFrameToAll).toHaveBeenCalledTimes(4);
const commisionFrameDisable = mockZclFrame.create(1, 1, true, null, 5, 'commisioningMode', 33, {options: 0x0a, commisioningWindow: 0});
const commissionFrameDisable = mockZclFrame.create(1, 1, true, null, 5, 'commisioningMode', 33, {options: 0x0a, commisioningWindow: 0});
expect(mocksendZclFrameToAll.mock.calls[3][0]).toBe(242);
expect(deepClone(mocksendZclFrameToAll.mock.calls[3][1])).toStrictEqual(deepClone(commisionFrameDisable));
expect(deepClone(mocksendZclFrameToAll.mock.calls[3][1])).toStrictEqual(deepClone(commissionFrameDisable));
expect(mocksendZclFrameToAll.mock.calls[3][2]).toBe(242);
expect(mocksendZclFrameToAll).toBeCalledTimes(4);
});
Expand Down Expand Up @@ -4081,7 +4081,7 @@ describe('Controller', () => {
outgoingCounter: 0x000004e4,
},
};
const frame = mockZclFrame.create(1, 0, true, null, 10, 'commisioningNotification', 33, data)
const frame = mockZclFrame.create(1, 0, true, null, 10, 'commissioningNotification', 33, data)
await mockAdapterEvents['zclData']({
wasBroadcast: true,
address: 0x46f4fe,
Expand Down Expand Up @@ -4168,7 +4168,7 @@ describe('Controller', () => {
nextNextChannel: 15,
},
};
const frame = mockZclFrame.create(1, 0, true, null, 10, 'commisioningNotification', 33, data)
const frame = mockZclFrame.create(1, 0, true, null, 10, 'commissioningNotification', 33, data)
await mockAdapterEvents['zclData']({
wasBroadcast: true,
address: 0x46f4fe,
Expand Down Expand Up @@ -4217,7 +4217,7 @@ describe('Controller', () => {
outgoingCounter: 0x000004e4,
},
};
const frame = mockZclFrame.create(1, 0, true, null, 10, 'commisioningNotification', 33, data)
const frame = mockZclFrame.create(1, 0, true, null, 10, 'commissioningNotification', 33, data)
await mockAdapterEvents['zclData']({
wasBroadcast: true,
address: 0x46f4fe,
Expand Down Expand Up @@ -4319,7 +4319,7 @@ describe('Controller', () => {
gppGddLink: 0xd8,
};

const expectedFrame = mockZclFrame.create(1, 0, true, null, 100, 'commisioningNotification', 33, data);
const expectedFrame = mockZclFrame.create(1, 0, true, null, 100, 'commissioningNotification', 33, data);

const receivedFrame = ZclFrame.fromBuffer(33, Buffer.from([0x11, 0x64, 0x04, 0x00, 0x08, 0xf8, 0x71, 0x71, 0x01, 0xf8, 0x00, 0x00, 0x00, 0xe0, 0x2e, 0x02, 0xc5, 0xf2, 0x21, 0x7f, 0x8c, 0xb2, 0x90, 0xd9, 0x90, 0x14, 0x15, 0xd0, 0x5c, 0xb1, 0x64, 0x7c, 0x44, 0x6c, 0xfa, 0x47, 0x05, 0xf8, 0xf8, 0x11, 0x00, 0x00, 0x04, 0x11, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x22, 0x60, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x81, 0x00, 0xd8]));

Expand Down

0 comments on commit e423928

Please sign in to comment.