Merge pull request #16183 from s-hadinger/zigbee_fix_tuya

Zigbee fix Tuya for writing attributes
This commit is contained in:
s-hadinger 2022-08-09 11:22:44 +02:00 committed by GitHub
commit 542e3ab5ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 439 additions and 427 deletions

View File

@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Restore EnergyToday after using command ``restart 2`` and power cycle (#16118)
- Fixed IR crash on ESP32 (#16173)
- Zigbee fix Tuya for writing attributes
### Removed

View File

@ -80,6 +80,7 @@ const char Z_strings[] PROGMEM =
"00xx0A00" "\x00"
"00xxxx000000000000" "\x00"
"01" "\x00"
"0101" "\x00"
"01190200" "\x00"
"01xx0A00" "\x00"
"01xxxx" "\x00"
@ -451,11 +452,13 @@ const char Z_strings[] PROGMEM =
"TuyaEcoTemp" "\x00"
"TuyaFanMode" "\x00"
"TuyaForceMode" "\x00"
"TuyaMCUVersion" "\x00"
"TuyaMaxTemp" "\x00"
"TuyaMinTemp" "\x00"
"TuyaMotorReversal" "\x00"
"TuyaMovingState" "\x00"
"TuyaPreset" "\x00"
"TuyaQuery" "\x00"
"TuyaScheduleHolidays" "\x00"
"TuyaScheduleWorkdays" "\x00"
"TuyaTempTarget" "\x00"
@ -513,431 +516,434 @@ enum Z_offsets {
Zo_00xx0A00 = 13,
Zo_00xxxx000000000000 = 22,
Zo_01 = 41,
Zo_01190200 = 44,
Zo_01xx0A00 = 53,
Zo_01xxxx = 62,
Zo_01xxxx000000000000 = 69,
Zo_01xxxx0A0000000000 = 88,
Zo_03xx0A00 = 107,
Zo_03xxxx000000000000 = 116,
Zo_03xxxx0A0000000000 = 135,
Zo_AccelerationTimeLift = 154,
Zo_ActivePower = 175,
Zo_ActuatorEnabled = 187,
Zo_AddGroup = 203,
Zo_AddScene = 212,
Zo_AlarmCount = 221,
Zo_AnalogApplicationType = 232,
Zo_AnalogDescription = 254,
Zo_AnalogEngineeringUnits = 272,
Zo_AnalogInApplicationType = 295,
Zo_AnalogInDescription = 319,
Zo_AnalogInEngineeringUnits = 339,
Zo_AnalogInMaxValue = 364,
Zo_AnalogInMinValue = 381,
Zo_AnalogInOutOfService = 398,
Zo_AnalogInReliability = 419,
Zo_AnalogInResolution = 439,
Zo_AnalogInStatusFlags = 458,
Zo_AnalogOutApplicationType = 478,
Zo_AnalogOutDescription = 503,
Zo_AnalogOutEngineeringUnits = 524,
Zo_AnalogOutMaxValue = 550,
Zo_AnalogOutMinValue = 568,
Zo_AnalogOutOfService = 586,
Zo_AnalogOutOutOfService = 605,
Zo_AnalogOutReliability = 627,
Zo_AnalogOutRelinquishDefault = 648,
Zo_AnalogOutResolution = 675,
Zo_AnalogOutStatusFlags = 695,
Zo_AnalogOutValue = 716,
Zo_AnalogPriorityArray = 731,
Zo_AnalogReliability = 751,
Zo_AnalogRelinquishDefault = 769,
Zo_AnalogStatusFlags = 793,
Zo_AnalogValue = 811,
Zo_AppVersion = 823,
Zo_ApparentPower = 834,
Zo_AqaraAccelerometer = 848,
Zo_AqaraRotate = 867,
Zo_AqaraVibration505 = 879,
Zo_AqaraVibrationMode = 897,
Zo_AqaraVibrationsOrAngle = 916,
Zo_Aqara_FF05 = 939,
Zo_ArrowClick = 950,
Zo_ArrowHold = 961,
Zo_ArrowRelease = 971,
Zo_AvailablePower = 984,
Zo_BatteryPercentage = 999,
Zo_BatteryVoltage = 1017,
Zo_BinaryActiveText = 1032,
Zo_BinaryApplicationType = 1049,
Zo_BinaryDescription = 1071,
Zo_BinaryInActiveText = 1089,
Zo_BinaryInApplicationType = 1108,
Zo_BinaryInDescription = 1132,
Zo_BinaryInInactiveText = 1152,
Zo_BinaryInOutOfService = 1173,
Zo_BinaryInPolarity = 1194,
Zo_BinaryInReliability = 1211,
Zo_BinaryInStatusFlags = 1231,
Zo_BinaryInValue = 1251,
Zo_BinaryInactiveText = 1265,
Zo_BinaryMinimumOffTime = 1284,
Zo_BinaryMinimumOnTime = 1305,
Zo_BinaryOutActiveText = 1325,
Zo_BinaryOutApplicationType = 1345,
Zo_BinaryOutDescription = 1370,
Zo_BinaryOutInactiveText = 1391,
Zo_BinaryOutMinimumOffTime = 1413,
Zo_BinaryOutMinimumOnTime = 1437,
Zo_BinaryOutOfService = 1460,
Zo_BinaryOutOutOfService = 1479,
Zo_BinaryOutPolarity = 1501,
Zo_BinaryOutReliability = 1519,
Zo_BinaryOutRelinquishDefault = 1540,
Zo_BinaryOutStatusFlags = 1567,
Zo_BinaryOutValue = 1588,
Zo_BinaryReliability = 1603,
Zo_BinaryRelinquishDefault = 1621,
Zo_BinaryStatusFlags = 1645,
Zo_BinaryValue = 1663,
Zo_CIE = 1675,
Zo_CO = 1679,
Zo_CT = 1682,
Zo_CheckinInterval = 1685,
Zo_CheckinIntervalMin = 1701,
Zo_ClosedLimit = 1720,
Zo_Color = 1732,
Zo_ColorMode = 1738,
Zo_ColorMove = 1748,
Zo_ColorPointBIntensity = 1758,
Zo_ColorPointBX = 1779,
Zo_ColorPointBY = 1792,
Zo_ColorPointGIntensity = 1805,
Zo_ColorPointGX = 1826,
Zo_ColorPointGY = 1839,
Zo_ColorPointRIntensity = 1852,
Zo_ColorPointRX = 1873,
Zo_ColorPointRY = 1886,
Zo_ColorStep = 1899,
Zo_ColorTempMove = 1909,
Zo_ColorTempMoveDown = 1923,
Zo_ColorTempMoveStop = 1941,
Zo_ColorTempMoveUp = 1959,
Zo_ColorTempStep = 1975,
Zo_ColorTempStepDown = 1989,
Zo_ColorTempStepUp = 2007,
Zo_CompanyName = 2023,
Zo_CompensationText = 2035,
Zo_ConfigStatus = 2052,
Zo_Contact = 2065,
Zo_ControlSequenceOfOperation = 2073,
Zo_CurrentGroup = 2100,
Zo_CurrentPositionLift = 2113,
Zo_CurrentPositionLiftPercentage = 2133,
Zo_CurrentPositionTilt = 2163,
Zo_CurrentPositionTiltPercentage = 2183,
Zo_CurrentScene = 2213,
Zo_CurrentTemperature = 2226,
Zo_CurrentTemperatureSetPoint = 2245,
Zo_CustomerName = 2272,
Zo_DataQualityID = 2285,
Zo_DateCode = 2299,
Zo_DecelerationTimeLift = 2308,
Zo_Dimmer = 2329,
Zo_DimmerDown = 2336,
Zo_DimmerMove = 2347,
Zo_DimmerOptions = 2358,
Zo_DimmerRemainingTime = 2372,
Zo_DimmerStep = 2392,
Zo_DimmerStepDown = 2403,
Zo_DimmerStepUp = 2418,
Zo_DimmerStop = 2431,
Zo_DimmerUp = 2442,
Zo_DoorClosedEvents = 2451,
Zo_DoorOpenEvents = 2468,
Zo_DoorState = 2483,
Zo_DriftCompensation = 2493,
Zo_DstEnd = 2511,
Zo_DstShift = 2518,
Zo_DstStart = 2527,
Zo_EnergyFormatting = 2536,
Zo_EnergyRemote = 2553,
Zo_EnergyTotal = 2566,
Zo_EurotronicErrors = 2578,
Zo_EurotronicHostFlags = 2595,
Zo_FastPollTimeout = 2615,
Zo_FastPollTimeoutMax = 2631,
Zo_Fire = 2650,
Zo_FlowMaxMeasuredValue = 2655,
Zo_FlowMinMeasuredValue = 2676,
Zo_FlowRate = 2697,
Zo_FlowTolerance = 2706,
Zo_GenericDeviceClass = 2720,
Zo_GenericDeviceType = 2739,
Zo_GetAllGroups = 2757,
Zo_GetGroup = 2770,
Zo_GetSceneMembership = 2779,
Zo_GlassBreak = 2798,
Zo_GroupNameSupport = 2809,
Zo_HWVersion = 2826,
Zo_Hue = 2836,
Zo_HueMove = 2840,
Zo_HueSat = 2848,
Zo_HueStep = 2855,
Zo_HueStepDown = 2863,
Zo_HueStepUp = 2875,
Zo_Humidity = 2885,
Zo_HumidityMaxMeasuredValue = 2894,
Zo_HumidityMinMeasuredValue = 2919,
Zo_HumidityTolerance = 2944,
Zo_Identify = 2962,
Zo_IdentifyQuery = 2971,
Zo_IdentifyTime = 2985,
Zo_Illuminance = 2998,
Zo_IlluminanceLevelStatus = 3010,
Zo_IlluminanceLightSensorType = 3033,
Zo_IlluminanceMaxMeasuredValue = 3060,
Zo_IlluminanceMinMeasuredValue = 3088,
Zo_IlluminanceTargetLevel = 3116,
Zo_IlluminanceTolerance = 3139,
Zo_InstalledClosedLimitLift = 3160,
Zo_InstalledClosedLimitTilt = 3185,
Zo_InstalledOpenLimitLift = 3210,
Zo_InstalledOpenLimitTilt = 3233,
Zo_IntermediateSetpointsLift = 3256,
Zo_IntermediateSetpointsTilt = 3282,
Zo_LastMessageLQI = 3308,
Zo_LastMessageRSSI = 3323,
Zo_LastSetTime = 3339,
Zo_LegrandHeatingMode = 3351,
Zo_LegrandMode = 3370,
Zo_LegrandOpt1 = 3382,
Zo_LegrandOpt2 = 3394,
Zo_LegrandOpt3 = 3406,
Zo_LidlPower = 3418,
Zo_LocalTemperature = 3428,
Zo_LocalTemperatureCalibration = 3445,
Zo_LocalTime = 3473,
Zo_LocationAge = 3483,
Zo_LocationMethod = 3495,
Zo_LocationType = 3510,
Zo_LockState = 3523,
Zo_LockType = 3533,
Zo_LongPollInterval = 3542,
Zo_LongPollIntervalMin = 3559,
Zo_MainsFrequency = 3579,
Zo_MainsVoltage = 3594,
Zo_Manufacturer = 3607,
Zo_MaxTempExperienced = 3620,
Zo_MeterTypeID = 3639,
Zo_MinTempExperienced = 3651,
Zo_Mode = 3670,
Zo_Model = 3675,
Zo_ModelId = 3681,
Zo_MotorStepSize = 3689,
Zo_Movement = 3703,
Zo_MullerLightMode = 3712,
Zo_MultiApplicationType = 3728,
Zo_MultiDescription = 3749,
Zo_MultiInApplicationType = 3766,
Zo_MultiInDescription = 3789,
Zo_MultiInNumberOfStates = 3808,
Zo_MultiInOutOfService = 3830,
Zo_MultiInReliability = 3850,
Zo_MultiInStatusFlags = 3869,
Zo_MultiInValue = 3888,
Zo_MultiNumberOfStates = 3901,
Zo_MultiOutApplicationType = 3921,
Zo_MultiOutDescription = 3945,
Zo_MultiOutNumberOfStates = 3965,
Zo_MultiOutOfService = 3988,
Zo_MultiOutOutOfService = 4006,
Zo_MultiOutReliability = 4027,
Zo_MultiOutRelinquishDefault = 4047,
Zo_MultiOutStatusFlags = 4073,
Zo_MultiOutValue = 4093,
Zo_MultiReliability = 4107,
Zo_MultiRelinquishDefault = 4124,
Zo_MultiStatusFlags = 4147,
Zo_MultiValue = 4164,
Zo_MultipleScheduling = 4175,
Zo_NumberOfDevices = 4194,
Zo_NumberOfPrimaries = 4210,
Zo_NumberOfResets = 4228,
Zo_NumberofActuationsLift = 4243,
Zo_NumberofActuationsTilt = 4266,
Zo_Occupancy = 4289,
Zo_OccupancySensorType = 4299,
Zo_OccupiedCoolingSetpoint = 4319,
Zo_OccupiedHeatingSetpoint = 4343,
Zo_OnOffTransitionTime = 4367,
Zo_OpenPeriod = 4387,
Zo_OppleMode = 4398,
Zo_OutdoorTemperature = 4408,
Zo_OverTempTotalDwell = 4427,
Zo_PICoolingDemand = 4446,
Zo_PIHeatingDemand = 4462,
Zo_POD = 4478,
Zo_Panic = 4482,
Zo_PartNumber = 4488,
Zo_PersistentMemoryWrites = 4499,
Zo_PersonalAlarm = 4522,
Zo_PhysicalClosedLimit = 4536,
Zo_PhysicalClosedLimitLift = 4556,
Zo_PhysicalClosedLimitTilt = 4580,
Zo_Power = 4604,
Zo_Power2 = 4610,
Zo_Power3 = 4617,
Zo_Power4 = 4624,
Zo_PowerOffEffect = 4631,
Zo_PowerOnRecall = 4646,
Zo_PowerOnTimer = 4660,
Zo_PowerSource = 4673,
Zo_PowerThreshold = 4685,
Zo_Pressure = 4700,
Zo_PressureMaxMeasuredValue = 4709,
Zo_PressureMaxScaledValue = 4734,
Zo_PressureMinMeasuredValue = 4757,
Zo_PressureMinScaledValue = 4782,
Zo_PressureScale = 4805,
Zo_PressureScaledTolerance = 4819,
Zo_PressureScaledValue = 4843,
Zo_PressureTolerance = 4863,
Zo_Primary1Intensity = 4881,
Zo_Primary1X = 4899,
Zo_Primary1Y = 4909,
Zo_Primary2Intensity = 4919,
Zo_Primary2X = 4937,
Zo_Primary2Y = 4947,
Zo_Primary3Intensity = 4957,
Zo_Primary3X = 4975,
Zo_Primary3Y = 4985,
Zo_ProductCode = 4995,
Zo_ProductRevision = 5007,
Zo_ProductURL = 5023,
Zo_QualityMeasure = 5034,
Zo_RGB = 5049,
Zo_RMSCurrent = 5053,
Zo_RMSVoltage = 5064,
Zo_ReactivePower = 5075,
Zo_RecallScene = 5089,
Zo_RemainingTime = 5101,
Zo_RemoteSensing = 5115,
Zo_RemoveAllGroups = 5129,
Zo_RemoveAllScenes = 5145,
Zo_RemoveGroup = 5161,
Zo_RemoveScene = 5173,
Zo_ResetAlarm = 5185,
Zo_ResetAllAlarms = 5196,
Zo_SWBuildID = 5211,
Zo_Sat = 5221,
Zo_SatMove = 5225,
Zo_SatStep = 5233,
Zo_SceneCount = 5241,
Zo_SceneValid = 5252,
Zo_ScheduleMode = 5263,
Zo_SeaPressure = 5276,
Zo_ShortPollInterval = 5288,
Zo_Shutter = 5306,
Zo_ShutterClose = 5314,
Zo_ShutterLift = 5327,
Zo_ShutterOpen = 5339,
Zo_ShutterStop = 5351,
Zo_ShutterTilt = 5363,
Zo_SoftwareRevision = 5375,
Zo_StackVersion = 5392,
Zo_StandardTime = 5405,
Zo_StartUpOnOff = 5418,
Zo_Status = 5431,
Zo_StoreScene = 5438,
Zo_SwitchType = 5449,
Zo_SystemMode = 5460,
Zo_TRVBoost = 5471,
Zo_TRVChildProtection = 5480,
Zo_TRVMirrorDisplay = 5499,
Zo_TRVMode = 5516,
Zo_TRVWindowOpen = 5524,
Zo_TempTarget = 5538,
Zo_Temperature = 5549,
Zo_TemperatureMaxMeasuredValue = 5561,
Zo_TemperatureMinMeasuredValue = 5589,
Zo_TemperatureTolerance = 5617,
Zo_TerncyDuration = 5638,
Zo_TerncyRotate = 5653,
Zo_ThSetpoint = 5666,
Zo_Time = 5677,
Zo_TimeEpoch = 5682,
Zo_TimeStatus = 5692,
Zo_TimeZone = 5703,
Zo_TotalProfileNum = 5712,
Zo_TuyaAutoLock = 5728,
Zo_TuyaAwayDays = 5741,
Zo_TuyaAwayTemp = 5754,
Zo_TuyaBattery = 5767,
Zo_TuyaBoostTime = 5779,
Zo_TuyaCalibration = 5793,
Zo_TuyaCalibrationTime = 5809,
Zo_TuyaChildLock = 5829,
Zo_TuyaComfortTemp = 5843,
Zo_TuyaEcoTemp = 5859,
Zo_TuyaFanMode = 5871,
Zo_TuyaForceMode = 5883,
Zo_TuyaMaxTemp = 5897,
Zo_TuyaMinTemp = 5909,
Zo_TuyaMotorReversal = 5921,
Zo_TuyaMovingState = 5939,
Zo_TuyaPreset = 5955,
Zo_TuyaScheduleHolidays = 5966,
Zo_TuyaScheduleWorkdays = 5987,
Zo_TuyaTempTarget = 6008,
Zo_TuyaValveDetection = 6023,
Zo_TuyaValvePosition = 6042,
Zo_TuyaWeekSelect = 6060,
Zo_TuyaWindowDetection = 6075,
Zo_UnoccupiedCoolingSetpoint = 6095,
Zo_UnoccupiedHeatingSetpoint = 6121,
Zo_UtilityName = 6147,
Zo_ValidUntilTime = 6159,
Zo_ValvePosition = 6174,
Zo_VelocityLift = 6188,
Zo_ViewGroup = 6201,
Zo_ViewScene = 6211,
Zo_Water = 6221,
Zo_WhitePointX = 6227,
Zo_WhitePointY = 6239,
Zo_WindowCoveringType = 6251,
Zo_X = 6270,
Zo_Y = 6272,
Zo_ZCLVersion = 6274,
Zo_ZoneState = 6285,
Zo_ZoneStatus = 6295,
Zo_ZoneStatusChange = 6306,
Zo_ZoneType = 6323,
Zo__ = 6332,
Zo_xx = 6334,
Zo_xx000A00 = 6337,
Zo_xx0A = 6346,
Zo_xx0A00 = 6351,
Zo_xx19 = 6358,
Zo_xx190A = 6363,
Zo_xx190A00 = 6370,
Zo_xxxx = 6379,
Zo_xxxx00 = 6384,
Zo_xxxx0A00 = 6391,
Zo_xxxxyy = 6400,
Zo_xxxxyyyy = 6407,
Zo_xxxxyyyy0A00 = 6416,
Zo_xxxxyyzz = 6429,
Zo_xxyy = 6438,
Zo_xxyy0A00 = 6443,
Zo_xxyyyy = 6452,
Zo_xxyyyy000000000000 = 6459,
Zo_xxyyyy0A0000000000 = 6478,
Zo_xxyyyyzz = 6497,
Zo_xxyyyyzzzz = 6506,
Zo_xxyyzzzz = 6517,
Zo_0101 = 44,
Zo_01190200 = 49,
Zo_01xx0A00 = 58,
Zo_01xxxx = 67,
Zo_01xxxx000000000000 = 74,
Zo_01xxxx0A0000000000 = 93,
Zo_03xx0A00 = 112,
Zo_03xxxx000000000000 = 121,
Zo_03xxxx0A0000000000 = 140,
Zo_AccelerationTimeLift = 159,
Zo_ActivePower = 180,
Zo_ActuatorEnabled = 192,
Zo_AddGroup = 208,
Zo_AddScene = 217,
Zo_AlarmCount = 226,
Zo_AnalogApplicationType = 237,
Zo_AnalogDescription = 259,
Zo_AnalogEngineeringUnits = 277,
Zo_AnalogInApplicationType = 300,
Zo_AnalogInDescription = 324,
Zo_AnalogInEngineeringUnits = 344,
Zo_AnalogInMaxValue = 369,
Zo_AnalogInMinValue = 386,
Zo_AnalogInOutOfService = 403,
Zo_AnalogInReliability = 424,
Zo_AnalogInResolution = 444,
Zo_AnalogInStatusFlags = 463,
Zo_AnalogOutApplicationType = 483,
Zo_AnalogOutDescription = 508,
Zo_AnalogOutEngineeringUnits = 529,
Zo_AnalogOutMaxValue = 555,
Zo_AnalogOutMinValue = 573,
Zo_AnalogOutOfService = 591,
Zo_AnalogOutOutOfService = 610,
Zo_AnalogOutReliability = 632,
Zo_AnalogOutRelinquishDefault = 653,
Zo_AnalogOutResolution = 680,
Zo_AnalogOutStatusFlags = 700,
Zo_AnalogOutValue = 721,
Zo_AnalogPriorityArray = 736,
Zo_AnalogReliability = 756,
Zo_AnalogRelinquishDefault = 774,
Zo_AnalogStatusFlags = 798,
Zo_AnalogValue = 816,
Zo_AppVersion = 828,
Zo_ApparentPower = 839,
Zo_AqaraAccelerometer = 853,
Zo_AqaraRotate = 872,
Zo_AqaraVibration505 = 884,
Zo_AqaraVibrationMode = 902,
Zo_AqaraVibrationsOrAngle = 921,
Zo_Aqara_FF05 = 944,
Zo_ArrowClick = 955,
Zo_ArrowHold = 966,
Zo_ArrowRelease = 976,
Zo_AvailablePower = 989,
Zo_BatteryPercentage = 1004,
Zo_BatteryVoltage = 1022,
Zo_BinaryActiveText = 1037,
Zo_BinaryApplicationType = 1054,
Zo_BinaryDescription = 1076,
Zo_BinaryInActiveText = 1094,
Zo_BinaryInApplicationType = 1113,
Zo_BinaryInDescription = 1137,
Zo_BinaryInInactiveText = 1157,
Zo_BinaryInOutOfService = 1178,
Zo_BinaryInPolarity = 1199,
Zo_BinaryInReliability = 1216,
Zo_BinaryInStatusFlags = 1236,
Zo_BinaryInValue = 1256,
Zo_BinaryInactiveText = 1270,
Zo_BinaryMinimumOffTime = 1289,
Zo_BinaryMinimumOnTime = 1310,
Zo_BinaryOutActiveText = 1330,
Zo_BinaryOutApplicationType = 1350,
Zo_BinaryOutDescription = 1375,
Zo_BinaryOutInactiveText = 1396,
Zo_BinaryOutMinimumOffTime = 1418,
Zo_BinaryOutMinimumOnTime = 1442,
Zo_BinaryOutOfService = 1465,
Zo_BinaryOutOutOfService = 1484,
Zo_BinaryOutPolarity = 1506,
Zo_BinaryOutReliability = 1524,
Zo_BinaryOutRelinquishDefault = 1545,
Zo_BinaryOutStatusFlags = 1572,
Zo_BinaryOutValue = 1593,
Zo_BinaryReliability = 1608,
Zo_BinaryRelinquishDefault = 1626,
Zo_BinaryStatusFlags = 1650,
Zo_BinaryValue = 1668,
Zo_CIE = 1680,
Zo_CO = 1684,
Zo_CT = 1687,
Zo_CheckinInterval = 1690,
Zo_CheckinIntervalMin = 1706,
Zo_ClosedLimit = 1725,
Zo_Color = 1737,
Zo_ColorMode = 1743,
Zo_ColorMove = 1753,
Zo_ColorPointBIntensity = 1763,
Zo_ColorPointBX = 1784,
Zo_ColorPointBY = 1797,
Zo_ColorPointGIntensity = 1810,
Zo_ColorPointGX = 1831,
Zo_ColorPointGY = 1844,
Zo_ColorPointRIntensity = 1857,
Zo_ColorPointRX = 1878,
Zo_ColorPointRY = 1891,
Zo_ColorStep = 1904,
Zo_ColorTempMove = 1914,
Zo_ColorTempMoveDown = 1928,
Zo_ColorTempMoveStop = 1946,
Zo_ColorTempMoveUp = 1964,
Zo_ColorTempStep = 1980,
Zo_ColorTempStepDown = 1994,
Zo_ColorTempStepUp = 2012,
Zo_CompanyName = 2028,
Zo_CompensationText = 2040,
Zo_ConfigStatus = 2057,
Zo_Contact = 2070,
Zo_ControlSequenceOfOperation = 2078,
Zo_CurrentGroup = 2105,
Zo_CurrentPositionLift = 2118,
Zo_CurrentPositionLiftPercentage = 2138,
Zo_CurrentPositionTilt = 2168,
Zo_CurrentPositionTiltPercentage = 2188,
Zo_CurrentScene = 2218,
Zo_CurrentTemperature = 2231,
Zo_CurrentTemperatureSetPoint = 2250,
Zo_CustomerName = 2277,
Zo_DataQualityID = 2290,
Zo_DateCode = 2304,
Zo_DecelerationTimeLift = 2313,
Zo_Dimmer = 2334,
Zo_DimmerDown = 2341,
Zo_DimmerMove = 2352,
Zo_DimmerOptions = 2363,
Zo_DimmerRemainingTime = 2377,
Zo_DimmerStep = 2397,
Zo_DimmerStepDown = 2408,
Zo_DimmerStepUp = 2423,
Zo_DimmerStop = 2436,
Zo_DimmerUp = 2447,
Zo_DoorClosedEvents = 2456,
Zo_DoorOpenEvents = 2473,
Zo_DoorState = 2488,
Zo_DriftCompensation = 2498,
Zo_DstEnd = 2516,
Zo_DstShift = 2523,
Zo_DstStart = 2532,
Zo_EnergyFormatting = 2541,
Zo_EnergyRemote = 2558,
Zo_EnergyTotal = 2571,
Zo_EurotronicErrors = 2583,
Zo_EurotronicHostFlags = 2600,
Zo_FastPollTimeout = 2620,
Zo_FastPollTimeoutMax = 2636,
Zo_Fire = 2655,
Zo_FlowMaxMeasuredValue = 2660,
Zo_FlowMinMeasuredValue = 2681,
Zo_FlowRate = 2702,
Zo_FlowTolerance = 2711,
Zo_GenericDeviceClass = 2725,
Zo_GenericDeviceType = 2744,
Zo_GetAllGroups = 2762,
Zo_GetGroup = 2775,
Zo_GetSceneMembership = 2784,
Zo_GlassBreak = 2803,
Zo_GroupNameSupport = 2814,
Zo_HWVersion = 2831,
Zo_Hue = 2841,
Zo_HueMove = 2845,
Zo_HueSat = 2853,
Zo_HueStep = 2860,
Zo_HueStepDown = 2868,
Zo_HueStepUp = 2880,
Zo_Humidity = 2890,
Zo_HumidityMaxMeasuredValue = 2899,
Zo_HumidityMinMeasuredValue = 2924,
Zo_HumidityTolerance = 2949,
Zo_Identify = 2967,
Zo_IdentifyQuery = 2976,
Zo_IdentifyTime = 2990,
Zo_Illuminance = 3003,
Zo_IlluminanceLevelStatus = 3015,
Zo_IlluminanceLightSensorType = 3038,
Zo_IlluminanceMaxMeasuredValue = 3065,
Zo_IlluminanceMinMeasuredValue = 3093,
Zo_IlluminanceTargetLevel = 3121,
Zo_IlluminanceTolerance = 3144,
Zo_InstalledClosedLimitLift = 3165,
Zo_InstalledClosedLimitTilt = 3190,
Zo_InstalledOpenLimitLift = 3215,
Zo_InstalledOpenLimitTilt = 3238,
Zo_IntermediateSetpointsLift = 3261,
Zo_IntermediateSetpointsTilt = 3287,
Zo_LastMessageLQI = 3313,
Zo_LastMessageRSSI = 3328,
Zo_LastSetTime = 3344,
Zo_LegrandHeatingMode = 3356,
Zo_LegrandMode = 3375,
Zo_LegrandOpt1 = 3387,
Zo_LegrandOpt2 = 3399,
Zo_LegrandOpt3 = 3411,
Zo_LidlPower = 3423,
Zo_LocalTemperature = 3433,
Zo_LocalTemperatureCalibration = 3450,
Zo_LocalTime = 3478,
Zo_LocationAge = 3488,
Zo_LocationMethod = 3500,
Zo_LocationType = 3515,
Zo_LockState = 3528,
Zo_LockType = 3538,
Zo_LongPollInterval = 3547,
Zo_LongPollIntervalMin = 3564,
Zo_MainsFrequency = 3584,
Zo_MainsVoltage = 3599,
Zo_Manufacturer = 3612,
Zo_MaxTempExperienced = 3625,
Zo_MeterTypeID = 3644,
Zo_MinTempExperienced = 3656,
Zo_Mode = 3675,
Zo_Model = 3680,
Zo_ModelId = 3686,
Zo_MotorStepSize = 3694,
Zo_Movement = 3708,
Zo_MullerLightMode = 3717,
Zo_MultiApplicationType = 3733,
Zo_MultiDescription = 3754,
Zo_MultiInApplicationType = 3771,
Zo_MultiInDescription = 3794,
Zo_MultiInNumberOfStates = 3813,
Zo_MultiInOutOfService = 3835,
Zo_MultiInReliability = 3855,
Zo_MultiInStatusFlags = 3874,
Zo_MultiInValue = 3893,
Zo_MultiNumberOfStates = 3906,
Zo_MultiOutApplicationType = 3926,
Zo_MultiOutDescription = 3950,
Zo_MultiOutNumberOfStates = 3970,
Zo_MultiOutOfService = 3993,
Zo_MultiOutOutOfService = 4011,
Zo_MultiOutReliability = 4032,
Zo_MultiOutRelinquishDefault = 4052,
Zo_MultiOutStatusFlags = 4078,
Zo_MultiOutValue = 4098,
Zo_MultiReliability = 4112,
Zo_MultiRelinquishDefault = 4129,
Zo_MultiStatusFlags = 4152,
Zo_MultiValue = 4169,
Zo_MultipleScheduling = 4180,
Zo_NumberOfDevices = 4199,
Zo_NumberOfPrimaries = 4215,
Zo_NumberOfResets = 4233,
Zo_NumberofActuationsLift = 4248,
Zo_NumberofActuationsTilt = 4271,
Zo_Occupancy = 4294,
Zo_OccupancySensorType = 4304,
Zo_OccupiedCoolingSetpoint = 4324,
Zo_OccupiedHeatingSetpoint = 4348,
Zo_OnOffTransitionTime = 4372,
Zo_OpenPeriod = 4392,
Zo_OppleMode = 4403,
Zo_OutdoorTemperature = 4413,
Zo_OverTempTotalDwell = 4432,
Zo_PICoolingDemand = 4451,
Zo_PIHeatingDemand = 4467,
Zo_POD = 4483,
Zo_Panic = 4487,
Zo_PartNumber = 4493,
Zo_PersistentMemoryWrites = 4504,
Zo_PersonalAlarm = 4527,
Zo_PhysicalClosedLimit = 4541,
Zo_PhysicalClosedLimitLift = 4561,
Zo_PhysicalClosedLimitTilt = 4585,
Zo_Power = 4609,
Zo_Power2 = 4615,
Zo_Power3 = 4622,
Zo_Power4 = 4629,
Zo_PowerOffEffect = 4636,
Zo_PowerOnRecall = 4651,
Zo_PowerOnTimer = 4665,
Zo_PowerSource = 4678,
Zo_PowerThreshold = 4690,
Zo_Pressure = 4705,
Zo_PressureMaxMeasuredValue = 4714,
Zo_PressureMaxScaledValue = 4739,
Zo_PressureMinMeasuredValue = 4762,
Zo_PressureMinScaledValue = 4787,
Zo_PressureScale = 4810,
Zo_PressureScaledTolerance = 4824,
Zo_PressureScaledValue = 4848,
Zo_PressureTolerance = 4868,
Zo_Primary1Intensity = 4886,
Zo_Primary1X = 4904,
Zo_Primary1Y = 4914,
Zo_Primary2Intensity = 4924,
Zo_Primary2X = 4942,
Zo_Primary2Y = 4952,
Zo_Primary3Intensity = 4962,
Zo_Primary3X = 4980,
Zo_Primary3Y = 4990,
Zo_ProductCode = 5000,
Zo_ProductRevision = 5012,
Zo_ProductURL = 5028,
Zo_QualityMeasure = 5039,
Zo_RGB = 5054,
Zo_RMSCurrent = 5058,
Zo_RMSVoltage = 5069,
Zo_ReactivePower = 5080,
Zo_RecallScene = 5094,
Zo_RemainingTime = 5106,
Zo_RemoteSensing = 5120,
Zo_RemoveAllGroups = 5134,
Zo_RemoveAllScenes = 5150,
Zo_RemoveGroup = 5166,
Zo_RemoveScene = 5178,
Zo_ResetAlarm = 5190,
Zo_ResetAllAlarms = 5201,
Zo_SWBuildID = 5216,
Zo_Sat = 5226,
Zo_SatMove = 5230,
Zo_SatStep = 5238,
Zo_SceneCount = 5246,
Zo_SceneValid = 5257,
Zo_ScheduleMode = 5268,
Zo_SeaPressure = 5281,
Zo_ShortPollInterval = 5293,
Zo_Shutter = 5311,
Zo_ShutterClose = 5319,
Zo_ShutterLift = 5332,
Zo_ShutterOpen = 5344,
Zo_ShutterStop = 5356,
Zo_ShutterTilt = 5368,
Zo_SoftwareRevision = 5380,
Zo_StackVersion = 5397,
Zo_StandardTime = 5410,
Zo_StartUpOnOff = 5423,
Zo_Status = 5436,
Zo_StoreScene = 5443,
Zo_SwitchType = 5454,
Zo_SystemMode = 5465,
Zo_TRVBoost = 5476,
Zo_TRVChildProtection = 5485,
Zo_TRVMirrorDisplay = 5504,
Zo_TRVMode = 5521,
Zo_TRVWindowOpen = 5529,
Zo_TempTarget = 5543,
Zo_Temperature = 5554,
Zo_TemperatureMaxMeasuredValue = 5566,
Zo_TemperatureMinMeasuredValue = 5594,
Zo_TemperatureTolerance = 5622,
Zo_TerncyDuration = 5643,
Zo_TerncyRotate = 5658,
Zo_ThSetpoint = 5671,
Zo_Time = 5682,
Zo_TimeEpoch = 5687,
Zo_TimeStatus = 5697,
Zo_TimeZone = 5708,
Zo_TotalProfileNum = 5717,
Zo_TuyaAutoLock = 5733,
Zo_TuyaAwayDays = 5746,
Zo_TuyaAwayTemp = 5759,
Zo_TuyaBattery = 5772,
Zo_TuyaBoostTime = 5784,
Zo_TuyaCalibration = 5798,
Zo_TuyaCalibrationTime = 5814,
Zo_TuyaChildLock = 5834,
Zo_TuyaComfortTemp = 5848,
Zo_TuyaEcoTemp = 5864,
Zo_TuyaFanMode = 5876,
Zo_TuyaForceMode = 5888,
Zo_TuyaMCUVersion = 5902,
Zo_TuyaMaxTemp = 5917,
Zo_TuyaMinTemp = 5929,
Zo_TuyaMotorReversal = 5941,
Zo_TuyaMovingState = 5959,
Zo_TuyaPreset = 5975,
Zo_TuyaQuery = 5986,
Zo_TuyaScheduleHolidays = 5996,
Zo_TuyaScheduleWorkdays = 6017,
Zo_TuyaTempTarget = 6038,
Zo_TuyaValveDetection = 6053,
Zo_TuyaValvePosition = 6072,
Zo_TuyaWeekSelect = 6090,
Zo_TuyaWindowDetection = 6105,
Zo_UnoccupiedCoolingSetpoint = 6125,
Zo_UnoccupiedHeatingSetpoint = 6151,
Zo_UtilityName = 6177,
Zo_ValidUntilTime = 6189,
Zo_ValvePosition = 6204,
Zo_VelocityLift = 6218,
Zo_ViewGroup = 6231,
Zo_ViewScene = 6241,
Zo_Water = 6251,
Zo_WhitePointX = 6257,
Zo_WhitePointY = 6269,
Zo_WindowCoveringType = 6281,
Zo_X = 6300,
Zo_Y = 6302,
Zo_ZCLVersion = 6304,
Zo_ZoneState = 6315,
Zo_ZoneStatus = 6325,
Zo_ZoneStatusChange = 6336,
Zo_ZoneType = 6353,
Zo__ = 6362,
Zo_xx = 6364,
Zo_xx000A00 = 6367,
Zo_xx0A = 6376,
Zo_xx0A00 = 6381,
Zo_xx19 = 6388,
Zo_xx190A = 6393,
Zo_xx190A00 = 6400,
Zo_xxxx = 6409,
Zo_xxxx00 = 6414,
Zo_xxxx0A00 = 6421,
Zo_xxxxyy = 6430,
Zo_xxxxyyyy = 6437,
Zo_xxxxyyyy0A00 = 6446,
Zo_xxxxyyzz = 6459,
Zo_xxyy = 6468,
Zo_xxyy0A00 = 6473,
Zo_xxyyyy = 6482,
Zo_xxyyyy000000000000 = 6489,
Zo_xxyyyy0A0000000000 = 6508,
Zo_xxyyyyzz = 6527,
Zo_xxyyyyzzzz = 6536,
Zo_xxyyzzzz = 6547,
};

View File

@ -91,8 +91,11 @@ const Z_CommandConverter Z_Commands[] PROGMEM = {
{ Z_(Shutter), 0x0102, 0xFF, 0x01, Z_() },
// Legrand - Manuf 1021
{ Z_(LegrandMode), 0xFC40, 0x00, 0x01, Z_(xx) },
// Tuya Generix
{ Z_(TuyaQuery), 0xEF00, 0x03, 0x01, Z_()}, // Generic Tuya command to ask for reporting of all attributes
{ Z_(TuyaMCUVersion), 0xEF00, 0x10, 0x01, Z_(0101)}, // Generic Tuya command to ask MCU version (includes a dummy seq number for now)
// Blitzwolf PIR
{ Z_(Occupancy), 0xEF00, 0x01, 0x82, Z_()}, // Specific decoder for Blitzwolf PIR, empty name means special treatment
{ Z_(Occupancy), 0xEF00, 0x01, 0x82, Z_()}, // Specific decoder for Blitzwolf PIR, empty name means special treatment
// Decoders only - normally not used to send, and names may be masked by previous definitions
{ Z_(Dimmer), 0x0008, 0x00, 0x01, Z_(xx) },
{ Z_(DimmerMove), 0x0008, 0x01, 0x01, Z_(xx0A) },

View File

@ -215,6 +215,8 @@ void zigbeeZCLSendCmd(class ZCLFrame &zcl) {
}
}
// Definitive doc for Tuya protocol:
// https://developer.tuya.com/en/docs/iot-device-dev/tuya-zigbee-universal-docking-access-standard?id=K9ik6zvofpzql#subtitle-6-Private%20cluster
// Special encoding for multiplier:
// multiplier == 0: ignore
// multiplier == 1: ignore
@ -246,8 +248,8 @@ bool ZbTuyaWrite(SBuffer & buf, const Z_attribute & attr) {
uint8_t tuyatype = (attr.key.id.attr_id >> 8);
uint8_t dpid = (attr.key.id.attr_id & 0xFF);
buf.add8(tuyatype);
buf.add8(dpid);
buf.add8(tuyatype);
// the next attribute is length 16 bits in big endian
// high byte is always 0x00