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 ### Fixed
- Restore EnergyToday after using command ``restart 2`` and power cycle (#16118) - Restore EnergyToday after using command ``restart 2`` and power cycle (#16118)
- Fixed IR crash on ESP32 (#16173) - Fixed IR crash on ESP32 (#16173)
- Zigbee fix Tuya for writing attributes
### Removed ### Removed

View File

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