zwave-js 9.2.1 → 9.3.0
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/build/Controller.d.ts +2 -2
- package/build/Controller.d.ts.map +1 -1
- package/build/Controller.js +1 -1
- package/build/Controller.js.map +1 -1
- package/build/Driver.d.ts +3 -4
- package/build/Driver.d.ts.map +1 -1
- package/build/Driver.js +6 -7
- package/build/Driver.js.map +1 -1
- package/build/Utils.d.ts +2 -0
- package/build/Utils.d.ts.map +1 -1
- package/build/Utils.js +5 -1
- package/build/Utils.js.map +1 -1
- package/build/lib/commandclass/AlarmSensorCC.d.ts +6 -5
- package/build/lib/commandclass/AlarmSensorCC.d.ts.map +1 -1
- package/build/lib/commandclass/AlarmSensorCC.js +23 -23
- package/build/lib/commandclass/AlarmSensorCC.js.map +1 -1
- package/build/lib/commandclass/AssociationCC.d.ts +12 -11
- package/build/lib/commandclass/AssociationCC.d.ts.map +1 -1
- package/build/lib/commandclass/AssociationCC.js +47 -41
- package/build/lib/commandclass/AssociationCC.js.map +1 -1
- package/build/lib/commandclass/AssociationGroupInfoCC.d.ts +15 -14
- package/build/lib/commandclass/AssociationGroupInfoCC.d.ts.map +1 -1
- package/build/lib/commandclass/AssociationGroupInfoCC.js +56 -51
- package/build/lib/commandclass/AssociationGroupInfoCC.js.map +1 -1
- package/build/lib/commandclass/BarrierOperatorCC.d.ts +9 -8
- package/build/lib/commandclass/BarrierOperatorCC.d.ts.map +1 -1
- package/build/lib/commandclass/BarrierOperatorCC.js +28 -28
- package/build/lib/commandclass/BarrierOperatorCC.js.map +1 -1
- package/build/lib/commandclass/BasicCC.d.ts +5 -4
- package/build/lib/commandclass/BasicCC.d.ts.map +1 -1
- package/build/lib/commandclass/BasicCC.js +18 -18
- package/build/lib/commandclass/BasicCC.js.map +1 -1
- package/build/lib/commandclass/BatteryCC.d.ts +5 -4
- package/build/lib/commandclass/BatteryCC.d.ts.map +1 -1
- package/build/lib/commandclass/BatteryCC.js +17 -17
- package/build/lib/commandclass/BatteryCC.js.map +1 -1
- package/build/lib/commandclass/BinarySensorCC.d.ts +6 -5
- package/build/lib/commandclass/BinarySensorCC.d.ts.map +1 -1
- package/build/lib/commandclass/BinarySensorCC.js +24 -24
- package/build/lib/commandclass/BinarySensorCC.js.map +1 -1
- package/build/lib/commandclass/BinarySwitchCC.d.ts +5 -4
- package/build/lib/commandclass/BinarySwitchCC.d.ts.map +1 -1
- package/build/lib/commandclass/BinarySwitchCC.js +15 -15
- package/build/lib/commandclass/BinarySwitchCC.js.map +1 -1
- package/build/lib/commandclass/CRC16CC.d.ts +3 -3
- package/build/lib/commandclass/CRC16CC.d.ts.map +1 -1
- package/build/lib/commandclass/CRC16CC.js +5 -5
- package/build/lib/commandclass/CRC16CC.js.map +1 -1
- package/build/lib/commandclass/CentralSceneCC.d.ts +6 -5
- package/build/lib/commandclass/CentralSceneCC.d.ts.map +1 -1
- package/build/lib/commandclass/CentralSceneCC.js +23 -25
- package/build/lib/commandclass/CentralSceneCC.js.map +1 -1
- package/build/lib/commandclass/ClimateControlScheduleCC.d.ts +7 -7
- package/build/lib/commandclass/ClimateControlScheduleCC.d.ts.map +1 -1
- package/build/lib/commandclass/ClimateControlScheduleCC.js +12 -12
- package/build/lib/commandclass/ClimateControlScheduleCC.js.map +1 -1
- package/build/lib/commandclass/ClockCC.d.ts +5 -4
- package/build/lib/commandclass/ClockCC.d.ts.map +1 -1
- package/build/lib/commandclass/ClockCC.js +15 -15
- package/build/lib/commandclass/ClockCC.js.map +1 -1
- package/build/lib/commandclass/ColorSwitchCC.d.ts +10 -9
- package/build/lib/commandclass/ColorSwitchCC.d.ts.map +1 -1
- package/build/lib/commandclass/ColorSwitchCC.js +29 -29
- package/build/lib/commandclass/ColorSwitchCC.js.map +1 -1
- package/build/lib/commandclass/CommandClass.d.ts +17 -10
- package/build/lib/commandclass/CommandClass.d.ts.map +1 -1
- package/build/lib/commandclass/CommandClass.js +53 -27
- package/build/lib/commandclass/CommandClass.js.map +1 -1
- package/build/lib/commandclass/ConfigurationCC.d.ts +16 -15
- package/build/lib/commandclass/ConfigurationCC.d.ts.map +1 -1
- package/build/lib/commandclass/ConfigurationCC.js +66 -59
- package/build/lib/commandclass/ConfigurationCC.js.map +1 -1
- package/build/lib/commandclass/DoorLockCC.d.ts +8 -7
- package/build/lib/commandclass/DoorLockCC.d.ts.map +1 -1
- package/build/lib/commandclass/DoorLockCC.js +27 -27
- package/build/lib/commandclass/DoorLockCC.js.map +1 -1
- package/build/lib/commandclass/DoorLockLoggingCC.d.ts +6 -5
- package/build/lib/commandclass/DoorLockLoggingCC.d.ts.map +1 -1
- package/build/lib/commandclass/DoorLockLoggingCC.js +18 -18
- package/build/lib/commandclass/DoorLockLoggingCC.js.map +1 -1
- package/build/lib/commandclass/EntryControlCC.d.ts +8 -7
- package/build/lib/commandclass/EntryControlCC.d.ts.map +1 -1
- package/build/lib/commandclass/EntryControlCC.js +27 -27
- package/build/lib/commandclass/EntryControlCC.js.map +1 -1
- package/build/lib/commandclass/FirmwareUpdateMetaDataCC.d.ts +11 -11
- package/build/lib/commandclass/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
- package/build/lib/commandclass/FirmwareUpdateMetaDataCC.js +20 -20
- package/build/lib/commandclass/FirmwareUpdateMetaDataCC.js.map +1 -1
- package/build/lib/commandclass/HumidityControlModeCC.d.ts +6 -5
- package/build/lib/commandclass/HumidityControlModeCC.d.ts.map +1 -1
- package/build/lib/commandclass/HumidityControlModeCC.js +22 -22
- package/build/lib/commandclass/HumidityControlModeCC.js.map +1 -1
- package/build/lib/commandclass/HumidityControlOperatingStateCC.d.ts +4 -3
- package/build/lib/commandclass/HumidityControlOperatingStateCC.d.ts.map +1 -1
- package/build/lib/commandclass/HumidityControlOperatingStateCC.js +13 -13
- package/build/lib/commandclass/HumidityControlOperatingStateCC.js.map +1 -1
- package/build/lib/commandclass/HumidityControlSetpointCC.d.ts +11 -10
- package/build/lib/commandclass/HumidityControlSetpointCC.d.ts.map +1 -1
- package/build/lib/commandclass/HumidityControlSetpointCC.js +46 -46
- package/build/lib/commandclass/HumidityControlSetpointCC.js.map +1 -1
- package/build/lib/commandclass/IndicatorCC.d.ts +9 -8
- package/build/lib/commandclass/IndicatorCC.d.ts.map +1 -1
- package/build/lib/commandclass/IndicatorCC.js +37 -37
- package/build/lib/commandclass/IndicatorCC.js.map +1 -1
- package/build/lib/commandclass/IrrigationCC.d.ts +18 -17
- package/build/lib/commandclass/IrrigationCC.d.ts.map +1 -1
- package/build/lib/commandclass/IrrigationCC.js +51 -51
- package/build/lib/commandclass/IrrigationCC.js.map +1 -1
- package/build/lib/commandclass/LanguageCC.d.ts +5 -4
- package/build/lib/commandclass/LanguageCC.d.ts.map +1 -1
- package/build/lib/commandclass/LanguageCC.js +15 -15
- package/build/lib/commandclass/LanguageCC.js.map +1 -1
- package/build/lib/commandclass/LockCC.d.ts +5 -4
- package/build/lib/commandclass/LockCC.d.ts.map +1 -1
- package/build/lib/commandclass/LockCC.js +15 -15
- package/build/lib/commandclass/LockCC.js.map +1 -1
- package/build/lib/commandclass/ManufacturerProprietaryCC.d.ts +11 -3
- package/build/lib/commandclass/ManufacturerProprietaryCC.d.ts.map +1 -1
- package/build/lib/commandclass/ManufacturerProprietaryCC.js +44 -18
- package/build/lib/commandclass/ManufacturerProprietaryCC.js.map +1 -1
- package/build/lib/commandclass/ManufacturerSpecificCC.d.ts +5 -4
- package/build/lib/commandclass/ManufacturerSpecificCC.d.ts.map +1 -1
- package/build/lib/commandclass/ManufacturerSpecificCC.js +15 -15
- package/build/lib/commandclass/ManufacturerSpecificCC.js.map +1 -1
- package/build/lib/commandclass/MeterCC.d.ts +8 -7
- package/build/lib/commandclass/MeterCC.d.ts.map +1 -1
- package/build/lib/commandclass/MeterCC.js +49 -41
- package/build/lib/commandclass/MeterCC.js.map +1 -1
- package/build/lib/commandclass/MultiChannelAssociationCC.d.ts +12 -11
- package/build/lib/commandclass/MultiChannelAssociationCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultiChannelAssociationCC.js +45 -43
- package/build/lib/commandclass/MultiChannelAssociationCC.js.map +1 -1
- package/build/lib/commandclass/MultiChannelCC.d.ts +15 -14
- package/build/lib/commandclass/MultiChannelCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultiChannelCC.js +61 -61
- package/build/lib/commandclass/MultiChannelCC.js.map +1 -1
- package/build/lib/commandclass/MultiCommandCC.d.ts +3 -3
- package/build/lib/commandclass/MultiCommandCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultiCommandCC.js +5 -5
- package/build/lib/commandclass/MultiCommandCC.js.map +1 -1
- package/build/lib/commandclass/MultilevelSensorCC.d.ts +8 -7
- package/build/lib/commandclass/MultilevelSensorCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultilevelSensorCC.js +50 -50
- package/build/lib/commandclass/MultilevelSensorCC.js.map +1 -1
- package/build/lib/commandclass/MultilevelSwitchCC.d.ts +8 -7
- package/build/lib/commandclass/MultilevelSwitchCC.d.ts.map +1 -1
- package/build/lib/commandclass/MultilevelSwitchCC.js +31 -31
- package/build/lib/commandclass/MultilevelSwitchCC.js.map +1 -1
- package/build/lib/commandclass/NoOperationCC.d.ts +1 -1
- package/build/lib/commandclass/NoOperationCC.d.ts.map +1 -1
- package/build/lib/commandclass/NoOperationCC.js +2 -2
- package/build/lib/commandclass/NoOperationCC.js.map +1 -1
- package/build/lib/commandclass/NodeNamingCC.d.ts +7 -6
- package/build/lib/commandclass/NodeNamingCC.d.ts.map +1 -1
- package/build/lib/commandclass/NodeNamingCC.js +21 -21
- package/build/lib/commandclass/NodeNamingCC.js.map +1 -1
- package/build/lib/commandclass/NotificationCC.d.ts +10 -9
- package/build/lib/commandclass/NotificationCC.d.ts.map +1 -1
- package/build/lib/commandclass/NotificationCC.js +54 -54
- package/build/lib/commandclass/NotificationCC.js.map +1 -1
- package/build/lib/commandclass/PowerlevelCC.d.ts +5 -5
- package/build/lib/commandclass/PowerlevelCC.d.ts.map +1 -1
- package/build/lib/commandclass/PowerlevelCC.js +9 -9
- package/build/lib/commandclass/PowerlevelCC.js.map +1 -1
- package/build/lib/commandclass/ProtectionCC.d.ts +10 -9
- package/build/lib/commandclass/ProtectionCC.d.ts.map +1 -1
- package/build/lib/commandclass/ProtectionCC.js +33 -33
- package/build/lib/commandclass/ProtectionCC.js.map +1 -1
- package/build/lib/commandclass/SceneActivationCC.d.ts +2 -2
- package/build/lib/commandclass/SceneActivationCC.d.ts.map +1 -1
- package/build/lib/commandclass/SceneActivationCC.js +2 -2
- package/build/lib/commandclass/SceneActivationCC.js.map +1 -1
- package/build/lib/commandclass/SceneActuatorConfigurationCC.d.ts +5 -4
- package/build/lib/commandclass/SceneActuatorConfigurationCC.d.ts.map +1 -1
- package/build/lib/commandclass/SceneActuatorConfigurationCC.js +9 -9
- package/build/lib/commandclass/SceneActuatorConfigurationCC.js.map +1 -1
- package/build/lib/commandclass/SceneControllerConfigurationCC.d.ts +7 -6
- package/build/lib/commandclass/SceneControllerConfigurationCC.d.ts.map +1 -1
- package/build/lib/commandclass/SceneControllerConfigurationCC.js +32 -28
- package/build/lib/commandclass/SceneControllerConfigurationCC.js.map +1 -1
- package/build/lib/commandclass/Security2CC.d.ts +17 -26
- package/build/lib/commandclass/Security2CC.d.ts.map +1 -1
- package/build/lib/commandclass/Security2CC.js +68 -68
- package/build/lib/commandclass/Security2CC.js.map +1 -1
- package/build/lib/commandclass/SecurityCC.d.ts +11 -14
- package/build/lib/commandclass/SecurityCC.d.ts.map +1 -1
- package/build/lib/commandclass/SecurityCC.js +41 -41
- package/build/lib/commandclass/SecurityCC.js.map +1 -1
- package/build/lib/commandclass/SoundSwitchCC.d.ts +9 -8
- package/build/lib/commandclass/SoundSwitchCC.d.ts.map +1 -1
- package/build/lib/commandclass/SoundSwitchCC.js +27 -27
- package/build/lib/commandclass/SoundSwitchCC.js.map +1 -1
- package/build/lib/commandclass/SupervisionCC.d.ts +4 -4
- package/build/lib/commandclass/SupervisionCC.d.ts.map +1 -1
- package/build/lib/commandclass/SupervisionCC.js +9 -9
- package/build/lib/commandclass/SupervisionCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatFanModeCC.d.ts +6 -5
- package/build/lib/commandclass/ThermostatFanModeCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatFanModeCC.js +22 -22
- package/build/lib/commandclass/ThermostatFanModeCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatFanStateCC.d.ts +4 -3
- package/build/lib/commandclass/ThermostatFanStateCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatFanStateCC.js +13 -13
- package/build/lib/commandclass/ThermostatFanStateCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatModeCC.d.ts +6 -5
- package/build/lib/commandclass/ThermostatModeCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatModeCC.js +22 -22
- package/build/lib/commandclass/ThermostatModeCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatOperatingStateCC.d.ts +4 -3
- package/build/lib/commandclass/ThermostatOperatingStateCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatOperatingStateCC.js +13 -13
- package/build/lib/commandclass/ThermostatOperatingStateCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatSetbackCC.d.ts +5 -4
- package/build/lib/commandclass/ThermostatSetbackCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatSetbackCC.js +15 -15
- package/build/lib/commandclass/ThermostatSetbackCC.js.map +1 -1
- package/build/lib/commandclass/ThermostatSetpointCC.d.ts +10 -9
- package/build/lib/commandclass/ThermostatSetpointCC.d.ts.map +1 -1
- package/build/lib/commandclass/ThermostatSetpointCC.js +48 -48
- package/build/lib/commandclass/ThermostatSetpointCC.js.map +1 -1
- package/build/lib/commandclass/TimeCC.d.ts +6 -5
- package/build/lib/commandclass/TimeCC.d.ts.map +1 -1
- package/build/lib/commandclass/TimeCC.js +15 -15
- package/build/lib/commandclass/TimeCC.js.map +1 -1
- package/build/lib/commandclass/TimeParametersCC.d.ts +4 -3
- package/build/lib/commandclass/TimeParametersCC.d.ts.map +1 -1
- package/build/lib/commandclass/TimeParametersCC.js +11 -11
- package/build/lib/commandclass/TimeParametersCC.js.map +1 -1
- package/build/lib/commandclass/TransportServiceCC.d.ts +7 -7
- package/build/lib/commandclass/TransportServiceCC.d.ts.map +1 -1
- package/build/lib/commandclass/TransportServiceCC.js +12 -12
- package/build/lib/commandclass/TransportServiceCC.js.map +1 -1
- package/build/lib/commandclass/UserCodeCC.d.ts +17 -16
- package/build/lib/commandclass/UserCodeCC.d.ts.map +1 -1
- package/build/lib/commandclass/UserCodeCC.js +58 -58
- package/build/lib/commandclass/UserCodeCC.js.map +1 -1
- package/build/lib/commandclass/VersionCC.d.ts +7 -6
- package/build/lib/commandclass/VersionCC.d.ts.map +1 -1
- package/build/lib/commandclass/VersionCC.js +28 -28
- package/build/lib/commandclass/VersionCC.js.map +1 -1
- package/build/lib/commandclass/WakeUpCC.d.ts +5 -5
- package/build/lib/commandclass/WakeUpCC.d.ts.map +1 -1
- package/build/lib/commandclass/WakeUpCC.js +24 -28
- package/build/lib/commandclass/WakeUpCC.js.map +1 -1
- package/build/lib/commandclass/ZWavePlusCC.d.ts +20 -14
- package/build/lib/commandclass/ZWavePlusCC.d.ts.map +1 -1
- package/build/lib/commandclass/ZWavePlusCC.js +119 -41
- package/build/lib/commandclass/ZWavePlusCC.js.map +1 -1
- package/build/lib/commandclass/manufacturerProprietary/Fibaro.d.ts +8 -7
- package/build/lib/commandclass/manufacturerProprietary/Fibaro.d.ts.map +1 -1
- package/build/lib/commandclass/manufacturerProprietary/Fibaro.js +21 -21
- package/build/lib/commandclass/manufacturerProprietary/Fibaro.js.map +1 -1
- package/build/lib/controller/Controller.d.ts +21 -14
- package/build/lib/controller/Controller.d.ts.map +1 -1
- package/build/lib/controller/Controller.js +129 -140
- package/build/lib/controller/Controller.js.map +1 -1
- package/build/lib/controller/Inclusion.d.ts +1 -1
- package/build/lib/controller/Inclusion.d.ts.map +1 -1
- package/build/lib/controller/MockControllerBehaviors.d.ts +4 -0
- package/build/lib/controller/MockControllerBehaviors.d.ts.map +1 -0
- package/build/lib/controller/MockControllerBehaviors.js +161 -0
- package/build/lib/controller/MockControllerBehaviors.js.map +1 -0
- package/build/lib/controller/NodeInformationFrame.d.ts +9 -0
- package/build/lib/controller/NodeInformationFrame.d.ts.map +1 -0
- package/build/lib/controller/NodeInformationFrame.js +53 -0
- package/build/lib/controller/NodeInformationFrame.js.map +1 -0
- package/build/lib/controller/ZWaveChipTypes.d.ts +10 -0
- package/build/lib/controller/ZWaveChipTypes.d.ts.map +1 -0
- package/build/lib/controller/ZWaveChipTypes.js +32 -0
- package/build/lib/controller/ZWaveChipTypes.js.map +1 -0
- package/build/lib/controller/utils.d.ts +3 -0
- package/build/lib/controller/utils.d.ts.map +1 -0
- package/build/lib/controller/utils.js +40 -0
- package/build/lib/controller/utils.js.map +1 -0
- package/build/lib/driver/CommandQueueMachine.d.ts +1 -1
- package/build/lib/driver/CommandQueueMachine.d.ts.map +1 -1
- package/build/lib/driver/CommandQueueMachine.js.map +1 -1
- package/build/lib/driver/Driver.d.ts +7 -4
- package/build/lib/driver/Driver.d.ts.map +1 -1
- package/build/lib/driver/Driver.js +89 -67
- package/build/lib/driver/Driver.js.map +1 -1
- package/build/lib/driver/DriverMock.d.ts +13 -0
- package/build/lib/driver/DriverMock.d.ts.map +1 -0
- package/build/lib/driver/DriverMock.js +53 -0
- package/build/lib/driver/DriverMock.js.map +1 -0
- package/build/lib/driver/MessageGenerators.d.ts +1 -1
- package/build/lib/driver/MessageGenerators.d.ts.map +1 -1
- package/build/lib/driver/MessageGenerators.js.map +1 -1
- package/build/lib/driver/NetworkCache.d.ts +1 -1
- package/build/lib/driver/NetworkCache.d.ts.map +1 -1
- package/build/lib/driver/NetworkCache.js +80 -38
- package/build/lib/driver/NetworkCache.js.map +1 -1
- package/build/lib/driver/SendThreadMachine.d.ts +2 -2
- package/build/lib/driver/SendThreadMachine.d.ts.map +1 -1
- package/build/lib/driver/SendThreadMachine.js +4 -4
- package/build/lib/driver/SendThreadMachine.js.map +1 -1
- package/build/lib/driver/SerialAPICommandMachine.d.ts +1 -1
- package/build/lib/driver/SerialAPICommandMachine.d.ts.map +1 -1
- package/build/lib/driver/SerialAPICommandMachine.js +6 -7
- package/build/lib/driver/SerialAPICommandMachine.js.map +1 -1
- package/build/lib/driver/StateMachineShared.d.ts +1 -1
- package/build/lib/driver/StateMachineShared.d.ts.map +1 -1
- package/build/lib/driver/StateMachineShared.js.map +1 -1
- package/build/lib/driver/Transaction.d.ts +2 -2
- package/build/lib/driver/Transaction.d.ts.map +1 -1
- package/build/lib/driver/Transaction.js +5 -5
- package/build/lib/driver/Transaction.js.map +1 -1
- package/build/lib/driver/TransactionMachine.d.ts +1 -1
- package/build/lib/driver/TransactionMachine.d.ts.map +1 -1
- package/build/lib/driver/TransactionMachine.js.map +1 -1
- package/build/lib/driver/ZWaveOptions.d.ts +1 -1
- package/build/lib/driver/ZWaveOptions.d.ts.map +1 -1
- package/build/lib/log/Driver.d.ts +1 -1
- package/build/lib/log/Driver.d.ts.map +1 -1
- package/build/lib/log/Driver.js +4 -4
- package/build/lib/log/Driver.js.map +1 -1
- package/build/lib/node/Endpoint.d.ts +3 -2
- package/build/lib/node/Endpoint.d.ts.map +1 -1
- package/build/lib/node/Endpoint.js +32 -31
- package/build/lib/node/Endpoint.js.map +1 -1
- package/build/lib/node/Node.d.ts +4 -13
- package/build/lib/node/Node.d.ts.map +1 -1
- package/build/lib/node/Node.js +64 -150
- package/build/lib/node/Node.js.map +1 -1
- package/build/lib/node/_Types.d.ts +2 -30
- package/build/lib/node/_Types.d.ts.map +1 -1
- package/build/lib/node/_Types.js +3 -33
- package/build/lib/node/_Types.js.map +1 -1
- package/build/lib/node/utils.d.ts +28 -0
- package/build/lib/node/utils.d.ts.map +1 -0
- package/build/lib/node/utils.js +187 -0
- package/build/lib/node/utils.js.map +1 -0
- package/build/lib/serialapi/_Types.d.ts +1 -14
- package/build/lib/serialapi/_Types.d.ts.map +1 -1
- package/build/lib/serialapi/_Types.js +2 -15
- package/build/lib/serialapi/_Types.js.map +1 -1
- package/build/lib/serialapi/application/ApplicationCommandRequest.d.ts +4 -3
- package/build/lib/serialapi/application/ApplicationCommandRequest.d.ts.map +1 -1
- package/build/lib/serialapi/application/ApplicationCommandRequest.js +15 -14
- package/build/lib/serialapi/application/ApplicationCommandRequest.js.map +1 -1
- package/build/lib/serialapi/application/ApplicationUpdateRequest.d.ts +6 -6
- package/build/lib/serialapi/application/ApplicationUpdateRequest.d.ts.map +1 -1
- package/build/lib/serialapi/application/ApplicationUpdateRequest.js +10 -11
- package/build/lib/serialapi/application/ApplicationUpdateRequest.js.map +1 -1
- package/build/lib/serialapi/application/BridgeApplicationCommandRequest.d.ts +4 -3
- package/build/lib/serialapi/application/BridgeApplicationCommandRequest.d.ts.map +1 -1
- package/build/lib/serialapi/application/BridgeApplicationCommandRequest.js +14 -9
- package/build/lib/serialapi/application/BridgeApplicationCommandRequest.js.map +1 -1
- package/build/lib/serialapi/application/SerialAPIStartedRequest.d.ts +23 -11
- package/build/lib/serialapi/application/SerialAPIStartedRequest.d.ts.map +1 -1
- package/build/lib/serialapi/application/SerialAPIStartedRequest.js +59 -36
- package/build/lib/serialapi/application/SerialAPIStartedRequest.js.map +1 -1
- package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.d.ts +17 -11
- package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.js +40 -34
- package/build/lib/serialapi/capability/GetControllerCapabilitiesMessages.js.map +1 -1
- package/build/lib/serialapi/capability/GetControllerVersionMessages.d.ts +11 -9
- package/build/lib/serialapi/capability/GetControllerVersionMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetControllerVersionMessages.js +24 -24
- package/build/lib/serialapi/capability/GetControllerVersionMessages.js.map +1 -1
- package/build/lib/serialapi/capability/GetProtocolVersionMessages.d.ts +3 -3
- package/build/lib/serialapi/capability/GetProtocolVersionMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetProtocolVersionMessages.js +9 -10
- package/build/lib/serialapi/capability/GetProtocolVersionMessages.js.map +1 -1
- package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.d.ts +17 -16
- package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.js +39 -42
- package/build/lib/serialapi/capability/GetSerialApiCapabilitiesMessages.js.map +1 -1
- package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.d.ts +26 -14
- package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.js +138 -51
- package/build/lib/serialapi/capability/GetSerialApiInitDataMessages.js.map +1 -1
- package/build/lib/serialapi/capability/HardResetRequest.d.ts +12 -2
- package/build/lib/serialapi/capability/HardResetRequest.d.ts.map +1 -1
- package/build/lib/serialapi/capability/HardResetRequest.js +41 -11
- package/build/lib/serialapi/capability/HardResetRequest.js.map +1 -1
- package/build/lib/serialapi/capability/SerialAPISetupMessages.d.ts +22 -22
- package/build/lib/serialapi/capability/SerialAPISetupMessages.d.ts.map +1 -1
- package/build/lib/serialapi/capability/SerialAPISetupMessages.js +50 -51
- package/build/lib/serialapi/capability/SerialAPISetupMessages.js.map +1 -1
- package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.d.ts +22 -0
- package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.d.ts.map +1 -0
- package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.js +60 -0
- package/build/lib/serialapi/capability/SetApplicationNodeInformationRequest.js.map +1 -0
- package/build/lib/serialapi/memory/GetControllerIdMessages.d.ts +13 -9
- package/build/lib/serialapi/memory/GetControllerIdMessages.d.ts.map +1 -1
- package/build/lib/serialapi/memory/GetControllerIdMessages.js +31 -23
- package/build/lib/serialapi/memory/GetControllerIdMessages.js.map +1 -1
- package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.d.ts +3 -3
- package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.d.ts.map +1 -1
- package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.js +9 -10
- package/build/lib/serialapi/misc/GetBackgroundRSSIMessages.js.map +1 -1
- package/build/lib/serialapi/misc/SetRFReceiveModeMessages.d.ts +5 -5
- package/build/lib/serialapi/misc/SetRFReceiveModeMessages.d.ts.map +1 -1
- package/build/lib/serialapi/misc/SetRFReceiveModeMessages.js +12 -13
- package/build/lib/serialapi/misc/SetRFReceiveModeMessages.js.map +1 -1
- package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.d.ts +4 -4
- package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.d.ts.map +1 -1
- package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.js +11 -12
- package/build/lib/serialapi/misc/SetSerialApiTimeoutsMessages.js.map +1 -1
- package/build/lib/serialapi/misc/SoftResetRequest.d.ts +1 -1
- package/build/lib/serialapi/misc/SoftResetRequest.d.ts.map +1 -1
- package/build/lib/serialapi/misc/SoftResetRequest.js +4 -5
- package/build/lib/serialapi/misc/SoftResetRequest.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.d.ts +8 -8
- package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.js +17 -18
- package/build/lib/serialapi/network-mgmt/AddNodeToNetworkRequest.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.d.ts +7 -8
- package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.js +19 -20
- package/build/lib/serialapi/network-mgmt/AssignReturnRouteMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.d.ts +7 -8
- package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.js +19 -20
- package/build/lib/serialapi/network-mgmt/AssignSUCReturnRouteMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.d.ts +7 -8
- package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.js +19 -20
- package/build/lib/serialapi/network-mgmt/DeleteReturnRouteMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.d.ts +7 -8
- package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.js +19 -20
- package/build/lib/serialapi/network-mgmt/DeleteSUCReturnRouteMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.d.ts +20 -18
- package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.js +72 -26
- package/build/lib/serialapi/network-mgmt/GetNodeProtocolInfoMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.d.ts +4 -4
- package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.js +11 -12
- package/build/lib/serialapi/network-mgmt/GetRoutingInfoMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.d.ts +9 -7
- package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.js +18 -19
- package/build/lib/serialapi/network-mgmt/GetSUCNodeIdMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.d.ts +4 -4
- package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.js +11 -12
- package/build/lib/serialapi/network-mgmt/IsFailedNodeMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.d.ts +7 -7
- package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.js +18 -19
- package/build/lib/serialapi/network-mgmt/RemoveFailedNodeMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.d.ts +6 -6
- package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.js +13 -14
- package/build/lib/serialapi/network-mgmt/RemoveNodeFromNetworkRequest.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.d.ts +7 -7
- package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.js +17 -18
- package/build/lib/serialapi/network-mgmt/ReplaceFailedNodeRequest.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.d.ts +5 -6
- package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.js +12 -13
- package/build/lib/serialapi/network-mgmt/RequestNodeInfoMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.d.ts +6 -6
- package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.js +14 -15
- package/build/lib/serialapi/network-mgmt/RequestNodeNeighborUpdateMessages.js.map +1 -1
- package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.d.ts +7 -7
- package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.d.ts.map +1 -1
- package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.js +21 -22
- package/build/lib/serialapi/network-mgmt/SetSUCNodeIDMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.d.ts +4 -4
- package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.js +12 -13
- package/build/lib/serialapi/nvm/ExtNVMReadLongBufferMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.d.ts +4 -4
- package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.js +12 -13
- package/build/lib/serialapi/nvm/ExtNVMReadLongByteMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.d.ts +4 -4
- package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.js +12 -13
- package/build/lib/serialapi/nvm/ExtNVMWriteLongBufferMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.d.ts +4 -4
- package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.js +12 -13
- package/build/lib/serialapi/nvm/ExtNVMWriteLongByteMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/GetNVMIdMessages.d.ts +3 -3
- package/build/lib/serialapi/nvm/GetNVMIdMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/GetNVMIdMessages.js +9 -10
- package/build/lib/serialapi/nvm/GetNVMIdMessages.js.map +1 -1
- package/build/lib/serialapi/nvm/NVMOperationsMessages.d.ts +8 -8
- package/build/lib/serialapi/nvm/NVMOperationsMessages.d.ts.map +1 -1
- package/build/lib/serialapi/nvm/NVMOperationsMessages.js +19 -20
- package/build/lib/serialapi/nvm/NVMOperationsMessages.js.map +1 -1
- package/build/lib/serialapi/transport/SendDataBridgeMessages.d.ts +13 -11
- package/build/lib/serialapi/transport/SendDataBridgeMessages.d.ts.map +1 -1
- package/build/lib/serialapi/transport/SendDataBridgeMessages.js +48 -44
- package/build/lib/serialapi/transport/SendDataBridgeMessages.js.map +1 -1
- package/build/lib/serialapi/transport/SendDataMessages.d.ts +13 -11
- package/build/lib/serialapi/transport/SendDataMessages.d.ts.map +1 -1
- package/build/lib/serialapi/transport/SendDataMessages.js +49 -43
- package/build/lib/serialapi/transport/SendDataMessages.js.map +1 -1
- package/build/lib/telemetry/deviceConfig.d.ts.map +1 -1
- package/build/lib/telemetry/deviceConfig.js +2 -3
- package/build/lib/telemetry/deviceConfig.js.map +1 -1
- package/package.json +9 -8
- package/build/lib/driver/FileSystem.d.ts +0 -11
- package/build/lib/driver/FileSystem.d.ts.map +0 -1
- package/build/lib/driver/FileSystem.js +0 -3
- package/build/lib/driver/FileSystem.js.map +0 -1
- package/build/lib/log/Controller.d.ts +0 -68
- package/build/lib/log/Controller.d.ts.map +0 -1
- package/build/lib/log/Controller.js +0 -221
- package/build/lib/log/Controller.js.map +0 -1
- package/build/lib/message/Constants.d.ts +0 -150
- package/build/lib/message/Constants.d.ts.map +0 -1
- package/build/lib/message/Constants.js +0 -176
- package/build/lib/message/Constants.js.map +0 -1
- package/build/lib/message/Message.d.ts +0 -172
- package/build/lib/message/Message.d.ts.map +0 -1
- package/build/lib/message/Message.js +0 -465
- package/build/lib/message/Message.js.map +0 -1
- package/build/lib/message/SuccessIndicator.d.ts +0 -16
- package/build/lib/message/SuccessIndicator.d.ts.map +0 -1
- package/build/lib/message/SuccessIndicator.js +0 -12
- package/build/lib/message/SuccessIndicator.js.map +0 -1
- package/build/lib/node/INodeQuery.d.ts +0 -7
- package/build/lib/node/INodeQuery.d.ts.map +0 -1
- package/build/lib/node/INodeQuery.js +0 -9
- package/build/lib/node/INodeQuery.js.map +0 -1
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ZWaveController = void 0;
|
|
13
13
|
const core_1 = require("@zwave-js/core");
|
|
14
14
|
const nvmedit_1 = require("@zwave-js/nvmedit");
|
|
15
|
+
const serial_1 = require("@zwave-js/serial");
|
|
15
16
|
const shared_1 = require("@zwave-js/shared");
|
|
16
17
|
const arrays_1 = require("alcalzone-shared/arrays");
|
|
17
18
|
const async_1 = require("alcalzone-shared/async");
|
|
@@ -20,11 +21,13 @@ const crypto_1 = __importDefault(require("crypto"));
|
|
|
20
21
|
const semver_1 = __importDefault(require("semver"));
|
|
21
22
|
const util_1 = __importDefault(require("util"));
|
|
22
23
|
const commandclass_1 = require("../commandclass");
|
|
24
|
+
const AssociationCC_1 = require("../commandclass/AssociationCC");
|
|
25
|
+
const AssociationGroupInfoCC_1 = require("../commandclass/AssociationGroupInfoCC");
|
|
23
26
|
const ManufacturerSpecificCC_1 = require("../commandclass/ManufacturerSpecificCC");
|
|
27
|
+
const MultiChannelAssociationCC_1 = require("../commandclass/MultiChannelAssociationCC");
|
|
24
28
|
const shared_2 = require("../commandclass/Security2/shared");
|
|
25
29
|
const VersionCC_1 = require("../commandclass/VersionCC");
|
|
26
30
|
const NetworkCache_1 = require("../driver/NetworkCache");
|
|
27
|
-
const Constants_1 = require("../message/Constants");
|
|
28
31
|
const DeviceClass_1 = require("../node/DeviceClass");
|
|
29
32
|
const Node_1 = require("../node/Node");
|
|
30
33
|
const VirtualNode_1 = require("../node/VirtualNode");
|
|
@@ -36,6 +39,7 @@ const GetSerialApiCapabilitiesMessages_1 = require("../serialapi/capability/GetS
|
|
|
36
39
|
const GetSerialApiInitDataMessages_1 = require("../serialapi/capability/GetSerialApiInitDataMessages");
|
|
37
40
|
const HardResetRequest_1 = require("../serialapi/capability/HardResetRequest");
|
|
38
41
|
const SerialAPISetupMessages_1 = require("../serialapi/capability/SerialAPISetupMessages");
|
|
42
|
+
const SetApplicationNodeInformationRequest_1 = require("../serialapi/capability/SetApplicationNodeInformationRequest");
|
|
39
43
|
const GetControllerIdMessages_1 = require("../serialapi/memory/GetControllerIdMessages");
|
|
40
44
|
const GetBackgroundRSSIMessages_1 = require("../serialapi/misc/GetBackgroundRSSIMessages");
|
|
41
45
|
const SetRFReceiveModeMessages_1 = require("../serialapi/misc/SetRFReceiveModeMessages");
|
|
@@ -63,6 +67,8 @@ const _Types_2 = require("../serialapi/_Types");
|
|
|
63
67
|
const ControllerStatistics_1 = require("./ControllerStatistics");
|
|
64
68
|
const Features_1 = require("./Features");
|
|
65
69
|
const Inclusion_1 = require("./Inclusion");
|
|
70
|
+
const NodeInformationFrame_1 = require("./NodeInformationFrame");
|
|
71
|
+
const utils_1 = require("./utils");
|
|
66
72
|
const ZWaveSDKVersions_1 = require("./ZWaveSDKVersions");
|
|
67
73
|
let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
68
74
|
/** @internal */
|
|
@@ -75,18 +81,13 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
75
81
|
this._includeController = false;
|
|
76
82
|
this._unprovisionRemovedNode = false;
|
|
77
83
|
this._healNetworkProgress = new Map();
|
|
78
|
-
this._nodes =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (!node) {
|
|
82
|
-
throw new core_1.ZWaveError(`Node ${nodeId} was not found!`, core_1.ZWaveErrorCodes.Controller_NodeNotFound);
|
|
83
|
-
}
|
|
84
|
-
return node;
|
|
85
|
-
}.bind(this._nodes);
|
|
84
|
+
this._nodes = (0, shared_1.createThrowingMap)((nodeId) => {
|
|
85
|
+
throw new core_1.ZWaveError(`Node ${nodeId} was not found!`, core_1.ZWaveErrorCodes.Controller_NodeNotFound);
|
|
86
|
+
});
|
|
86
87
|
// register message handlers
|
|
87
|
-
driver.registerRequestHandler(
|
|
88
|
-
driver.registerRequestHandler(
|
|
89
|
-
driver.registerRequestHandler(
|
|
88
|
+
driver.registerRequestHandler(serial_1.FunctionType.AddNodeToNetwork, this.handleAddNodeStatusReport.bind(this));
|
|
89
|
+
driver.registerRequestHandler(serial_1.FunctionType.RemoveNodeFromNetwork, this.handleRemoveNodeStatusReport.bind(this));
|
|
90
|
+
driver.registerRequestHandler(serial_1.FunctionType.ReplaceFailedNode, this.handleReplaceNodeStatusReport.bind(this));
|
|
90
91
|
}
|
|
91
92
|
get type() {
|
|
92
93
|
return this._type;
|
|
@@ -94,6 +95,12 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
94
95
|
get sdkVersion() {
|
|
95
96
|
return this._sdkVersion;
|
|
96
97
|
}
|
|
98
|
+
get zwaveApiVersion() {
|
|
99
|
+
return this._zwaveApiVersion;
|
|
100
|
+
}
|
|
101
|
+
get zwaveChipType() {
|
|
102
|
+
return this._zwaveChipType;
|
|
103
|
+
}
|
|
97
104
|
/** A 32bit number identifying the current network */
|
|
98
105
|
get homeId() {
|
|
99
106
|
return this._homeId;
|
|
@@ -102,8 +109,13 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
102
109
|
get ownNodeId() {
|
|
103
110
|
return this._ownNodeId;
|
|
104
111
|
}
|
|
112
|
+
get isPrimary() {
|
|
113
|
+
return this._isPrimary;
|
|
114
|
+
}
|
|
115
|
+
/** @deprecated Use {@link isPrimary} instead */
|
|
105
116
|
get isSecondary() {
|
|
106
|
-
|
|
117
|
+
if (typeof this._isPrimary === "boolean")
|
|
118
|
+
return !this._isPrimary;
|
|
107
119
|
}
|
|
108
120
|
get isUsingHomeIdFromOtherNetwork() {
|
|
109
121
|
return this._isUsingHomeIdFromOtherNetwork;
|
|
@@ -114,11 +126,24 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
114
126
|
get wasRealPrimary() {
|
|
115
127
|
return this._wasRealPrimary;
|
|
116
128
|
}
|
|
129
|
+
get isSIS() {
|
|
130
|
+
return this._isSIS;
|
|
131
|
+
}
|
|
132
|
+
get isSUC() {
|
|
133
|
+
return this._isSUC;
|
|
134
|
+
}
|
|
135
|
+
/** @deprecated Use {@link isSUC} instead */
|
|
117
136
|
get isStaticUpdateController() {
|
|
118
|
-
return this.
|
|
137
|
+
return this._isSUC;
|
|
138
|
+
}
|
|
139
|
+
get nodeType() {
|
|
140
|
+
return this._nodeType;
|
|
119
141
|
}
|
|
142
|
+
/** @deprecated Use the {@link nodeType} property to check for Controller vs. End Node instead */
|
|
120
143
|
get isSlave() {
|
|
121
|
-
|
|
144
|
+
if (this._nodeType != undefined) {
|
|
145
|
+
return this._nodeType !== core_1.NodeType.Controller;
|
|
146
|
+
}
|
|
122
147
|
}
|
|
123
148
|
/** Checks if the SDK version is greater than the given one */
|
|
124
149
|
sdkVersionGt(version) {
|
|
@@ -257,6 +282,8 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
257
282
|
provisionSmartStartNode(entry) {
|
|
258
283
|
// Make sure the controller supports SmartStart
|
|
259
284
|
this.assertFeature(Features_1.ZWaveFeature.SmartStart);
|
|
285
|
+
// And that the entry contains valid data
|
|
286
|
+
(0, utils_1.assertProvisioningEntry)(entry);
|
|
260
287
|
const provisioningList = [...this.provisioningList];
|
|
261
288
|
const index = provisioningList.findIndex((e) => e.dsk === entry.dsk);
|
|
262
289
|
if (index === -1) {
|
|
@@ -332,9 +359,11 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
332
359
|
};
|
|
333
360
|
});
|
|
334
361
|
}
|
|
335
|
-
/** Returns whether the SmartStart provisioning list contains entries that have not been included yet */
|
|
362
|
+
/** Returns whether the SmartStart provisioning list contains active entries that have not been included yet */
|
|
336
363
|
hasPlannedProvisioningEntries() {
|
|
337
|
-
return this.provisioningList.some((e) =>
|
|
364
|
+
return this.provisioningList.some((e) => (e.status == undefined ||
|
|
365
|
+
e.status === Inclusion_1.ProvisioningEntryStatus.Active) &&
|
|
366
|
+
!this.getNodeByDSK(e.dsk));
|
|
338
367
|
}
|
|
339
368
|
/**
|
|
340
369
|
* @internal
|
|
@@ -384,7 +413,7 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
384
413
|
product type: ${(0, shared_1.num2hex)(this._productType)}
|
|
385
414
|
product ID: ${(0, shared_1.num2hex)(this._productId)}
|
|
386
415
|
supported functions: ${this._supportedFunctionTypes
|
|
387
|
-
.map((fn) => `\n · ${
|
|
416
|
+
.map((fn) => `\n · ${serial_1.FunctionType[fn]} (${(0, shared_1.num2hex)(fn)})`)
|
|
388
417
|
.join("")}`);
|
|
389
418
|
}
|
|
390
419
|
/**
|
|
@@ -398,13 +427,13 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
398
427
|
const version = await this.driver.sendMessage(new GetControllerVersionMessages_1.GetControllerVersionRequest(this.driver), {
|
|
399
428
|
supportCheck: false,
|
|
400
429
|
});
|
|
401
|
-
this._sdkVersion = version.
|
|
430
|
+
this._sdkVersion = version.libraryVersion;
|
|
402
431
|
this._type = version.controllerType;
|
|
403
432
|
this.driver.controllerLog.print(`received version info:
|
|
404
433
|
controller type: ${(0, shared_1.getEnumMemberName)(_Types_2.ZWaveLibraryTypes, this._type)}
|
|
405
434
|
library version: ${this._sdkVersion}`);
|
|
406
435
|
// If supported, get more fine-grained version info
|
|
407
|
-
if (this.isFunctionSupported(
|
|
436
|
+
if (this.isFunctionSupported(serial_1.FunctionType.GetProtocolVersion)) {
|
|
408
437
|
this.driver.controllerLog.print(`querying protocol version info...`);
|
|
409
438
|
const protocol = await this.driver.sendMessage(new GetProtocolVersionMessages_1.GetProtocolVersionRequest(this.driver));
|
|
410
439
|
// Overwrite the SDK version with the more fine grained protocol version. We can assume this to be
|
|
@@ -434,20 +463,20 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
434
463
|
const ctrlCaps = await this.driver.sendMessage(new GetControllerCapabilitiesMessages_1.GetControllerCapabilitiesRequest(this.driver), {
|
|
435
464
|
supportCheck: false,
|
|
436
465
|
});
|
|
437
|
-
this.
|
|
466
|
+
this._isPrimary = !ctrlCaps.isSecondary;
|
|
438
467
|
this._isUsingHomeIdFromOtherNetwork =
|
|
439
468
|
ctrlCaps.isUsingHomeIdFromOtherNetwork;
|
|
440
469
|
this._isSISPresent = ctrlCaps.isSISPresent;
|
|
441
470
|
this._wasRealPrimary = ctrlCaps.wasRealPrimary;
|
|
442
|
-
this.
|
|
471
|
+
this._isSUC = ctrlCaps.isStaticUpdateController;
|
|
443
472
|
this.driver.controllerLog.print(`received controller capabilities:
|
|
444
|
-
controller role:
|
|
445
|
-
is
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
473
|
+
controller role: ${this._isPrimary ? "primary" : "secondary"}
|
|
474
|
+
is the SUC: ${this._isSUC}
|
|
475
|
+
started this network: ${!this._isUsingHomeIdFromOtherNetwork}
|
|
476
|
+
SIS is present: ${this._isSISPresent}
|
|
477
|
+
was real primary: ${this._wasRealPrimary}`);
|
|
449
478
|
// Figure out which sub commands of SerialAPISetup are supported
|
|
450
|
-
if (this.isFunctionSupported(
|
|
479
|
+
if (this.isFunctionSupported(serial_1.FunctionType.SerialAPISetup)) {
|
|
451
480
|
this.driver.controllerLog.print(`querying serial API setup capabilities...`);
|
|
452
481
|
const setupCaps = await this.driver.sendMessage(new SerialAPISetupMessages_1.SerialAPISetup_GetSupportedCommandsRequest(this.driver));
|
|
453
482
|
this._supportedSerialAPISetupCommands = setupCaps.supportedCommands;
|
|
@@ -481,9 +510,9 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
481
510
|
}
|
|
482
511
|
// There needs to be a SUC/SIS in the network. If not, we promote ourselves to one if the following conditions are met:
|
|
483
512
|
// We are the primary controller, but we are not SUC, there is no SUC and there is no SIS
|
|
484
|
-
if (
|
|
513
|
+
if (this._isPrimary &&
|
|
485
514
|
this._sucNodeId === 0 &&
|
|
486
|
-
!this.
|
|
515
|
+
!this._isSUC &&
|
|
487
516
|
!this._isSISPresent) {
|
|
488
517
|
this.driver.controllerLog.print(`There is no SUC/SIS in the network - promoting ourselves...`);
|
|
489
518
|
try {
|
|
@@ -499,23 +528,30 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
499
528
|
}
|
|
500
529
|
// if it's a bridge controller, request the virtual nodes
|
|
501
530
|
if (this.type === _Types_2.ZWaveLibraryTypes["Bridge Controller"] &&
|
|
502
|
-
this.isFunctionSupported(
|
|
531
|
+
this.isFunctionSupported(serial_1.FunctionType.FUNC_ID_ZW_GET_VIRTUAL_NODES)) {
|
|
503
532
|
// TODO: send FUNC_ID_ZW_GET_VIRTUAL_NODES message
|
|
504
533
|
}
|
|
505
|
-
// Request information about
|
|
506
|
-
this.driver.controllerLog.print(`querying
|
|
534
|
+
// Request additional information about the controller/Z-Wave chip
|
|
535
|
+
this.driver.controllerLog.print(`querying additional controller information...`);
|
|
507
536
|
const initData = await this.driver.sendMessage(new GetSerialApiInitDataMessages_1.GetSerialApiInitDataRequest(this.driver));
|
|
508
|
-
// override the information we might already have
|
|
509
|
-
this._isSecondary = initData.isSecondary;
|
|
510
|
-
this._isStaticUpdateController = initData.isStaticUpdateController;
|
|
511
537
|
// and remember the new info
|
|
512
|
-
this.
|
|
538
|
+
this._zwaveApiVersion = initData.zwaveApiVersion;
|
|
539
|
+
this._zwaveChipType = initData.zwaveChipType;
|
|
540
|
+
this._isPrimary = initData.isPrimary;
|
|
541
|
+
this._isSIS = initData.isSIS;
|
|
542
|
+
this._nodeType = initData.nodeType;
|
|
513
543
|
this._supportsTimers = initData.supportsTimers;
|
|
514
544
|
// ignore the initVersion, no clue what to do with it
|
|
515
|
-
this.driver.controllerLog.print(`received
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
545
|
+
this.driver.controllerLog.print(`received additional controller information:
|
|
546
|
+
Z-Wave API version: ${this._zwaveApiVersion.version} (${this._zwaveApiVersion.kind})${this._zwaveChipType
|
|
547
|
+
? `
|
|
548
|
+
Z-Wave chip type: ${typeof this._zwaveChipType === "string"
|
|
549
|
+
? this._zwaveChipType
|
|
550
|
+
: `unknown (type: ${(0, shared_1.num2hex)(this._zwaveChipType.type)}, version: ${(0, shared_1.num2hex)(this._zwaveChipType.version)})`}`
|
|
551
|
+
: ""}
|
|
552
|
+
node type ${(0, shared_1.getEnumMemberName)(core_1.NodeType, this._nodeType)}
|
|
553
|
+
controller role: ${this._isPrimary ? "primary" : "secondary"}
|
|
554
|
+
controller is the SIS: ${this._isSIS}
|
|
519
555
|
controller supports timers: ${this._supportsTimers}
|
|
520
556
|
nodes in the network: ${initData.nodeIds.join(", ")}`);
|
|
521
557
|
// Index the value DB for optimal performance
|
|
@@ -547,7 +583,7 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
547
583
|
controllerValueDB.setMetadata((0, VersionCC_1.getSDKVersionValueId)(), (0, VersionCC_1.getSDKVersionMetadata)());
|
|
548
584
|
controllerValueDB.setValue((0, VersionCC_1.getSDKVersionValueId)(), this._sdkVersion);
|
|
549
585
|
if (this.type !== _Types_2.ZWaveLibraryTypes["Bridge Controller"] &&
|
|
550
|
-
this.isFunctionSupported(
|
|
586
|
+
this.isFunctionSupported(serial_1.FunctionType.SetSerialApiTimeouts)) {
|
|
551
587
|
const { ack, byte } = this.driver.options.timeouts;
|
|
552
588
|
this.driver.controllerLog.print(`setting serial API timeouts: ack = ${ack} ms, byte = ${byte} ms`);
|
|
553
589
|
const resp = await this.driver.sendMessage(new SetSerialApiTimeoutsMessages_1.SetSerialApiTimeoutsRequest(this.driver, {
|
|
@@ -556,85 +592,44 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
556
592
|
}));
|
|
557
593
|
this.driver.controllerLog.print(`serial API timeouts overwritten. The old values were: ack = ${resp.oldAckTimeout} ms, byte = ${resp.oldByteTimeout} ms`);
|
|
558
594
|
}
|
|
559
|
-
// TODO: Tell the Z-Wave stick what kind of application this is
|
|
560
|
-
// The Z-Wave Application Layer MUST use the \ref ApplicationNodeInformation
|
|
561
|
-
// function to generate the Node Information frame and to save information about
|
|
562
|
-
// node capabilities. All Z Wave application related fields of the Node Information
|
|
563
|
-
// structure MUST be initialized by this function.
|
|
564
|
-
// Afterwards, a hard reset is required, so we need to move this into another method
|
|
565
|
-
// if (
|
|
566
|
-
// this.isFunctionSupported(
|
|
567
|
-
// FunctionType.FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION,
|
|
568
|
-
// )
|
|
569
|
-
// ) {
|
|
570
|
-
// this.driver.controllerLog.print(`sending application info...`);
|
|
571
|
-
// // TODO: Generate this list dynamically
|
|
572
|
-
// // A list of all CCs the controller will respond to
|
|
573
|
-
// const supportedCCs = [CommandClasses.Time];
|
|
574
|
-
// // Turn the CCs into buffers and concat them
|
|
575
|
-
// const supportedCCBuffer = Buffer.concat(
|
|
576
|
-
// supportedCCs.map(cc =>
|
|
577
|
-
// cc >= 0xf1
|
|
578
|
-
// ? // extended CC
|
|
579
|
-
// Buffer.from([cc >>> 8, cc & 0xff])
|
|
580
|
-
// : // normal CC
|
|
581
|
-
// Buffer.from([cc]),
|
|
582
|
-
// ),
|
|
583
|
-
// );
|
|
584
|
-
// const appInfoMsg = new Message(this.driver, {
|
|
585
|
-
// type: MessageType.Request,
|
|
586
|
-
// functionType:
|
|
587
|
-
// FunctionType.FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION,
|
|
588
|
-
// payload: Buffer.concat([
|
|
589
|
-
// Buffer.from([
|
|
590
|
-
// 0x01, // APPLICATION_NODEINFO_LISTENING
|
|
591
|
-
// GenericDeviceClasses["Static Controller"],
|
|
592
|
-
// 0x01, // specific static PC controller
|
|
593
|
-
// supportedCCBuffer.length, // length of supported CC list
|
|
594
|
-
// ]),
|
|
595
|
-
// // List of supported CCs
|
|
596
|
-
// supportedCCBuffer,
|
|
597
|
-
// ]),
|
|
598
|
-
// });
|
|
599
|
-
// await this.driver.sendMessage(appInfoMsg, {
|
|
600
|
-
// priority: MessagePriority.Controller,
|
|
601
|
-
// supportCheck: false,
|
|
602
|
-
// });
|
|
603
|
-
// }
|
|
604
595
|
this.driver.controllerLog.print("Interview completed");
|
|
605
596
|
}
|
|
606
597
|
createValueDBForNode(nodeId, ownKeys) {
|
|
607
598
|
return new core_1.ValueDB(nodeId, this.driver.valueDB, this.driver.metadataDB, ownKeys);
|
|
608
599
|
}
|
|
600
|
+
/**
|
|
601
|
+
* Sets the NIF of the controller to the Gateway device type and to include the CCs supported by Z-Wave JS.
|
|
602
|
+
* Warning: This only works when followed up by a hard-reset, so don't call this directly
|
|
603
|
+
* @internal
|
|
604
|
+
*/
|
|
605
|
+
async setControllerNIF() {
|
|
606
|
+
this.driver.controllerLog.print("Updating the controller NIF...");
|
|
607
|
+
await this.driver.sendMessage(new SetApplicationNodeInformationRequest_1.SetApplicationNodeInformationRequest(this.driver, {
|
|
608
|
+
isListening: true,
|
|
609
|
+
...(0, NodeInformationFrame_1.determineNIF)(),
|
|
610
|
+
}));
|
|
611
|
+
}
|
|
609
612
|
/**
|
|
610
613
|
* Performs a hard reset on the controller. This wipes out all configuration!
|
|
611
614
|
* Warning: The driver needs to re-interview the controller, so don't call this directly
|
|
612
615
|
* @internal
|
|
613
616
|
*/
|
|
614
|
-
hardReset() {
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
631
|
-
catch (e) {
|
|
632
|
-
// in any case unregister the handler
|
|
633
|
-
this.driver.controllerLog.print(` hard reset failed: ${(0, shared_1.getErrorMessage)(e)}`, "error");
|
|
634
|
-
this.driver.unregisterRequestHandler(Constants_1.FunctionType.HardReset, handler);
|
|
635
|
-
reject(e);
|
|
636
|
-
}
|
|
637
|
-
});
|
|
617
|
+
async hardReset() {
|
|
618
|
+
// begin the reset process
|
|
619
|
+
try {
|
|
620
|
+
this.driver.controllerLog.print("performing hard reset...");
|
|
621
|
+
await this.driver.sendMessage(new HardResetRequest_1.HardResetRequest(this.driver), {
|
|
622
|
+
supportCheck: false,
|
|
623
|
+
});
|
|
624
|
+
this.driver.controllerLog.print(`hard reset succeeded`);
|
|
625
|
+
// Clean up
|
|
626
|
+
this._nodes.forEach((node) => node.removeAllListeners());
|
|
627
|
+
this._nodes.clear();
|
|
628
|
+
}
|
|
629
|
+
catch (e) {
|
|
630
|
+
this.driver.controllerLog.print(`hard reset failed: ${(0, shared_1.getErrorMessage)(e)}`, "error");
|
|
631
|
+
throw e;
|
|
632
|
+
}
|
|
638
633
|
}
|
|
639
634
|
get inclusionState() {
|
|
640
635
|
return this._inclusionState;
|
|
@@ -1495,7 +1490,7 @@ let ZWaveController = class ZWaveController extends shared_1.TypedEventEmitter {
|
|
|
1495
1490
|
version: supportedVersion,
|
|
1496
1491
|
});
|
|
1497
1492
|
const instance = node.createCCInstance(core_1.CommandClasses["Wake Up"]);
|
|
1498
|
-
await instance.interview();
|
|
1493
|
+
await instance.interview(this.driver);
|
|
1499
1494
|
}
|
|
1500
1495
|
}
|
|
1501
1496
|
catch (e) {
|
|
@@ -2209,41 +2204,40 @@ ${associatedNodes.join(", ")}`,
|
|
|
2209
2204
|
let assocInstance;
|
|
2210
2205
|
let mcInstance;
|
|
2211
2206
|
if (endpoint.supportsCC(core_1.CommandClasses.Association)) {
|
|
2212
|
-
assocInstance =
|
|
2207
|
+
assocInstance = AssociationCC_1.AssociationCC;
|
|
2213
2208
|
}
|
|
2214
2209
|
else {
|
|
2215
2210
|
throw new core_1.ZWaveError(`Node ${nodeId}${endpointIndex > 0 ? `, endpoint ${endpointIndex}` : ""} does not support associations!`, core_1.ZWaveErrorCodes.CC_NotSupported);
|
|
2216
2211
|
}
|
|
2217
2212
|
if (endpoint.supportsCC(core_1.CommandClasses["Multi Channel Association"])) {
|
|
2218
|
-
mcInstance =
|
|
2219
|
-
endpoint.createCCInstanceUnsafe(core_1.CommandClasses["Multi Channel Association"]);
|
|
2213
|
+
mcInstance = MultiChannelAssociationCC_1.MultiChannelAssociationCC;
|
|
2220
2214
|
}
|
|
2221
|
-
const assocGroupCount = (_b = assocInstance.getGroupCountCached()) !== null && _b !== void 0 ? _b : 0;
|
|
2222
|
-
const mcGroupCount = (_c = mcInstance === null || mcInstance === void 0 ? void 0 : mcInstance.getGroupCountCached()) !== null && _c !== void 0 ? _c : 0;
|
|
2215
|
+
const assocGroupCount = (_b = assocInstance.getGroupCountCached(this.driver, endpoint)) !== null && _b !== void 0 ? _b : 0;
|
|
2216
|
+
const mcGroupCount = (_c = mcInstance === null || mcInstance === void 0 ? void 0 : mcInstance.getGroupCountCached(this.driver, endpoint)) !== null && _c !== void 0 ? _c : 0;
|
|
2223
2217
|
const groupCount = Math.max(assocGroupCount, mcGroupCount);
|
|
2224
2218
|
const ret = new Map();
|
|
2225
2219
|
if (endpoint.supportsCC(core_1.CommandClasses["Association Group Information"])) {
|
|
2226
2220
|
// We can read all information we need from the AGI CC
|
|
2227
|
-
const agiInstance =
|
|
2221
|
+
const agiInstance = AssociationGroupInfoCC_1.AssociationGroupInfoCC;
|
|
2228
2222
|
for (let group = 1; group <= groupCount; group++) {
|
|
2229
2223
|
const assocConfig = (_d = node.deviceConfig) === null || _d === void 0 ? void 0 : _d.getAssociationConfigForEndpoint(endpointIndex, group);
|
|
2230
2224
|
const multiChannel = !!mcInstance && group <= mcGroupCount;
|
|
2231
2225
|
ret.set(group, {
|
|
2232
2226
|
maxNodes: (multiChannel
|
|
2233
2227
|
? mcInstance
|
|
2234
|
-
: assocInstance).getMaxNodesCached(group) || 1,
|
|
2228
|
+
: assocInstance).getMaxNodesCached(this.driver, endpoint, group) || 1,
|
|
2235
2229
|
// AGI implies Z-Wave+ where group 1 is the lifeline
|
|
2236
2230
|
isLifeline: group === 1,
|
|
2237
2231
|
label:
|
|
2238
2232
|
// prefer the configured label if we have one
|
|
2239
2233
|
(_f = (_e = assocConfig === null || assocConfig === void 0 ? void 0 : assocConfig.label) !== null && _e !== void 0 ? _e :
|
|
2240
2234
|
// the ones reported by AGI are sometimes pretty bad
|
|
2241
|
-
agiInstance.getGroupNameCached(group)) !== null && _f !== void 0 ? _f :
|
|
2235
|
+
agiInstance.getGroupNameCached(this.driver, endpoint, group)) !== null && _f !== void 0 ? _f :
|
|
2242
2236
|
// but still better than "unnamed"
|
|
2243
2237
|
`Unnamed group ${group}`,
|
|
2244
2238
|
multiChannel,
|
|
2245
|
-
profile: agiInstance.getGroupProfileCached(group),
|
|
2246
|
-
issuedCommands: agiInstance.getIssuedCommandsCached(group),
|
|
2239
|
+
profile: agiInstance.getGroupProfileCached(this.driver, endpoint, group),
|
|
2240
|
+
issuedCommands: agiInstance.getIssuedCommandsCached(this.driver, endpoint, group),
|
|
2247
2241
|
});
|
|
2248
2242
|
}
|
|
2249
2243
|
}
|
|
@@ -2255,7 +2249,7 @@ ${associatedNodes.join(", ")}`,
|
|
|
2255
2249
|
ret.set(group, {
|
|
2256
2250
|
maxNodes: (multiChannel
|
|
2257
2251
|
? mcInstance
|
|
2258
|
-
: assocInstance).getMaxNodesCached(group) ||
|
|
2252
|
+
: assocInstance).getMaxNodesCached(this.driver, endpoint, group) ||
|
|
2259
2253
|
(assocConfig === null || assocConfig === void 0 ? void 0 : assocConfig.maxNodes) ||
|
|
2260
2254
|
1,
|
|
2261
2255
|
isLifeline: (_h = assocConfig === null || assocConfig === void 0 ? void 0 : assocConfig.isLifeline) !== null && _h !== void 0 ? _h : group === 1,
|
|
@@ -2291,8 +2285,7 @@ ${associatedNodes.join(", ")}`,
|
|
|
2291
2285
|
const endpoint = node.getEndpointOrThrow(endpointIndex);
|
|
2292
2286
|
const ret = new Map();
|
|
2293
2287
|
if (endpoint.supportsCC(core_1.CommandClasses.Association)) {
|
|
2294
|
-
const
|
|
2295
|
-
const destinations = cc.getAllDestinationsCached();
|
|
2288
|
+
const destinations = AssociationCC_1.AssociationCC.getAllDestinationsCached(this.driver, endpoint);
|
|
2296
2289
|
for (const [groupId, assocs] of destinations) {
|
|
2297
2290
|
ret.set(groupId, assocs);
|
|
2298
2291
|
}
|
|
@@ -2302,8 +2295,7 @@ ${associatedNodes.join(", ")}`,
|
|
|
2302
2295
|
}
|
|
2303
2296
|
// Merge the "normal" destinations with multi channel destinations
|
|
2304
2297
|
if (endpoint.supportsCC(core_1.CommandClasses["Multi Channel Association"])) {
|
|
2305
|
-
const
|
|
2306
|
-
const destinations = cc.getAllDestinationsCached();
|
|
2298
|
+
const destinations = MultiChannelAssociationCC_1.MultiChannelAssociationCC.getAllDestinationsCached(this.driver, endpoint);
|
|
2307
2299
|
for (const [groupId, assocs] of destinations) {
|
|
2308
2300
|
if (ret.has(groupId)) {
|
|
2309
2301
|
const normalAssociations = ret.get(groupId);
|
|
@@ -2367,9 +2359,7 @@ ${associatedNodes.join(", ")}`,
|
|
|
2367
2359
|
// The following checks don't apply to Lifeline associations
|
|
2368
2360
|
if (destination.nodeId === this._ownNodeId)
|
|
2369
2361
|
return true;
|
|
2370
|
-
const groupCommandList = endpoint
|
|
2371
|
-
.createCCInstanceInternal(core_1.CommandClasses["Association Group Information"])
|
|
2372
|
-
.getIssuedCommandsCached(group);
|
|
2362
|
+
const groupCommandList = AssociationGroupInfoCC_1.AssociationGroupInfoCC.getIssuedCommandsCached(this.driver, endpoint, group);
|
|
2373
2363
|
if (!groupCommandList || !groupCommandList.size) {
|
|
2374
2364
|
// We don't know which CCs this group controls, just allow it
|
|
2375
2365
|
return true;
|
|
@@ -2404,20 +2394,19 @@ ${associatedNodes.join(", ")}`,
|
|
|
2404
2394
|
.map((a) => a.nodeId));
|
|
2405
2395
|
const endpointAssociations = destinations.filter((a) => a.endpoint != undefined);
|
|
2406
2396
|
if (endpoint.supportsCC(core_1.CommandClasses.Association)) {
|
|
2407
|
-
assocInstance =
|
|
2397
|
+
assocInstance = AssociationCC_1.AssociationCC;
|
|
2408
2398
|
}
|
|
2409
2399
|
else if (nodeAssociations.length > 0) {
|
|
2410
2400
|
throw new core_1.ZWaveError(`Node ${nodeAndEndpointString} does not support associations!`, core_1.ZWaveErrorCodes.CC_NotSupported);
|
|
2411
2401
|
}
|
|
2412
2402
|
if (endpoint.supportsCC(core_1.CommandClasses["Multi Channel Association"])) {
|
|
2413
|
-
mcInstance =
|
|
2414
|
-
endpoint.createCCInstanceUnsafe(core_1.CommandClasses["Multi Channel Association"]);
|
|
2403
|
+
mcInstance = MultiChannelAssociationCC_1.MultiChannelAssociationCC;
|
|
2415
2404
|
}
|
|
2416
2405
|
else if (endpointAssociations.length > 0) {
|
|
2417
2406
|
throw new core_1.ZWaveError(`Node ${nodeAndEndpointString} does not support multi channel associations!`, core_1.ZWaveErrorCodes.CC_NotSupported);
|
|
2418
2407
|
}
|
|
2419
|
-
const assocGroupCount = (_b = assocInstance === null || assocInstance === void 0 ? void 0 : assocInstance.getGroupCountCached()) !== null && _b !== void 0 ? _b : 0;
|
|
2420
|
-
const mcGroupCount = (_c = mcInstance === null || mcInstance === void 0 ? void 0 : mcInstance.getGroupCountCached()) !== null && _c !== void 0 ? _c : 0;
|
|
2408
|
+
const assocGroupCount = (_b = assocInstance === null || assocInstance === void 0 ? void 0 : assocInstance.getGroupCountCached(this.driver, endpoint)) !== null && _b !== void 0 ? _b : 0;
|
|
2409
|
+
const mcGroupCount = (_c = mcInstance === null || mcInstance === void 0 ? void 0 : mcInstance.getGroupCountCached(this.driver, endpoint)) !== null && _c !== void 0 ? _c : 0;
|
|
2421
2410
|
const groupCount = Math.max(assocGroupCount, mcGroupCount);
|
|
2422
2411
|
if (group > groupCount) {
|
|
2423
2412
|
throw new core_1.ZWaveError(`Group ${group} does not exist on node ${nodeAndEndpointString}`, core_1.ZWaveErrorCodes.AssociationCC_InvalidGroup);
|
|
@@ -2487,9 +2476,8 @@ ${associatedNodes.join(", ")}`,
|
|
|
2487
2476
|
// To remove a multi channel association, we need to make sure that the group exists
|
|
2488
2477
|
// and the node supports multi channel associations
|
|
2489
2478
|
if (endpoint.supportsCC(core_1.CommandClasses["Multi Channel Association"])) {
|
|
2490
|
-
mcInstance =
|
|
2491
|
-
|
|
2492
|
-
if (group <= mcInstance.getGroupCountCached()) {
|
|
2479
|
+
mcInstance = MultiChannelAssociationCC_1.MultiChannelAssociationCC;
|
|
2480
|
+
if (group <= mcInstance.getGroupCountCached(this.driver, endpoint)) {
|
|
2493
2481
|
groupExistsAsMultiChannel = true;
|
|
2494
2482
|
}
|
|
2495
2483
|
}
|
|
@@ -2499,8 +2487,9 @@ ${associatedNodes.join(", ")}`,
|
|
|
2499
2487
|
// To remove a normal association, we need to make sure that the group exists either as a normal association
|
|
2500
2488
|
// or as a multi channel association
|
|
2501
2489
|
if (endpoint.supportsCC(core_1.CommandClasses.Association)) {
|
|
2502
|
-
assocInstance =
|
|
2503
|
-
if (group <=
|
|
2490
|
+
assocInstance = AssociationCC_1.AssociationCC;
|
|
2491
|
+
if (group <=
|
|
2492
|
+
assocInstance.getGroupCountCached(this.driver, endpoint)) {
|
|
2504
2493
|
groupExistsAsNodeAssociation = true;
|
|
2505
2494
|
}
|
|
2506
2495
|
}
|