From 7fb00daa52f9ee7edaa3bed5b8eae4d0a64475c8 Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Thu, 1 Sep 2022 08:14:37 +0200 Subject: [PATCH] Zigbee prepare for Green Power support --- CHANGELOG.md | 1 + .../xdrv_23_zigbee_0_constants.ino | 2 + .../xdrv_23_zigbee_5_0_constants.ino | 1064 +++++++++-------- .../xdrv_23_zigbee_5_1_attributes.ino | 29 +- .../xdrv_23_zigbee_5_2_converters.ino | 52 +- .../xdrv_23_zigbee_7_0_statemachine.ino | 16 +- .../xdrv_23_zigbee_8_parsers.ino | 4 +- .../xdrv_23_zigbee_9_serial.ino | 11 +- .../xdrv_23_zigbee_A_impl.ino | 34 +- 9 files changed, 666 insertions(+), 547 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b2c6a528..cfe3871bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - Support for Modbus writing using ModbusBridge by JeroenSt (#16351) - Support for Ethernet in ESP32 safeboot firmware (#16388) - Flowrate meter flow amount/duration, show values in table format (#16385) +- Zigbee prepare for Green Power support ### Changed - TasmotaModbus library from v3.5.0 to v3.6.0 (#16351) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_0_constants.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_0_constants.ino index ac2aae6ed..cffd37e59 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_0_constants.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_0_constants.ino @@ -923,6 +923,8 @@ enum Z_App_Profiles { Z_PROF_TA = 0x0107, // Telecom Applications Z_PROF_PHHC = 0x0108, // Personal Home & Hospital Care Z_PROF_AMI = 0x0109, // Advanced Metering Initiative + // Green Power + Z_PROF_GP = 0xa1e0, // Green Power profile }; enum Z_Device_Ids { diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_0_constants.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_0_constants.ino index 9e476650c..d244032fe 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_0_constants.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_0_constants.ino @@ -240,12 +240,16 @@ const char Z_strings[] PROGMEM = "BinaryRelinquishDefault" "\x00" "BinaryStatusFlags" "\x00" "BinaryValue" "\x00" + "BlockedGPDID" "\x00" "CIE" "\x00" "CO" "\x00" "CT" "\x00" "CalculationPeriod" "\x00" + "CcommissioningExitMode" "\x00" "CheckinInterval" "\x00" "CheckinIntervalMin" "\x00" + "ClientActiveFunctionality" "\x00" + "ClientFunctionality" "\x00" "ClosedLimit" "\x00" "Color" "\x00" "ColorCapabilities" "\x00" @@ -275,6 +279,8 @@ const char Z_strings[] PROGMEM = "ColorTempStep" "\x00" "ColorTempStepDown" "\x00" "ColorTempStepUp" "\x00" + "CommissioningWindow" "\x00" + "CommunicationMode" "\x00" "CompanyName" "\x00" "CompensationText" "\x00" "ConfigStatus" "\x00" @@ -415,6 +421,7 @@ const char Z_strings[] PROGMEM = "LineCurrent" "\x00" "LineCurrentPhB" "\x00" "LineCurrentPhC" "\x00" + "LinkKey" "\x00" "LocalTemperature" "\x00" "LocalTemperatureCalibration" "\x00" "LocalTime" "\x00" @@ -458,7 +465,10 @@ const char Z_strings[] PROGMEM = "MaxCoolSetpointLimit" "\x00" "MaxHeatSetpointLimit" "\x00" "MaxPINCodeLength" "\x00" + "MaxProxyTableEntries" "\x00" "MaxRFIDCodeLength" "\x00" + "MaxSearchCounter" "\x00" + "MaxSinkTableEntries" "\x00" "MaxTempExperienced" "\x00" "Measured11thHarmonicCurrent" "\x00" "Measured1stHarmonicCurrent" "\x00" @@ -510,6 +520,8 @@ const char Z_strings[] PROGMEM = "MultiValue" "\x00" "MultipleScheduling" "\x00" "NeutralCurrent" "\x00" + "NotificationRetryNumber" "\x00" + "NotificationRetryTimer" "\x00" "NumberOfDevices" "\x00" "NumberOfHolidaySchedulesSupported" "\x00" "NumberOfLogRecordsSupported" "\x00" @@ -596,6 +608,7 @@ const char Z_strings[] PROGMEM = "ProductCode" "\x00" "ProductRevision" "\x00" "ProductURL" "\x00" + "ProxyTable" "\x00" "QualityMeasure" "\x00" "RGB" "\x00" "RHDehumidificationSetpoint" "\x00" @@ -661,6 +674,11 @@ const char Z_strings[] PROGMEM = "SceneValid" "\x00" "ScheduleMode" "\x00" "SeaPressure" "\x00" + "SecurityLevel" "\x00" + "ServerActiveFunctionality" "\x00" + "ServerFunctionality" "\x00" + "SharedSecurityKey" "\x00" + "SharedSecurityKeyType" "\x00" "ShortPollInterval" "\x00" "Shutter" "\x00" "ShutterClose" "\x00" @@ -668,6 +686,7 @@ const char Z_strings[] PROGMEM = "ShutterOpen" "\x00" "ShutterStop" "\x00" "ShutterTilt" "\x00" + "SinkTable" "\x00" "SoftwareRevision" "\x00" "StackVersion" "\x00" "StandardTime" "\x00" @@ -921,519 +940,538 @@ enum Z_offsets { Zo_BinaryRelinquishDefault = 3108, Zo_BinaryStatusFlags = 3132, Zo_BinaryValue = 3150, - Zo_CIE = 3162, - Zo_CO = 3166, - Zo_CT = 3169, - Zo_CalculationPeriod = 3172, - Zo_CheckinInterval = 3190, - Zo_CheckinIntervalMin = 3206, - Zo_ClosedLimit = 3225, - Zo_Color = 3237, - Zo_ColorCapabilities = 3243, - Zo_ColorLoopActive = 3261, - Zo_ColorLoopDirection = 3277, - Zo_ColorLoopStartEnhancedHue = 3296, - Zo_ColorLoopStoredEnhancedHue = 3322, - Zo_ColorLoopTime = 3349, - Zo_ColorMode = 3363, - Zo_ColorMove = 3373, - Zo_ColorPointBIntensity = 3383, - Zo_ColorPointBX = 3404, - Zo_ColorPointBY = 3417, - Zo_ColorPointGIntensity = 3430, - Zo_ColorPointGX = 3451, - Zo_ColorPointGY = 3464, - Zo_ColorPointRIntensity = 3477, - Zo_ColorPointRX = 3498, - Zo_ColorPointRY = 3511, - Zo_ColorStep = 3524, - Zo_ColorTempMove = 3534, - Zo_ColorTempMoveDown = 3548, - Zo_ColorTempMoveStop = 3566, - Zo_ColorTempMoveUp = 3584, - Zo_ColorTempPhysicalMaxMireds = 3600, - Zo_ColorTempPhysicalMinMireds = 3627, - Zo_ColorTempStep = 3654, - Zo_ColorTempStepDown = 3668, - Zo_ColorTempStepUp = 3686, - Zo_CompanyName = 3702, - Zo_CompensationText = 3714, - Zo_ConfigStatus = 3731, - Zo_Contact = 3744, - Zo_ControlSequenceOfOperation = 3752, - Zo_Coordinate1 = 3779, - Zo_Coordinate2 = 3791, - Zo_Coordinate3 = 3803, - Zo_CurrentGroup = 3815, - Zo_CurrentPositionLift = 3828, - Zo_CurrentPositionLiftPercentage = 3848, - Zo_CurrentPositionTilt = 3878, - Zo_CurrentPositionTiltPercentage = 3898, - Zo_CurrentScene = 3928, - Zo_CurrentTemperature = 3941, - Zo_CurrentTemperatureSetPoint = 3960, - Zo_CurrentZoneSensitivityLevel = 3987, - Zo_CustomerName = 4015, - Zo_DCCurrent = 4028, - Zo_DCCurrentDivisor = 4038, - Zo_DCCurrentMax = 4055, - Zo_DCCurrentMin = 4068, - Zo_DCCurrentMultiplier = 4081, - Zo_DCCurrentOverload = 4101, - Zo_DCOverloadAlarmsMask = 4119, - Zo_DCPower = 4140, - Zo_DCPowerDivisor = 4148, - Zo_DCPowerMax = 4163, - Zo_DCPowerMin = 4174, - Zo_DCPowerMultiplier = 4185, - Zo_DCVoltage = 4203, - Zo_DCVoltageDivisor = 4213, - Zo_DCVoltageMax = 4230, - Zo_DCVoltageMin = 4243, - Zo_DCVoltageMultiplier = 4256, - Zo_DCVoltageOverload = 4276, - Zo_DataQualityID = 4294, - Zo_DateCode = 4308, - Zo_DecelerationTimeLift = 4317, - Zo_DefaultMoveRate = 4338, - Zo_DehumidificationCooling = 4354, - Zo_DehumidificationHysteresis = 4378, - Zo_DehumidificationLockout = 4405, - Zo_DehumidificationMaxCool = 4429, - Zo_DeviceEnabled = 4453, - Zo_DeviceTempAlarmMask = 4467, - Zo_Dimmer = 4487, - Zo_DimmerDown = 4494, - Zo_DimmerMove = 4505, - Zo_DimmerOptions = 4516, - Zo_DimmerRemainingTime = 4530, - Zo_DimmerStep = 4550, - Zo_DimmerStepDown = 4561, - Zo_DimmerStepUp = 4576, - Zo_DimmerStop = 4589, - Zo_DimmerUp = 4600, - Zo_DisableLocalConfig = 4609, - Zo_DoorClosedEvents = 4628, - Zo_DoorOpenEvents = 4645, - Zo_DoorState = 4660, - Zo_DriftCompensation = 4670, - Zo_DstEnd = 4688, - Zo_DstShift = 4695, - Zo_DstStart = 4704, - Zo_ElectricalMeasurementType = 4713, - Zo_EnergyFormatting = 4739, - Zo_EnergyRemote = 4756, - Zo_EnergyTotal = 4769, - Zo_EnhancedColorMode = 4781, - Zo_EnhancedCurrentHue = 4799, - Zo_EurotronicErrors = 4818, - Zo_EurotronicHostFlags = 4835, - Zo_FanMode = 4855, - Zo_FanModeSequence = 4863, - Zo_FastPollTimeout = 4879, - Zo_FastPollTimeoutMax = 4895, - Zo_Fire = 4914, - Zo_FlowMaxMeasuredValue = 4919, - Zo_FlowMinMeasuredValue = 4940, - Zo_FlowRate = 4961, - Zo_FlowTolerance = 4970, - Zo_GenericDeviceClass = 4984, - Zo_GenericDeviceType = 5003, - Zo_GetAllGroups = 5021, - Zo_GetGroup = 5034, - Zo_GetSceneMembership = 5043, - Zo_GlassBreak = 5062, - Zo_GroupNameSupport = 5073, - Zo_HVACSystemTypeConfiguration = 5090, - Zo_HWVersion = 5118, - Zo_HarmonicCurrentMultiplier = 5128, - Zo_HighTempDwellTripPoint = 5154, - Zo_HighTempThreshold = 5177, - Zo_Hue = 5195, - Zo_HueMove = 5199, - Zo_HueSat = 5207, - Zo_HueStep = 5214, - Zo_HueStepDown = 5222, - Zo_HueStepUp = 5234, - Zo_Humidity = 5244, - Zo_HumidityMaxMeasuredValue = 5253, - Zo_HumidityMinMeasuredValue = 5278, - Zo_HumidityTolerance = 5303, - Zo_IASCIEAddress = 5321, - Zo_Identify = 5335, - Zo_IdentifyQuery = 5344, - Zo_IdentifyTime = 5358, - Zo_Illuminance = 5371, - Zo_IlluminanceLevelStatus = 5383, - Zo_IlluminanceLightSensorType = 5406, - Zo_IlluminanceMaxMeasuredValue = 5433, - Zo_IlluminanceMinMeasuredValue = 5461, - Zo_IlluminanceTargetLevel = 5489, - Zo_IlluminanceTolerance = 5512, - Zo_InstalledClosedLimitLift = 5533, - Zo_InstalledClosedLimitTilt = 5558, - Zo_InstalledOpenLimitLift = 5583, - Zo_InstalledOpenLimitTilt = 5606, - Zo_IntermediateSetpointsLift = 5629, - Zo_IntermediateSetpointsTilt = 5655, - Zo_IntrinsicBallastFactor = 5681, - Zo_LampAlarmMode = 5704, - Zo_LampBurnHours = 5718, - Zo_LampBurnHoursTripPoint = 5732, - Zo_LampManufacturer = 5755, - Zo_LampRatedHours = 5772, - Zo_LampType = 5787, - Zo_LastConfiguredBy = 5796, - Zo_LastMessageLQI = 5813, - Zo_LastMessageRSSI = 5828, - Zo_LastSetTime = 5844, - Zo_LegrandHeatingMode = 5856, - Zo_LegrandMode = 5875, - Zo_LegrandOpt1 = 5887, - Zo_LegrandOpt2 = 5899, - Zo_LegrandOpt3 = 5911, - Zo_LidlPower = 5923, - Zo_LineCurrent = 5933, - Zo_LineCurrentPhB = 5945, - Zo_LineCurrentPhC = 5960, - Zo_LocalTemperature = 5975, - Zo_LocalTemperatureCalibration = 5992, - Zo_LocalTime = 6020, - Zo_LocationAge = 6030, - Zo_LocationDescription = 6042, - Zo_LocationMethod = 6062, - Zo_LocationPower = 6077, - Zo_LocationType = 6091, - Zo_LockAlarmMask = 6104, - Zo_LockDefaultConfigurationRegister = 6118, - Zo_LockEnableInsideStatusLED = 6151, - Zo_LockEnableLocalProgramming = 6177, - Zo_LockEnableLogging = 6204, - Zo_LockEnableOneTouchLocking = 6222, - Zo_LockEnablePrivacyModeButton = 6248, - Zo_LockKeypadOperationEventMask = 6276, - Zo_LockKeypadProgrammingEventMask = 6305, - Zo_LockLEDSettings = 6336, - Zo_LockLanguage = 6352, - Zo_LockManualOperationEventMask = 6365, - Zo_LockOperatingMode = 6394, - Zo_LockRFIDOperationEventMask = 6412, - Zo_LockRFIDProgrammingEventMask = 6439, - Zo_LockRFOperationEventMask = 6468, - Zo_LockRFProgrammingEventMask = 6493, - Zo_LockSoundVolume = 6520, - Zo_LockState = 6536, - Zo_LockSupportedOperatingModes = 6546, - Zo_LockType = 6574, - Zo_LongPollInterval = 6583, - Zo_LongPollIntervalMin = 6600, - Zo_LowTempDwellTripPoint = 6620, - Zo_LowTempThreshold = 6642, - Zo_MainsAlarmMask = 6659, - Zo_MainsFrequency = 6674, - Zo_MainsVoltage = 6689, - Zo_MainsVoltageDwellTripPoint = 6702, - Zo_MainsVoltageMaxThreshold = 6729, - Zo_MainsVoltageMinThreshold = 6754, - Zo_Manufacturer = 6779, - Zo_MaxCoolSetpointLimit = 6792, - Zo_MaxHeatSetpointLimit = 6813, - Zo_MaxPINCodeLength = 6834, - Zo_MaxRFIDCodeLength = 6851, - Zo_MaxTempExperienced = 6869, - Zo_Measured11thHarmonicCurrent = 6888, - Zo_Measured1stHarmonicCurrent = 6916, - Zo_Measured3rdHarmonicCurrent = 6943, - Zo_Measured5thHarmonicCurrent = 6970, - Zo_Measured7thHarmonicCurrent = 6997, - Zo_Measured9thHarmonicCurrent = 7024, - Zo_MeasuredPhase11thHarmonicCurrent = 7051, - Zo_MeasuredPhase1stHarmonicCurrent = 7084, - Zo_MeasuredPhase3rdHarmonicCurrent = 7116, - Zo_MeasuredPhase5thHarmonicCurrent = 7148, - Zo_MeasuredPhase7thHarmonicCurrent = 7180, - Zo_MeasuredPhase9thHarmonicCurrent = 7212, - Zo_MeterTypeID = 7244, - Zo_MinCoolSetpointLimit = 7256, - Zo_MinHeatSetpointLimit = 7277, - Zo_MinPINCodeLength = 7298, - Zo_MinRFIDCodeLength = 7315, - Zo_MinSetpointDeadBand = 7333, - Zo_MinTempExperienced = 7353, - Zo_Mode = 7372, - Zo_Model = 7377, - Zo_ModelId = 7383, - Zo_MotorStepSize = 7391, - Zo_Movement = 7405, - Zo_MullerLightMode = 7414, - Zo_MultiApplicationType = 7430, - Zo_MultiDescription = 7451, - Zo_MultiInApplicationType = 7468, - Zo_MultiInDescription = 7491, - Zo_MultiInNumberOfStates = 7510, - Zo_MultiInOutOfService = 7532, - Zo_MultiInReliability = 7552, - Zo_MultiInStatusFlags = 7571, - Zo_MultiInValue = 7590, - Zo_MultiNumberOfStates = 7603, - Zo_MultiOutApplicationType = 7623, - Zo_MultiOutDescription = 7647, - Zo_MultiOutNumberOfStates = 7667, - Zo_MultiOutOfService = 7690, - Zo_MultiOutOutOfService = 7708, - Zo_MultiOutReliability = 7729, - Zo_MultiOutRelinquishDefault = 7749, - Zo_MultiOutStatusFlags = 7775, - Zo_MultiOutValue = 7795, - Zo_MultiReliability = 7809, - Zo_MultiRelinquishDefault = 7826, - Zo_MultiStatusFlags = 7849, - Zo_MultiValue = 7866, - Zo_MultipleScheduling = 7877, - Zo_NeutralCurrent = 7896, - Zo_NumberOfDevices = 7911, - Zo_NumberOfHolidaySchedulesSupported = 7927, - Zo_NumberOfLogRecordsSupported = 7961, - Zo_NumberOfPINUsersSupported = 7989, - Zo_NumberOfPrimaries = 8015, - Zo_NumberOfRFIDUsersSupported = 8033, - Zo_NumberOfResets = 8060, - Zo_NumberOfTotalUsersSupported = 8075, - Zo_NumberOfWeekDaySchedulesSupportedPerUser = 8103, - Zo_NumberOfYearDaySchedulesSupportedPerUser = 8144, - Zo_NumberOfZoneSensitivityLevelsSupported = 8185, - Zo_NumberRSSIMeasurements = 8224, - Zo_NumberofActuationsLift = 8247, - Zo_NumberofActuationsTilt = 8270, - Zo_Occupancy = 8293, - Zo_OccupancySensorType = 8303, - Zo_OccupiedCoolingSetpoint = 8323, - Zo_OccupiedHeatingSetpoint = 8347, - Zo_OffTransitionTime = 8371, - Zo_OffWaitTime = 8389, - Zo_OnLevel = 8401, - Zo_OnOff = 8409, - Zo_OnOffTransitionTime = 8415, - Zo_OnTime = 8435, - Zo_OnTransitionTime = 8442, - Zo_OpenPeriod = 8459, - Zo_OppleMode = 8470, - Zo_OutdoorTemperature = 8480, - Zo_OverTempTotalDwell = 8499, - Zo_PICoolingDemand = 8518, - Zo_PIHeatingDemand = 8534, - Zo_PIROccupiedToUnoccupiedDelay = 8550, - Zo_PIRUnoccupiedToOccupiedDelay = 8579, - Zo_PIRUnoccupiedToOccupiedThreshold = 8608, - Zo_POD = 8641, - Zo_Panic = 8645, - Zo_PartNumber = 8651, - Zo_PathLossExponent = 8662, - Zo_PersistentMemoryWrites = 8679, - Zo_PersonalAlarm = 8702, - Zo_PhaseHarmonicCurrentMultiplier = 8716, - Zo_PhysicalClosedLimit = 8747, - Zo_PhysicalClosedLimitLift = 8767, - Zo_PhysicalClosedLimitTilt = 8791, - Zo_PhysicalEnvironment = 8815, - Zo_Power = 8835, - Zo_PowerDivisor = 8841, - Zo_PowerFactor = 8854, - Zo_PowerFactorPhB = 8866, - Zo_PowerFactorPhC = 8881, - Zo_PowerMultiplier = 8896, - Zo_PowerOffEffect = 8912, - Zo_PowerOnRecall = 8927, - Zo_PowerOnTimer = 8941, - Zo_PowerSource = 8954, - Zo_PowerThreshold = 8966, - Zo_Pressure = 8981, - Zo_PressureMaxMeasuredValue = 8990, - Zo_PressureMaxScaledValue = 9015, - Zo_PressureMinMeasuredValue = 9038, - Zo_PressureMinScaledValue = 9063, - Zo_PressureScale = 9086, - Zo_PressureScaledTolerance = 9100, - Zo_PressureScaledValue = 9124, - Zo_PressureTolerance = 9144, - Zo_Primary1Intensity = 9162, - Zo_Primary1X = 9180, - Zo_Primary1Y = 9190, - Zo_Primary2Intensity = 9200, - Zo_Primary2X = 9218, - Zo_Primary2Y = 9228, - Zo_Primary3Intensity = 9238, - Zo_Primary3X = 9256, - Zo_Primary3Y = 9266, - Zo_Primary4Intensity = 9276, - Zo_Primary4X = 9294, - Zo_Primary4Y = 9304, - Zo_Primary5Intensity = 9314, - Zo_Primary5X = 9332, - Zo_Primary5Y = 9342, - Zo_Primary6Intensity = 9352, - Zo_Primary6X = 9370, - Zo_Primary6Y = 9380, - Zo_ProductCode = 9390, - Zo_ProductRevision = 9402, - Zo_ProductURL = 9418, - Zo_QualityMeasure = 9429, - Zo_RGB = 9444, - Zo_RHDehumidificationSetpoint = 9448, - Zo_RMSCurrent = 9475, - Zo_RMSCurrentMax = 9486, - Zo_RMSCurrentMaxPhB = 9500, - Zo_RMSCurrentMaxPhC = 9517, - Zo_RMSCurrentMin = 9534, - Zo_RMSCurrentMinPhB = 9548, - Zo_RMSCurrentMinPhC = 9565, - Zo_RMSCurrentPhB = 9582, - Zo_RMSCurrentPhC = 9596, - Zo_RMSExtremeOverVoltage = 9610, - Zo_RMSExtremeOverVoltagePeriod = 9632, - Zo_RMSExtremeOverVoltagePeriodPhB = 9660, - Zo_RMSExtremeOverVoltagePeriodPhC = 9691, - Zo_RMSExtremeUnderVoltage = 9722, - Zo_RMSExtremeUnderVoltagePeriod = 9745, - Zo_RMSExtremeUnderVoltagePeriodPhB = 9774, - Zo_RMSExtremeUnderVoltagePeriodPhC = 9806, - Zo_RMSVoltage = 9838, - Zo_RMSVoltageMax = 9849, - Zo_RMSVoltageMaxPhB = 9863, - Zo_RMSVoltageMaxPhC = 9880, - Zo_RMSVoltageMin = 9897, - Zo_RMSVoltageMinPhB = 9911, - Zo_RMSVoltageMinPhC = 9928, - Zo_RMSVoltagePhB = 9945, - Zo_RMSVoltagePhC = 9959, - Zo_RMSVoltageSag = 9973, - Zo_RMSVoltageSagPeriod = 9987, - Zo_RMSVoltageSagPeriodPhB = 10007, - Zo_RMSVoltageSagPeriodPhC = 10030, - Zo_RMSVoltageSwell = 10053, - Zo_RMSVoltageSwellPeriod = 10069, - Zo_RMSVoltageSwellPeriodPhB = 10091, - Zo_RMSVoltageSwellPeriodPhC = 10116, - Zo_ReactiveCurrent = 10141, - Zo_ReactiveCurrentPhB = 10157, - Zo_ReactiveCurrentPhC = 10176, - Zo_ReactivePower = 10195, - Zo_ReactivePowerPhB = 10209, - Zo_ReactivePowerPhC = 10226, - Zo_RecallScene = 10243, - Zo_RelativeHumidity = 10255, - Zo_RelativeHumidityDisplay = 10272, - Zo_RelativeHumidityMode = 10296, - Zo_RemainingTime = 10317, - Zo_RemoteSensing = 10331, - Zo_RemoveAllGroups = 10345, - Zo_RemoveAllScenes = 10361, - Zo_RemoveGroup = 10377, - Zo_RemoveScene = 10389, - Zo_ReportingPeriod = 10401, - Zo_ResetAlarm = 10417, - Zo_ResetAllAlarms = 10428, - Zo_SWBuildID = 10443, - Zo_Sat = 10453, - Zo_SatMove = 10457, - Zo_SatStep = 10465, - Zo_SceneCount = 10473, - Zo_SceneNameSupport = 10484, - Zo_SceneValid = 10501, - Zo_ScheduleMode = 10512, - Zo_SeaPressure = 10525, - Zo_ShortPollInterval = 10537, - Zo_Shutter = 10555, - Zo_ShutterClose = 10563, - Zo_ShutterLift = 10576, - Zo_ShutterOpen = 10588, - Zo_ShutterStop = 10600, - Zo_ShutterTilt = 10612, - Zo_SoftwareRevision = 10624, - Zo_StackVersion = 10641, - Zo_StandardTime = 10654, - Zo_StartUpOnOff = 10667, - Zo_Status = 10680, - Zo_StoreScene = 10687, - Zo_SwitchActions = 10698, - Zo_SwitchType = 10712, - Zo_SystemMode = 10723, - Zo_TRVBoost = 10734, - Zo_TRVChildProtection = 10743, - Zo_TRVMirrorDisplay = 10762, - Zo_TRVMode = 10779, - Zo_TRVWindowOpen = 10787, - Zo_TempTarget = 10801, - Zo_Temperature = 10812, - Zo_TemperatureDisplayMode = 10824, - Zo_TemperatureMaxMeasuredValue = 10847, - Zo_TemperatureMinMeasuredValue = 10875, - Zo_TemperatureTolerance = 10903, - Zo_TerncyDuration = 10924, - Zo_TerncyRotate = 10939, - Zo_ThSetpoint = 10952, - Zo_ThermostatAlarmMask = 10963, - Zo_ThermostatKeypadLockout = 10983, - Zo_ThermostatOccupancy = 11007, - Zo_ThermostatRunningMode = 11027, - Zo_ThermostatScheduleProgrammingVisibility = 11049, - Zo_Time = 11089, - Zo_TimeEpoch = 11094, - Zo_TimeStatus = 11104, - Zo_TimeZone = 11115, - Zo_TotalActivePower = 11124, - Zo_TotalApparentPower = 11141, - Zo_TotalProfileNum = 11160, - Zo_TotalReactivePower = 11176, - Zo_TuyaCalibration = 11195, - Zo_TuyaCalibrationTime = 11211, - Zo_TuyaMCUVersion = 11231, - Zo_TuyaMotorReversal = 11246, - Zo_TuyaMovingState = 11264, - Zo_TuyaQuery = 11280, - Zo_UnoccupiedCoolingSetpoint = 11290, - Zo_UnoccupiedHeatingSetpoint = 11316, - Zo_UtilityName = 11342, - Zo_ValidUntilTime = 11354, - Zo_ValvePosition = 11369, - Zo_VelocityLift = 11383, - Zo_ViewGroup = 11396, - Zo_ViewScene = 11406, - Zo_Water = 11416, - Zo_WhitePointX = 11422, - Zo_WhitePointY = 11434, - Zo_WindowCoveringType = 11446, - Zo_X = 11465, - Zo_Y = 11467, - Zo_ZCLVersion = 11469, - Zo_ZoneID = 11480, - Zo_ZoneState = 11487, - Zo_ZoneStatus = 11497, - Zo_ZoneStatusChange = 11508, - Zo_ZoneType = 11525, - Zo__ = 11534, - Zo_xx = 11536, - Zo_xx000A00 = 11539, - Zo_xx0A = 11548, - Zo_xx0A00 = 11553, - Zo_xx19 = 11560, - Zo_xx190A = 11565, - Zo_xx190A00 = 11572, - Zo_xxxx = 11581, - Zo_xxxx00 = 11586, - Zo_xxxx0A00 = 11593, - Zo_xxxxyy = 11602, - Zo_xxxxyyyy = 11609, - Zo_xxxxyyyy0A00 = 11618, - Zo_xxxxyyzz = 11631, - Zo_xxyy = 11640, - Zo_xxyy0A00 = 11645, - Zo_xxyyyy = 11654, - Zo_xxyyyy000000000000 = 11661, - Zo_xxyyyy0A0000000000 = 11680, - Zo_xxyyyyzz = 11699, - Zo_xxyyyyzzzz = 11708, - Zo_xxyyzzzz = 11719, + Zo_BlockedGPDID = 3162, + Zo_CIE = 3175, + Zo_CO = 3179, + Zo_CT = 3182, + Zo_CalculationPeriod = 3185, + Zo_CcommissioningExitMode = 3203, + Zo_CheckinInterval = 3226, + Zo_CheckinIntervalMin = 3242, + Zo_ClientActiveFunctionality = 3261, + Zo_ClientFunctionality = 3287, + Zo_ClosedLimit = 3307, + Zo_Color = 3319, + Zo_ColorCapabilities = 3325, + Zo_ColorLoopActive = 3343, + Zo_ColorLoopDirection = 3359, + Zo_ColorLoopStartEnhancedHue = 3378, + Zo_ColorLoopStoredEnhancedHue = 3404, + Zo_ColorLoopTime = 3431, + Zo_ColorMode = 3445, + Zo_ColorMove = 3455, + Zo_ColorPointBIntensity = 3465, + Zo_ColorPointBX = 3486, + Zo_ColorPointBY = 3499, + Zo_ColorPointGIntensity = 3512, + Zo_ColorPointGX = 3533, + Zo_ColorPointGY = 3546, + Zo_ColorPointRIntensity = 3559, + Zo_ColorPointRX = 3580, + Zo_ColorPointRY = 3593, + Zo_ColorStep = 3606, + Zo_ColorTempMove = 3616, + Zo_ColorTempMoveDown = 3630, + Zo_ColorTempMoveStop = 3648, + Zo_ColorTempMoveUp = 3666, + Zo_ColorTempPhysicalMaxMireds = 3682, + Zo_ColorTempPhysicalMinMireds = 3709, + Zo_ColorTempStep = 3736, + Zo_ColorTempStepDown = 3750, + Zo_ColorTempStepUp = 3768, + Zo_CommissioningWindow = 3784, + Zo_CommunicationMode = 3804, + Zo_CompanyName = 3822, + Zo_CompensationText = 3834, + Zo_ConfigStatus = 3851, + Zo_Contact = 3864, + Zo_ControlSequenceOfOperation = 3872, + Zo_Coordinate1 = 3899, + Zo_Coordinate2 = 3911, + Zo_Coordinate3 = 3923, + Zo_CurrentGroup = 3935, + Zo_CurrentPositionLift = 3948, + Zo_CurrentPositionLiftPercentage = 3968, + Zo_CurrentPositionTilt = 3998, + Zo_CurrentPositionTiltPercentage = 4018, + Zo_CurrentScene = 4048, + Zo_CurrentTemperature = 4061, + Zo_CurrentTemperatureSetPoint = 4080, + Zo_CurrentZoneSensitivityLevel = 4107, + Zo_CustomerName = 4135, + Zo_DCCurrent = 4148, + Zo_DCCurrentDivisor = 4158, + Zo_DCCurrentMax = 4175, + Zo_DCCurrentMin = 4188, + Zo_DCCurrentMultiplier = 4201, + Zo_DCCurrentOverload = 4221, + Zo_DCOverloadAlarmsMask = 4239, + Zo_DCPower = 4260, + Zo_DCPowerDivisor = 4268, + Zo_DCPowerMax = 4283, + Zo_DCPowerMin = 4294, + Zo_DCPowerMultiplier = 4305, + Zo_DCVoltage = 4323, + Zo_DCVoltageDivisor = 4333, + Zo_DCVoltageMax = 4350, + Zo_DCVoltageMin = 4363, + Zo_DCVoltageMultiplier = 4376, + Zo_DCVoltageOverload = 4396, + Zo_DataQualityID = 4414, + Zo_DateCode = 4428, + Zo_DecelerationTimeLift = 4437, + Zo_DefaultMoveRate = 4458, + Zo_DehumidificationCooling = 4474, + Zo_DehumidificationHysteresis = 4498, + Zo_DehumidificationLockout = 4525, + Zo_DehumidificationMaxCool = 4549, + Zo_DeviceEnabled = 4573, + Zo_DeviceTempAlarmMask = 4587, + Zo_Dimmer = 4607, + Zo_DimmerDown = 4614, + Zo_DimmerMove = 4625, + Zo_DimmerOptions = 4636, + Zo_DimmerRemainingTime = 4650, + Zo_DimmerStep = 4670, + Zo_DimmerStepDown = 4681, + Zo_DimmerStepUp = 4696, + Zo_DimmerStop = 4709, + Zo_DimmerUp = 4720, + Zo_DisableLocalConfig = 4729, + Zo_DoorClosedEvents = 4748, + Zo_DoorOpenEvents = 4765, + Zo_DoorState = 4780, + Zo_DriftCompensation = 4790, + Zo_DstEnd = 4808, + Zo_DstShift = 4815, + Zo_DstStart = 4824, + Zo_ElectricalMeasurementType = 4833, + Zo_EnergyFormatting = 4859, + Zo_EnergyRemote = 4876, + Zo_EnergyTotal = 4889, + Zo_EnhancedColorMode = 4901, + Zo_EnhancedCurrentHue = 4919, + Zo_EurotronicErrors = 4938, + Zo_EurotronicHostFlags = 4955, + Zo_FanMode = 4975, + Zo_FanModeSequence = 4983, + Zo_FastPollTimeout = 4999, + Zo_FastPollTimeoutMax = 5015, + Zo_Fire = 5034, + Zo_FlowMaxMeasuredValue = 5039, + Zo_FlowMinMeasuredValue = 5060, + Zo_FlowRate = 5081, + Zo_FlowTolerance = 5090, + Zo_GenericDeviceClass = 5104, + Zo_GenericDeviceType = 5123, + Zo_GetAllGroups = 5141, + Zo_GetGroup = 5154, + Zo_GetSceneMembership = 5163, + Zo_GlassBreak = 5182, + Zo_GroupNameSupport = 5193, + Zo_HVACSystemTypeConfiguration = 5210, + Zo_HWVersion = 5238, + Zo_HarmonicCurrentMultiplier = 5248, + Zo_HighTempDwellTripPoint = 5274, + Zo_HighTempThreshold = 5297, + Zo_Hue = 5315, + Zo_HueMove = 5319, + Zo_HueSat = 5327, + Zo_HueStep = 5334, + Zo_HueStepDown = 5342, + Zo_HueStepUp = 5354, + Zo_Humidity = 5364, + Zo_HumidityMaxMeasuredValue = 5373, + Zo_HumidityMinMeasuredValue = 5398, + Zo_HumidityTolerance = 5423, + Zo_IASCIEAddress = 5441, + Zo_Identify = 5455, + Zo_IdentifyQuery = 5464, + Zo_IdentifyTime = 5478, + Zo_Illuminance = 5491, + Zo_IlluminanceLevelStatus = 5503, + Zo_IlluminanceLightSensorType = 5526, + Zo_IlluminanceMaxMeasuredValue = 5553, + Zo_IlluminanceMinMeasuredValue = 5581, + Zo_IlluminanceTargetLevel = 5609, + Zo_IlluminanceTolerance = 5632, + Zo_InstalledClosedLimitLift = 5653, + Zo_InstalledClosedLimitTilt = 5678, + Zo_InstalledOpenLimitLift = 5703, + Zo_InstalledOpenLimitTilt = 5726, + Zo_IntermediateSetpointsLift = 5749, + Zo_IntermediateSetpointsTilt = 5775, + Zo_IntrinsicBallastFactor = 5801, + Zo_LampAlarmMode = 5824, + Zo_LampBurnHours = 5838, + Zo_LampBurnHoursTripPoint = 5852, + Zo_LampManufacturer = 5875, + Zo_LampRatedHours = 5892, + Zo_LampType = 5907, + Zo_LastConfiguredBy = 5916, + Zo_LastMessageLQI = 5933, + Zo_LastMessageRSSI = 5948, + Zo_LastSetTime = 5964, + Zo_LegrandHeatingMode = 5976, + Zo_LegrandMode = 5995, + Zo_LegrandOpt1 = 6007, + Zo_LegrandOpt2 = 6019, + Zo_LegrandOpt3 = 6031, + Zo_LidlPower = 6043, + Zo_LineCurrent = 6053, + Zo_LineCurrentPhB = 6065, + Zo_LineCurrentPhC = 6080, + Zo_LinkKey = 6095, + Zo_LocalTemperature = 6103, + Zo_LocalTemperatureCalibration = 6120, + Zo_LocalTime = 6148, + Zo_LocationAge = 6158, + Zo_LocationDescription = 6170, + Zo_LocationMethod = 6190, + Zo_LocationPower = 6205, + Zo_LocationType = 6219, + Zo_LockAlarmMask = 6232, + Zo_LockDefaultConfigurationRegister = 6246, + Zo_LockEnableInsideStatusLED = 6279, + Zo_LockEnableLocalProgramming = 6305, + Zo_LockEnableLogging = 6332, + Zo_LockEnableOneTouchLocking = 6350, + Zo_LockEnablePrivacyModeButton = 6376, + Zo_LockKeypadOperationEventMask = 6404, + Zo_LockKeypadProgrammingEventMask = 6433, + Zo_LockLEDSettings = 6464, + Zo_LockLanguage = 6480, + Zo_LockManualOperationEventMask = 6493, + Zo_LockOperatingMode = 6522, + Zo_LockRFIDOperationEventMask = 6540, + Zo_LockRFIDProgrammingEventMask = 6567, + Zo_LockRFOperationEventMask = 6596, + Zo_LockRFProgrammingEventMask = 6621, + Zo_LockSoundVolume = 6648, + Zo_LockState = 6664, + Zo_LockSupportedOperatingModes = 6674, + Zo_LockType = 6702, + Zo_LongPollInterval = 6711, + Zo_LongPollIntervalMin = 6728, + Zo_LowTempDwellTripPoint = 6748, + Zo_LowTempThreshold = 6770, + Zo_MainsAlarmMask = 6787, + Zo_MainsFrequency = 6802, + Zo_MainsVoltage = 6817, + Zo_MainsVoltageDwellTripPoint = 6830, + Zo_MainsVoltageMaxThreshold = 6857, + Zo_MainsVoltageMinThreshold = 6882, + Zo_Manufacturer = 6907, + Zo_MaxCoolSetpointLimit = 6920, + Zo_MaxHeatSetpointLimit = 6941, + Zo_MaxPINCodeLength = 6962, + Zo_MaxProxyTableEntries = 6979, + Zo_MaxRFIDCodeLength = 7000, + Zo_MaxSearchCounter = 7018, + Zo_MaxSinkTableEntries = 7035, + Zo_MaxTempExperienced = 7055, + Zo_Measured11thHarmonicCurrent = 7074, + Zo_Measured1stHarmonicCurrent = 7102, + Zo_Measured3rdHarmonicCurrent = 7129, + Zo_Measured5thHarmonicCurrent = 7156, + Zo_Measured7thHarmonicCurrent = 7183, + Zo_Measured9thHarmonicCurrent = 7210, + Zo_MeasuredPhase11thHarmonicCurrent = 7237, + Zo_MeasuredPhase1stHarmonicCurrent = 7270, + Zo_MeasuredPhase3rdHarmonicCurrent = 7302, + Zo_MeasuredPhase5thHarmonicCurrent = 7334, + Zo_MeasuredPhase7thHarmonicCurrent = 7366, + Zo_MeasuredPhase9thHarmonicCurrent = 7398, + Zo_MeterTypeID = 7430, + Zo_MinCoolSetpointLimit = 7442, + Zo_MinHeatSetpointLimit = 7463, + Zo_MinPINCodeLength = 7484, + Zo_MinRFIDCodeLength = 7501, + Zo_MinSetpointDeadBand = 7519, + Zo_MinTempExperienced = 7539, + Zo_Mode = 7558, + Zo_Model = 7563, + Zo_ModelId = 7569, + Zo_MotorStepSize = 7577, + Zo_Movement = 7591, + Zo_MullerLightMode = 7600, + Zo_MultiApplicationType = 7616, + Zo_MultiDescription = 7637, + Zo_MultiInApplicationType = 7654, + Zo_MultiInDescription = 7677, + Zo_MultiInNumberOfStates = 7696, + Zo_MultiInOutOfService = 7718, + Zo_MultiInReliability = 7738, + Zo_MultiInStatusFlags = 7757, + Zo_MultiInValue = 7776, + Zo_MultiNumberOfStates = 7789, + Zo_MultiOutApplicationType = 7809, + Zo_MultiOutDescription = 7833, + Zo_MultiOutNumberOfStates = 7853, + Zo_MultiOutOfService = 7876, + Zo_MultiOutOutOfService = 7894, + Zo_MultiOutReliability = 7915, + Zo_MultiOutRelinquishDefault = 7935, + Zo_MultiOutStatusFlags = 7961, + Zo_MultiOutValue = 7981, + Zo_MultiReliability = 7995, + Zo_MultiRelinquishDefault = 8012, + Zo_MultiStatusFlags = 8035, + Zo_MultiValue = 8052, + Zo_MultipleScheduling = 8063, + Zo_NeutralCurrent = 8082, + Zo_NotificationRetryNumber = 8097, + Zo_NotificationRetryTimer = 8121, + Zo_NumberOfDevices = 8144, + Zo_NumberOfHolidaySchedulesSupported = 8160, + Zo_NumberOfLogRecordsSupported = 8194, + Zo_NumberOfPINUsersSupported = 8222, + Zo_NumberOfPrimaries = 8248, + Zo_NumberOfRFIDUsersSupported = 8266, + Zo_NumberOfResets = 8293, + Zo_NumberOfTotalUsersSupported = 8308, + Zo_NumberOfWeekDaySchedulesSupportedPerUser = 8336, + Zo_NumberOfYearDaySchedulesSupportedPerUser = 8377, + Zo_NumberOfZoneSensitivityLevelsSupported = 8418, + Zo_NumberRSSIMeasurements = 8457, + Zo_NumberofActuationsLift = 8480, + Zo_NumberofActuationsTilt = 8503, + Zo_Occupancy = 8526, + Zo_OccupancySensorType = 8536, + Zo_OccupiedCoolingSetpoint = 8556, + Zo_OccupiedHeatingSetpoint = 8580, + Zo_OffTransitionTime = 8604, + Zo_OffWaitTime = 8622, + Zo_OnLevel = 8634, + Zo_OnOff = 8642, + Zo_OnOffTransitionTime = 8648, + Zo_OnTime = 8668, + Zo_OnTransitionTime = 8675, + Zo_OpenPeriod = 8692, + Zo_OppleMode = 8703, + Zo_OutdoorTemperature = 8713, + Zo_OverTempTotalDwell = 8732, + Zo_PICoolingDemand = 8751, + Zo_PIHeatingDemand = 8767, + Zo_PIROccupiedToUnoccupiedDelay = 8783, + Zo_PIRUnoccupiedToOccupiedDelay = 8812, + Zo_PIRUnoccupiedToOccupiedThreshold = 8841, + Zo_POD = 8874, + Zo_Panic = 8878, + Zo_PartNumber = 8884, + Zo_PathLossExponent = 8895, + Zo_PersistentMemoryWrites = 8912, + Zo_PersonalAlarm = 8935, + Zo_PhaseHarmonicCurrentMultiplier = 8949, + Zo_PhysicalClosedLimit = 8980, + Zo_PhysicalClosedLimitLift = 9000, + Zo_PhysicalClosedLimitTilt = 9024, + Zo_PhysicalEnvironment = 9048, + Zo_Power = 9068, + Zo_PowerDivisor = 9074, + Zo_PowerFactor = 9087, + Zo_PowerFactorPhB = 9099, + Zo_PowerFactorPhC = 9114, + Zo_PowerMultiplier = 9129, + Zo_PowerOffEffect = 9145, + Zo_PowerOnRecall = 9160, + Zo_PowerOnTimer = 9174, + Zo_PowerSource = 9187, + Zo_PowerThreshold = 9199, + Zo_Pressure = 9214, + Zo_PressureMaxMeasuredValue = 9223, + Zo_PressureMaxScaledValue = 9248, + Zo_PressureMinMeasuredValue = 9271, + Zo_PressureMinScaledValue = 9296, + Zo_PressureScale = 9319, + Zo_PressureScaledTolerance = 9333, + Zo_PressureScaledValue = 9357, + Zo_PressureTolerance = 9377, + Zo_Primary1Intensity = 9395, + Zo_Primary1X = 9413, + Zo_Primary1Y = 9423, + Zo_Primary2Intensity = 9433, + Zo_Primary2X = 9451, + Zo_Primary2Y = 9461, + Zo_Primary3Intensity = 9471, + Zo_Primary3X = 9489, + Zo_Primary3Y = 9499, + Zo_Primary4Intensity = 9509, + Zo_Primary4X = 9527, + Zo_Primary4Y = 9537, + Zo_Primary5Intensity = 9547, + Zo_Primary5X = 9565, + Zo_Primary5Y = 9575, + Zo_Primary6Intensity = 9585, + Zo_Primary6X = 9603, + Zo_Primary6Y = 9613, + Zo_ProductCode = 9623, + Zo_ProductRevision = 9635, + Zo_ProductURL = 9651, + Zo_ProxyTable = 9662, + Zo_QualityMeasure = 9673, + Zo_RGB = 9688, + Zo_RHDehumidificationSetpoint = 9692, + Zo_RMSCurrent = 9719, + Zo_RMSCurrentMax = 9730, + Zo_RMSCurrentMaxPhB = 9744, + Zo_RMSCurrentMaxPhC = 9761, + Zo_RMSCurrentMin = 9778, + Zo_RMSCurrentMinPhB = 9792, + Zo_RMSCurrentMinPhC = 9809, + Zo_RMSCurrentPhB = 9826, + Zo_RMSCurrentPhC = 9840, + Zo_RMSExtremeOverVoltage = 9854, + Zo_RMSExtremeOverVoltagePeriod = 9876, + Zo_RMSExtremeOverVoltagePeriodPhB = 9904, + Zo_RMSExtremeOverVoltagePeriodPhC = 9935, + Zo_RMSExtremeUnderVoltage = 9966, + Zo_RMSExtremeUnderVoltagePeriod = 9989, + Zo_RMSExtremeUnderVoltagePeriodPhB = 10018, + Zo_RMSExtremeUnderVoltagePeriodPhC = 10050, + Zo_RMSVoltage = 10082, + Zo_RMSVoltageMax = 10093, + Zo_RMSVoltageMaxPhB = 10107, + Zo_RMSVoltageMaxPhC = 10124, + Zo_RMSVoltageMin = 10141, + Zo_RMSVoltageMinPhB = 10155, + Zo_RMSVoltageMinPhC = 10172, + Zo_RMSVoltagePhB = 10189, + Zo_RMSVoltagePhC = 10203, + Zo_RMSVoltageSag = 10217, + Zo_RMSVoltageSagPeriod = 10231, + Zo_RMSVoltageSagPeriodPhB = 10251, + Zo_RMSVoltageSagPeriodPhC = 10274, + Zo_RMSVoltageSwell = 10297, + Zo_RMSVoltageSwellPeriod = 10313, + Zo_RMSVoltageSwellPeriodPhB = 10335, + Zo_RMSVoltageSwellPeriodPhC = 10360, + Zo_ReactiveCurrent = 10385, + Zo_ReactiveCurrentPhB = 10401, + Zo_ReactiveCurrentPhC = 10420, + Zo_ReactivePower = 10439, + Zo_ReactivePowerPhB = 10453, + Zo_ReactivePowerPhC = 10470, + Zo_RecallScene = 10487, + Zo_RelativeHumidity = 10499, + Zo_RelativeHumidityDisplay = 10516, + Zo_RelativeHumidityMode = 10540, + Zo_RemainingTime = 10561, + Zo_RemoteSensing = 10575, + Zo_RemoveAllGroups = 10589, + Zo_RemoveAllScenes = 10605, + Zo_RemoveGroup = 10621, + Zo_RemoveScene = 10633, + Zo_ReportingPeriod = 10645, + Zo_ResetAlarm = 10661, + Zo_ResetAllAlarms = 10672, + Zo_SWBuildID = 10687, + Zo_Sat = 10697, + Zo_SatMove = 10701, + Zo_SatStep = 10709, + Zo_SceneCount = 10717, + Zo_SceneNameSupport = 10728, + Zo_SceneValid = 10745, + Zo_ScheduleMode = 10756, + Zo_SeaPressure = 10769, + Zo_SecurityLevel = 10781, + Zo_ServerActiveFunctionality = 10795, + Zo_ServerFunctionality = 10821, + Zo_SharedSecurityKey = 10841, + Zo_SharedSecurityKeyType = 10859, + Zo_ShortPollInterval = 10881, + Zo_Shutter = 10899, + Zo_ShutterClose = 10907, + Zo_ShutterLift = 10920, + Zo_ShutterOpen = 10932, + Zo_ShutterStop = 10944, + Zo_ShutterTilt = 10956, + Zo_SinkTable = 10968, + Zo_SoftwareRevision = 10978, + Zo_StackVersion = 10995, + Zo_StandardTime = 11008, + Zo_StartUpOnOff = 11021, + Zo_Status = 11034, + Zo_StoreScene = 11041, + Zo_SwitchActions = 11052, + Zo_SwitchType = 11066, + Zo_SystemMode = 11077, + Zo_TRVBoost = 11088, + Zo_TRVChildProtection = 11097, + Zo_TRVMirrorDisplay = 11116, + Zo_TRVMode = 11133, + Zo_TRVWindowOpen = 11141, + Zo_TempTarget = 11155, + Zo_Temperature = 11166, + Zo_TemperatureDisplayMode = 11178, + Zo_TemperatureMaxMeasuredValue = 11201, + Zo_TemperatureMinMeasuredValue = 11229, + Zo_TemperatureTolerance = 11257, + Zo_TerncyDuration = 11278, + Zo_TerncyRotate = 11293, + Zo_ThSetpoint = 11306, + Zo_ThermostatAlarmMask = 11317, + Zo_ThermostatKeypadLockout = 11337, + Zo_ThermostatOccupancy = 11361, + Zo_ThermostatRunningMode = 11381, + Zo_ThermostatScheduleProgrammingVisibility = 11403, + Zo_Time = 11443, + Zo_TimeEpoch = 11448, + Zo_TimeStatus = 11458, + Zo_TimeZone = 11469, + Zo_TotalActivePower = 11478, + Zo_TotalApparentPower = 11495, + Zo_TotalProfileNum = 11514, + Zo_TotalReactivePower = 11530, + Zo_TuyaCalibration = 11549, + Zo_TuyaCalibrationTime = 11565, + Zo_TuyaMCUVersion = 11585, + Zo_TuyaMotorReversal = 11600, + Zo_TuyaMovingState = 11618, + Zo_TuyaQuery = 11634, + Zo_UnoccupiedCoolingSetpoint = 11644, + Zo_UnoccupiedHeatingSetpoint = 11670, + Zo_UtilityName = 11696, + Zo_ValidUntilTime = 11708, + Zo_ValvePosition = 11723, + Zo_VelocityLift = 11737, + Zo_ViewGroup = 11750, + Zo_ViewScene = 11760, + Zo_Water = 11770, + Zo_WhitePointX = 11776, + Zo_WhitePointY = 11788, + Zo_WindowCoveringType = 11800, + Zo_X = 11819, + Zo_Y = 11821, + Zo_ZCLVersion = 11823, + Zo_ZoneID = 11834, + Zo_ZoneState = 11841, + Zo_ZoneStatus = 11851, + Zo_ZoneStatusChange = 11862, + Zo_ZoneType = 11879, + Zo__ = 11888, + Zo_xx = 11890, + Zo_xx000A00 = 11893, + Zo_xx0A = 11902, + Zo_xx0A00 = 11907, + Zo_xx19 = 11914, + Zo_xx190A = 11919, + Zo_xx190A00 = 11926, + Zo_xxxx = 11935, + Zo_xxxx00 = 11940, + Zo_xxxx0A00 = 11947, + Zo_xxxxyy = 11956, + Zo_xxxxyyyy = 11963, + Zo_xxxxyyyy0A00 = 11972, + Zo_xxxxyyzz = 11985, + Zo_xxyy = 11994, + Zo_xxyy0A00 = 11999, + Zo_xxyyyy = 12008, + Zo_xxyyyy000000000000 = 12015, + Zo_xxyyyy0A0000000000 = 12034, + Zo_xxyyyyzz = 12053, + Zo_xxyyyyzzzz = 12062, + Zo_xxyyzzzz = 12073, }; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino index bae1ad62e..7d9daf00c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_1_attributes.ino @@ -187,8 +187,8 @@ const uint8_t Z_EXPORT_DATA = 0x80; enum Cx_cluster_short { Cx0000, Cx0001, Cx0002, Cx0003, Cx0004, Cx0005, Cx0006, Cx0007, Cx0008, Cx0009, Cx000A, Cx000B, Cx000C, Cx000D, Cx000E, Cx000F, - Cx0010, Cx0011, Cx0012, Cx0013, Cx0014, Cx001A, Cx0020, Cx0100, - Cx0101, Cx0102, Cx0201, Cx0202, Cx0203, Cx0204, + Cx0010, Cx0011, Cx0012, Cx0013, Cx0014, Cx001A, Cx0020, Cx0021, + Cx0100, Cx0101, Cx0102, Cx0201, Cx0202, Cx0203, Cx0204, Cx0300, Cx0301, Cx0400, Cx0401, Cx0402, Cx0403, Cx0404, Cx0405, Cx0406, Cx0500, Cx0702, Cx0B01, Cx0B04, Cx0B05, CxEF00, CxFC01, CxFC40, CxFCC0, CxFCCC, @@ -197,8 +197,8 @@ enum Cx_cluster_short { const uint16_t Cx_cluster[] PROGMEM = { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, - 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x001A, 0x0020, 0x0100, - 0x0101, 0x0102, 0x0201, 0x0202, 0x0203, 0x0204, + 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x001A, 0x0020, 0x0021, + 0x0100, 0x0101, 0x0102, 0x0201, 0x0202, 0x0203, 0x0204, 0x0300, 0x0301, 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0500, 0x0702, 0x0B01, 0x0B04, 0x0B05, 0xEF00, 0xFC01, 0xFC40, 0xFCC0, 0xFCCC, @@ -746,6 +746,27 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zuint32, Cx0020, 0x0005, Z_(LongPollIntervalMin), Cm1, 0 }, { Zuint16, Cx0020, 0x0006, Z_(FastPollTimeoutMax), Cm1, 0 }, + // Green Power + { Zuint8, Cx0021, 0x0000, Z_(MaxSinkTableEntries), Cm1, 0 }, + { Zoctstr16,Cx0021, 0x0001, Z_(SinkTable), Cm1, 0 }, + { Zmap8, Cx0021, 0x0002, Z_(CommunicationMode), Cm1, 0 }, + { Zmap8, Cx0021, 0x0003, Z_(CcommissioningExitMode),Cm1, 0 }, + { Zuint16, Cx0021, 0x0004, Z_(CommissioningWindow), Cm1, 0 }, + { Zmap8, Cx0021, 0x0005, Z_(SecurityLevel), Cm1, 0 }, + { Zmap24, Cx0021, 0x0006, Z_(ServerFunctionality), Cm1, 0 }, + { Zmap24, Cx0021, 0x0007, Z_(ServerActiveFunctionality), Cm1, 0 }, + { Zuint8, Cx0021, 0x0010, Z_(MaxProxyTableEntries), Cm1, 0 }, + { Zoctstr16,Cx0021, 0x0011, Z_(ProxyTable), Cm1, 0 }, + { Zuint8, Cx0021, 0x0012, Z_(NotificationRetryNumber),Cm1, 0 }, + { Zuint8, Cx0021, 0x0013, Z_(NotificationRetryTimer),Cm1, 0 }, + { Zuint8, Cx0021, 0x0014, Z_(MaxSearchCounter), Cm1, 0 }, + { Zoctstr16,Cx0021, 0x0015, Z_(BlockedGPDID), Cm1, 0 }, + { Zmap24, Cx0021, 0x0016, Z_(ClientFunctionality), Cm1, 0 }, + { Zmap24, Cx0021, 0x0017, Z_(ClientActiveFunctionality), Cm1, 0 }, + { Zmap8, Cx0021, 0x0020, Z_(SharedSecurityKeyType),Cm1, 0 }, + { Zkey128, Cx0021, 0x0021, Z_(SharedSecurityKey), Cm1, 0 }, + { Zkey128, Cx0021, 0x0022, Z_(LinkKey), Cm1, 0 }, + // Shade Configuration cluster { Zuint16, Cx0100, 0x0000, Z_(PhysicalClosedLimit), Cm1, 0 }, { Zuint8, Cx0100, 0x0001, Z_(MotorStepSize), Cm1, 0 }, diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino index 065c847fd..4bcef8961 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_5_2_converters.ino @@ -108,7 +108,7 @@ public: manuf(manuf_code), transactseq(transact_seq), cmd(cmd_id), payload(buf_len ? buf_len : 250), // allocate the data frame from source or preallocate big enough cluster(clusterid), groupaddr(groupaddr), - shortaddr(srcaddr), _srcendpoint(srcendpoint), dstendpoint(dstendpoint), _wasbroadcast(wasbroadcast), + shortaddr(srcaddr), srcendpoint(srcendpoint), dstendpoint(dstendpoint), _wasbroadcast(wasbroadcast), _linkquality(linkquality), _securityuse(securityuse), _seqnumber(seqnumber) { _frame_control.d8 = frame_control; @@ -128,7 +128,7 @@ public: "\"manuf\":\"0x%04X\",\"transact\":%d," "\"cmdid\":\"0x%02X\",\"payload\":\"%_B\"}}"), groupaddr, cluster, shortaddr, - _srcendpoint, dstendpoint, _wasbroadcast, + srcendpoint, dstendpoint, _wasbroadcast, _linkquality, _securityuse, _seqnumber, _frame_control, _frame_control.b.frame_type, _frame_control.b.direction, _frame_control.b.disable_def_resp, @@ -207,7 +207,7 @@ public: inline uint16_t getClusterId(void) const { return cluster; } inline uint8_t getLinkQuality(void) const { return _linkquality; } inline uint8_t getCmdId(void) const { return cmd; } - inline uint16_t getSrcEndpoint(void) const { return _srcendpoint; } + inline uint16_t getSrcEndpoint(void) const { return srcendpoint; } const SBuffer &getPayload(void) const { return payload; } uint16_t getManufCode(void) const { return manuf; } @@ -234,9 +234,11 @@ public: bool direct = false; // true if direct, false if discover router bool transacSet = false; // is transac already set + uint8_t srcendpoint = 0x00; // 0x00 is invalid for the src endpoint + bool direction = false; // false = client to server (default), true = server to client (rare) + // below private attributes are not used when sending a message private: - uint8_t _srcendpoint = 0x00; // 0x00 is invalid for the src endpoint ZCLHeaderFrameControl_t _frame_control = { .d8 = 0 }; bool _wasbroadcast = false; uint8_t _linkquality = 0x00; @@ -531,6 +533,16 @@ uint32_t parseSingleAttribute(Z_attribute & attr, const SBuffer &buf, attr.setUInt(uint16_val); } break; + case Zdata24: // data16 + case Zmap24: // map16 + { + uint32_t uint32_val = buf.get16(i); + uint8_t high = buf.get8(i+2); + uint32_val = uint32_val | (high << 16); + // i += 3; + attr.setUInt(uint32_val); + } + break; case Zdata32: // data32 case Zmap32: // map32 { @@ -549,7 +561,7 @@ uint32_t parseSingleAttribute(Z_attribute & attr, const SBuffer &buf, } break; - // TODO + // All other fixed size, convert to a HEX dump case ZToD: // ToD case Zdate: // date case ZclusterId: // clusterId @@ -558,17 +570,19 @@ uint32_t parseSingleAttribute(Z_attribute & attr, const SBuffer &buf, case ZEUI64: // EUI64 case Zkey128: // key128 case Zsemi: // semi (float on 2 bytes) + { + attr.setBuf(buf, i, len); + } + // i += 16; break; // Other un-implemented data types - case Zdata24: // data24 case Zdata40: // data40 case Zdata48: // data48 case Zdata56: // data56 case Zdata64: // data64 break; // map - case Zmap24: // map24 case Zmap40: // map40 case Zmap48: // map48 case Zmap56: // map56 @@ -621,7 +635,7 @@ void ZCLFrame::parseReportAttributes(Z_attribute_list& attr_list) { ZCLFrame zcl(2); // message is 2 bytes zcl.shortaddr = shortaddr; zcl.cluster = cluster; - zcl.dstendpoint = _srcendpoint; + zcl.dstendpoint = srcendpoint; zcl.cmd = ZCL_DEFAULT_RESPONSE; zcl.manuf = manuf; zcl.clusterSpecific = false; /* not cluster specific */ @@ -768,7 +782,7 @@ void ZCLFrame::computeSyntheticAttributes(Z_attribute_list& attr_list) { if (attr_rgb == nullptr) { // make sure we didn't already computed it uint8_t brightness = 255; if (device.valid()) { - const Z_Data_Light & light = device.data.find(_srcendpoint); + const Z_Data_Light & light = device.data.find(srcendpoint); if ((&light != &z_data_unk) && (light.validDimmer())) { // Dimmer has a valid value brightness = changeUIntScale(light.getDimmer(), 0, 254, 0, 255); // range is 0..255 @@ -798,7 +812,7 @@ void ZCLFrame::computeSyntheticAttributes(Z_attribute_list& attr_list) { } break; case 0x05000002: // ZoneStatus - const Z_Data_Alarm & alarm = (const Z_Data_Alarm&) zigbee_devices.getShortAddr(shortaddr).data.find(Z_Data_Type::Z_Alarm, _srcendpoint); + const Z_Data_Alarm & alarm = (const Z_Data_Alarm&) zigbee_devices.getShortAddr(shortaddr).data.find(Z_Data_Type::Z_Alarm, srcendpoint); if (&alarm != nullptr) { alarm.convertZoneStatus(attr_list, attr.getUInt()); } @@ -821,12 +835,12 @@ void ZCLFrame::generateCallBacks(Z_attribute_list& attr_list) { uint32_t occupancy = attr.getUInt(); if (occupancy) { uint32_t pir_timer = OCCUPANCY_TIMEOUT; - const Z_Data_PIR & pir_found = (const Z_Data_PIR&) zigbee_devices.getShortAddr(shortaddr).data.find(Z_Data_Type::Z_PIR, _srcendpoint); + const Z_Data_PIR & pir_found = (const Z_Data_PIR&) zigbee_devices.getShortAddr(shortaddr).data.find(Z_Data_Type::Z_PIR, srcendpoint); if (&pir_found != nullptr) { pir_timer = pir_found.getTimeoutSeconds() * 1000; } if (pir_timer > 0) { - zigbee_devices.setTimer(shortaddr, 0 /* groupaddr */, pir_timer, cluster, _srcendpoint, Z_CAT_VIRTUAL_OCCUPANCY, 0, &Z_OccupancyCallback); + zigbee_devices.setTimer(shortaddr, 0 /* groupaddr */, pir_timer, cluster, srcendpoint, Z_CAT_VIRTUAL_OCCUPANCY, 0, &Z_OccupancyCallback); } } else { zigbee_devices.resetTimersForDevice(shortaddr, 0 /* groupaddr */, Z_CAT_VIRTUAL_OCCUPANCY); @@ -1049,7 +1063,7 @@ void ZCLFrame::parseResponse_inner(uint8_t cmd, bool cluster_specific, uint8_t s // "StatusMessage" attr_list.addAttributePMEM(PSTR(D_JSON_ZIGBEE_STATUS_MSG)).setStr(getZigbeeStatusMessage(status).c_str()); // Add Endpoint - attr_list.addAttributePMEM(PSTR(D_CMND_ZIGBEE_ENDPOINT)).setUInt(_srcendpoint); + attr_list.addAttributePMEM(PSTR(D_CMND_ZIGBEE_ENDPOINT)).setUInt(srcendpoint); // Add Group if non-zero if (groupaddr) { // TODO what about group zero attr_list.group_id = groupaddr; @@ -1082,16 +1096,16 @@ void Z_ResetDebounce(uint16_t shortaddr, uint16_t groupaddr, uint16_t cluster, u void ZCLFrame::parseClusterSpecificCommand(Z_attribute_list& attr_list) { // Check if debounce is active and if the packet is a duplicate Z_Device & device = zigbee_devices.getShortAddr(shortaddr); - if ((device.debounce_endpoint != 0) && (device.debounce_endpoint == _srcendpoint) && (device.debounce_transact == transactseq)) { + if ((device.debounce_endpoint != 0) && (device.debounce_endpoint == srcendpoint) && (device.debounce_transact == transactseq)) { // this is a duplicate, drop the packet - AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE "Discarding duplicate command from 0x%04X, endpoint %d"), shortaddr, _srcendpoint); + AddLog(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE "Discarding duplicate command from 0x%04X, endpoint %d"), shortaddr, srcendpoint); } else { // reset the duplicate marker, parse the packet normally, and set a timer to reset the marker later (which will discard any existing timer for the same device/endpoint) - device.debounce_endpoint = _srcendpoint; + device.debounce_endpoint = srcendpoint; device.debounce_transact = transactseq; - zigbee_devices.setTimer(shortaddr, 0 /* groupaddr */, USE_ZIGBEE_DEBOUNCE_COMMANDS, 0 /*clusterid*/, _srcendpoint, Z_CAT_DEBOUNCE_CMD, 0, &Z_ResetDebounce); + zigbee_devices.setTimer(shortaddr, 0 /* groupaddr */, USE_ZIGBEE_DEBOUNCE_COMMANDS, 0 /*clusterid*/, srcendpoint, Z_CAT_DEBOUNCE_CMD, 0, &Z_ResetDebounce); - convertClusterSpecific(attr_list, cluster, cmd, _frame_control.b.direction, shortaddr, _srcendpoint, payload); + convertClusterSpecific(attr_list, cluster, cmd, _frame_control.b.direction, shortaddr, srcendpoint, payload); if (!Settings->flag5.zb_disable_autoquery) { // read attributes unless disabled if (!_frame_control.b.direction) { // only handle server->client (i.e. device->coordinator) @@ -1107,7 +1121,7 @@ void ZCLFrame::parseClusterSpecificCommand(Z_attribute_list& attr_list) { ZCLFrame zcl(2); // message is 4 bytes zcl.shortaddr = shortaddr; zcl.cluster = cluster; - zcl.dstendpoint = _srcendpoint; + zcl.dstendpoint = srcendpoint; zcl.cmd = ZCL_DEFAULT_RESPONSE; zcl.manuf = manuf; zcl.clusterSpecific = false; /* not cluster specific */ diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino index eb7e2074a..34e97ec14 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_7_0_statemachine.ino @@ -315,16 +315,22 @@ ZBM(ZBR_ZDO_ACTIVEEPREQ, Z_SRSP | Z_ZDO, ZDO_ACTIVE_EP_REQ, Z_SUCCESS) // 65050 // Change #14819 - we now allow some EP to be alreaady declared ZBM(ZBR_ZDO_ACTIVEEPRSP_SUCESS, Z_AREQ | Z_ZDO, ZDO_ACTIVE_EP_RSP, 0x00, 0x00 /* srcAddr */, Z_SUCCESS) // 45050000xxxx - no Ep running ZBM(ZBR_ZDO_ACTIVEEPRSP_OK, Z_AREQ | Z_ZDO, ZDO_ACTIVE_EP_RSP, 0x00, 0x00 /* srcAddr */, Z_SUCCESS, - 0x00, 0x00 /* nwkaddr */, 0x02 /* activeepcount */, 0x0B, 0x01 /* the actual endpoints */) // 25050000 - no Ep running + 0x00, 0x00 /* nwkaddr */, 0x03 /* activeepcount */, 0xF2, 0x0B, 0x01 /* the actual endpoints */) // 4585000000000003F20B01 // Z_AF:register profile:104, ep:01 ZBM(ZBS_AF_REGISTER01, Z_SREQ | Z_AF, AF_REGISTER, 0x01 /* endpoint */, Z_B0(Z_PROF_HA), Z_B1(Z_PROF_HA), // 24000401050000000000 0x05, 0x00 /* AppDeviceId */, 0x00 /* AppDevVer */, 0x00 /* LatencyReq */, - 0x00 /* AppNumInClusters */, 0x00 /* AppNumInClusters */) + 0x00 /* AppNumInClusters */, 0x00 /* AppNumOutClusters */) ZBM(ZBR_AF_REGISTER, Z_SRSP | Z_AF, AF_REGISTER, Z_SUCCESS) // 640000 ZBM(ZBS_AF_REGISTER0B, Z_SREQ | Z_AF, AF_REGISTER, 0x0B /* endpoint */, Z_B0(Z_PROF_HA), Z_B1(Z_PROF_HA), // 2400040B050000000000 0x05, 0x00 /* AppDeviceId */, 0x00 /* AppDevVer */, 0x00 /* LatencyReq */, - 0x00 /* AppNumInClusters */, 0x00 /* AppNumInClusters */) + 0x00 /* AppNumInClusters */, 0x00 /* AppNumOutClusters */) +// Green Power endpoint 242 0xF2 +ZBM(ZBS_AF_REGISTERF2, Z_SREQ | Z_AF, AF_REGISTER, 0xF2 /* endpoint */, Z_B0(Z_PROF_GP), Z_B1(Z_PROF_GP), // + 0x05, 0x61 /* AppDeviceId */, 0x00 /* AppDevVer */, 0x00 /* LatencyReq */, + 0x00 /* AppNumInClusters */, + 0x01 /* AppNumOutClusters */, + 0x21,0x00) // 0x0021 // Z_AF:register profile:104, ep:01 - main clusters for router or device ZBM(ZBS_AF_REGISTER_ALL, Z_SREQ | Z_AF, AF_REGISTER, 0x01 /* endpoint */, Z_B0(Z_PROF_HA), Z_B1(Z_PROF_HA), // 24000401050000000000 0x05, 0x00 /* AppDeviceId */, 0x00 /* AppDevVer */, 0x00 /* LatencyReq */, @@ -333,7 +339,7 @@ ZBM(ZBS_AF_REGISTER_ALL, Z_SREQ | Z_AF, AF_REGISTER, 0x01 /* endpoint */, Z_B0(Z 0x07,0x00, 0x08,0x00, 0x0A,0x00, 0x02,0x01, // 0x0007, 0x0008, 0x000A, 0X0102 0x00,0x03, 0x00,0x04, 0x02,0x04, 0x03,0x04, // 0x0300, 0x0400, 0x0402, 0x0403 0x05,0x04, 0x06,0x04, // 0x0405, 0x0406 - 0x00 /* AppNumInClusters */) + 0x00 /* AppNumOutClusters */) // Z_ZDO:mgmtPermitJoinReq ZBM(ZBS_PERMITJOINREQ_CLOSE, Z_SREQ | Z_ZDO, ZDO_MGMT_PERMIT_JOIN_REQ, 0x02 /* AddrMode */, // 25360200000000 @@ -506,6 +512,8 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = { ZI_WAIT_RECV(1000, ZBR_AF_REGISTER) ZI_SEND(ZBS_AF_REGISTER0B) // Z_AF register for endpoint 0B, profile 0x0104 Home Automation ZI_WAIT_RECV(1000, ZBR_AF_REGISTER) + ZI_SEND(ZBS_AF_REGISTERF2) // Z_AF register for endpoint F2, profile 0xa1e0 Green Power + ZI_WAIT_RECV(1000, ZBR_AF_REGISTER) // Write again channels, see https://github.com/Koenkk/zigbee-herdsman/blob/37bea20ba04ee5d4938abc21a7569b43f831de32/src/adapter/z-stack/adapter/startZnp.ts#L244-L245 ZI_SEND(ZBS_W_CHANN) // write CHANNEL ZI_WAIT_RECV(1000, ZBR_WNV_OK) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_8_parsers.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_8_parsers.ino index 4edf32a09..4e82814ba 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_8_parsers.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_8_parsers.ino @@ -2232,7 +2232,7 @@ void ZCLFrame::autoResponder(const uint16_t *attr_list_ids, size_t attr_len) { ",\"Endpoint\":%d" ",\"Response\":%s}" ), - shortaddr, cluster, _srcendpoint, + shortaddr, cluster, srcendpoint, attr_list.toString().c_str()); // send @@ -2240,7 +2240,7 @@ void ZCLFrame::autoResponder(const uint16_t *attr_list_ids, size_t attr_len) { ZCLFrame zcl(buf.len()); // message is 4 bytes zcl.shortaddr = shortaddr; zcl.cluster = cluster; - zcl.dstendpoint = _srcendpoint; + zcl.dstendpoint = srcendpoint; zcl.cmd = ZCL_READ_ATTRIBUTES_RESPONSE; zcl.clusterSpecific = false; /* not cluster specific */ zcl.needResponse = false; /* noresponse */ diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino index c532e2363..05a049c8c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_9_serial.ino @@ -775,14 +775,19 @@ void ZigbeeZCLSend_Raw(const ZCLFrame &zcl) { buf.add8(zcl.dstendpoint); // dest endpoint } buf.add16(0x0000); // dest Pan ID, 0x0000 = intra-pan - buf.add8(0x01); // source endpoint + if (zcl.srcendpoint) { + buf.add8(zcl.srcendpoint); // source endpoint + } else { + buf.add8(1); // set endpoint to 1 if not specified + } buf.add16(zcl.cluster); buf.add8(zcl.transactseq); // transactseq - buf.add8(0x30); // 30 options + buf.add8(zcl.direct ? 0x00 : 0x30); // 30 options buf.add8(0x1E); // 1E radius buf.add16(3 + zcl.payload.len() + (zcl.manuf ? 2 : 0)); - buf.add8((zcl.needResponse ? 0x00 : 0x10) | (zcl.clusterSpecific ? 0x01 : 0x00) | (zcl.manuf ? 0x04 : 0x00)); // Frame Control Field + buf.add8((zcl.needResponse ? 0x00 : 0x10) | (zcl.clusterSpecific ? 0x01 : 0x00) | + (zcl.manuf ? 0x04 : 0x00) | (zcl.direction ? 0x08 : 0x00)); // Frame Control Field if (zcl.manuf) { buf.add16(zcl.manuf); // add Manuf Id if not null } diff --git a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino index 1318d11a3..96f15cdc2 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino @@ -730,8 +730,17 @@ void CmndZbSend(void) { // parse "Device" and "Group" JsonParserToken val_device = root[PSTR(D_CMND_ZIGBEE_DEVICE)]; if (val_device) { - zcl.shortaddr = zigbee_devices.parseDeviceFromName(val_device.getStr()).shortaddr; - if (!zcl.validShortaddr()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_INVALID_PARAM)); return; } + uint16_t parsed_shortaddr = BAD_SHORTADDR; + zcl.shortaddr = zigbee_devices.parseDeviceFromName(val_device.getStr(), &parsed_shortaddr).shortaddr; + if (!zcl.validShortaddr()) { + if (parsed_shortaddr != BAD_SHORTADDR) { + // we still got a short address + zcl.shortaddr = parsed_shortaddr; + } else { + ResponseCmndChar_P(PSTR(D_ZIGBEE_INVALID_PARAM)); + return; + } + } } if (!zcl.validShortaddr()) { // if not found, check if we have a group JsonParserToken val_group = root[PSTR(D_CMND_ZIGBEE_GROUP)]; @@ -760,6 +769,10 @@ void CmndZbSend(void) { ResponseCmndChar_P(PSTR("Missing endpoint")); return; } + // Special case for Green Power, if dstendpoint is 0xF2, then source endpoint should also be 0xF2 + if (zcl.dstendpoint == 0xF2) { + zcl.srcendpoint = 0xF2; + } // from here endpoint is valid and non-zero // cluster may be already specified or 0xFFFF @@ -1517,6 +1530,7 @@ void CmndZbPermitJoin(void) { // ZNP Version #ifdef USE_ZIGBEE_ZNP + // put all routers in pairing mode SBuffer buf(34); buf.add8(Z_SREQ | Z_ZDO); // 25 buf.add8(ZDO_MGMT_PERMIT_JOIN_REQ); // 36 @@ -1527,6 +1541,22 @@ void CmndZbPermitJoin(void) { ZigbeeZNPSend(buf.getBuffer(), buf.len()); + // send Green Power pairing mode + ZCLFrame zcl(4); // message is 4 bytes max + + zcl.cmd = 0x02; // GP Proxy Commissioning Mode + zcl.cluster = 0x0021; // GP cluster + zcl.shortaddr = 0xFFFC; // Broadcast to all routers + zcl.srcendpoint = 0xF2; // GP endpoint + zcl.dstendpoint = 0xF2; // GP endpoint + zcl.needResponse = false; // as per GP spec The Disable default response sub-field of the Frame Control Field of the ZCL header shall be set to 0b1." + zcl.clusterSpecific = true; // command + zcl.direct = true; // broadcast so no need to discover routes + zcl.direction = true; // server to client + zcl.payload.add8(0x0B); // Action=1, gpsCommissioningExitMode=0b101 (window expiration + GP Proxy Commissioning Mode) + zcl.payload.add16(duration); + zigbeeZCLSendCmd(zcl); + #endif // USE_ZIGBEE_ZNP // EZSP VERSION