diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index 7289ce970..a40a1ada3 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -5,6 +5,7 @@ - Add command ``PowerDelta1`` to ``PowerDelta3`` to trigger on up to three phases (#9134) - Add Zigbee web ui widget for Lights - Add ``SetOption109 1`` to force gen1 Alexa mode, for Echo Dot 2nd gen devices only +- Add Zigbee web ui for power metering plugs ### 8.4.0.2 20200813 diff --git a/tasmota/xdrv_23_zigbee_2_devices.ino b/tasmota/xdrv_23_zigbee_2_devices.ino index 68ba55d42..aa7ea9d2c 100644 --- a/tasmota/xdrv_23_zigbee_2_devices.ino +++ b/tasmota/xdrv_23_zigbee_2_devices.ino @@ -90,6 +90,9 @@ public: int16_t temperature; // temperature in 1/10th of Celsius, 0x8000 if unknown uint16_t pressure; // air pressure in hPa, 0xFFFF if unknown uint8_t humidity; // humidity in percent, 0..100, 0xFF if unknown + // powe plug data + uint16_t mains_voltage; // AC voltage + int16_t mains_power; // Active power // Constructor with all defaults Z_Device(uint16_t _shortaddr, uint64_t _longaddr = 0x00): @@ -116,7 +119,9 @@ public: batterypercent(0xFF), temperature(-0x8000), pressure(0xFFFF), - humidity(0xFF) + humidity(0xFF), + mains_voltage(0xFFFF), + mains_power(-0x8000) { }; inline bool valid(void) const { return BAD_SHORTADDR != shortaddr; } // is the device known, valid and found? @@ -142,6 +147,9 @@ public: inline bool validPressure(void) const { return 0xFFFF != pressure; } inline bool validHumidity(void) const { return 0xFF != humidity; } + inline bool validMainsVoltage(void) const { return 0xFFFF != mains_voltage; } + inline bool validMainsPower(void) const { return -0x8000 != mains_power; } + inline void setReachable(bool reachable) { bitWrite(power, 7, reachable); } inline bool getReachable(void) const { return bitRead(power, 7); } inline void setPower(bool power_on) { bitWrite(power, 0, power_on); bitWrite(power, 1, false); } diff --git a/tasmota/xdrv_23_zigbee_5__constants.ino b/tasmota/xdrv_23_zigbee_5__constants.ino index 01ac1834a..12a299a5f 100644 --- a/tasmota/xdrv_23_zigbee_5__constants.ino +++ b/tasmota/xdrv_23_zigbee_5__constants.ino @@ -102,7 +102,6 @@ const char Z_strings[] PROGMEM = "CurrentScene" "\x00" "CurrentGroup" "\x00" "SceneValid" "\x00" - "NameSupport" "\x00" "Power" "\x00" "StartUpOnOff" "\x00" "SwitchType" "\x00" @@ -110,10 +109,6 @@ const char Z_strings[] PROGMEM = "DimmerOptions" "\x00" "DimmerRemainingTime" "\x00" "OnOffTransitionTime" "\x00" - "OnLevel" "\x00" - "OnTransitionTime" "\x00" - "OffTransitionTime" "\x00" - "DefaultMoveRate" "\x00" "AlarmCount" "\x00" "Time" "\x00" "TimeStatus" "\x00" @@ -131,16 +126,12 @@ const char Z_strings[] PROGMEM = "LocationAge" "\x00" "QualityMeasure" "\x00" "NumberOfDevices" "\x00" - "AnalogInActiveText" "\x00" "AnalogInDescription" "\x00" - "AnalogInInactiveText" "\x00" "AnalogInMaxValue" "\x00" "AnalogInMinValue" "\x00" "AnalogInOutOfService" "\x00" "AqaraRotate" "\x00" - "AnalogInPriorityArray" "\x00" "AnalogInReliability" "\x00" - "AnalogInRelinquishDefault" "\x00" "AnalogInResolution" "\x00" "AnalogInStatusFlags" "\x00" "AnalogInEngineeringUnits" "\x00" @@ -151,7 +142,6 @@ const char Z_strings[] PROGMEM = "AnalogOutMinValue" "\x00" "AnalogOutOutOfService" "\x00" "AnalogOutValue" "\x00" - "AnalogOutPriorityArray" "\x00" "AnalogOutReliability" "\x00" "AnalogOutRelinquishDefault" "\x00" "AnalogOutResolution" "\x00" @@ -173,7 +163,6 @@ const char Z_strings[] PROGMEM = "BinaryInOutOfService" "\x00" "BinaryInPolarity" "\x00" "BinaryInValue" "\x00" - "BinaryInPriorityArray" "\x00" "BinaryInReliability" "\x00" "BinaryInStatusFlags" "\x00" "BinaryInApplicationType" "\x00" @@ -185,7 +174,6 @@ const char Z_strings[] PROGMEM = "BinaryOutOutOfService" "\x00" "BinaryOutPolarity" "\x00" "BinaryOutValue" "\x00" - "BinaryOutPriorityArray" "\x00" "BinaryOutReliability" "\x00" "BinaryOutRelinquishDefault" "\x00" "BinaryOutStatusFlags" "\x00" @@ -197,12 +185,10 @@ const char Z_strings[] PROGMEM = "BinaryMinimumOnTime" "\x00" "BinaryOutOfService" "\x00" "BinaryValue" "\x00" - "BinaryPriorityArray" "\x00" "BinaryReliability" "\x00" "BinaryRelinquishDefault" "\x00" "BinaryStatusFlags" "\x00" "BinaryApplicationType" "\x00" - "MultiInStateText" "\x00" "MultiInDescription" "\x00" "MultiInNumberOfStates" "\x00" "MultiInOutOfService" "\x00" @@ -210,17 +196,14 @@ const char Z_strings[] PROGMEM = "MultiInReliability" "\x00" "MultiInStatusFlags" "\x00" "MultiInApplicationType" "\x00" - "MultiOutStateText" "\x00" "MultiOutDescription" "\x00" "MultiOutNumberOfStates" "\x00" "MultiOutOutOfService" "\x00" "MultiOutValue" "\x00" - "MultiOutPriorityArray" "\x00" "MultiOutReliability" "\x00" "MultiOutRelinquishDefault" "\x00" "MultiOutStatusFlags" "\x00" "MultiOutApplicationType" "\x00" - "MultiStateText" "\x00" "MultiDescription" "\x00" "MultiNumberOfStates" "\x00" "MultiOutOfService" "\x00" @@ -340,6 +323,7 @@ const char Z_strings[] PROGMEM = "ZoneState" "\x00" "ZoneType" "\x00" "ZoneStatus" "\x00" + "CurrentSummDelivered" "\x00" "CompanyName" "\x00" "MeterTypeID" "\x00" "DataQualityID" "\x00" @@ -352,6 +336,9 @@ const char Z_strings[] PROGMEM = "POD" "\x00" "AvailablePower" "\x00" "PowerThreshold" "\x00" + "RMSVoltage" "\x00" + "RMSCurrent" "\x00" + "ActivePower" "\x00" "NumberOfResets" "\x00" "PersistentMemoryWrites" "\x00" "LastMessageLQI" "\x00" @@ -447,7 +434,6 @@ const char Z_strings[] PROGMEM = "StoreScene" "\x00" ; - enum Z_offsets { Zo_ = 0, Zo_ZCLVersion = 1, @@ -477,349 +463,336 @@ enum Z_offsets { Zo_CurrentScene = 336, Zo_CurrentGroup = 349, Zo_SceneValid = 362, - Zo_NameSupport = 373, - Zo_Power = 385, - Zo_StartUpOnOff = 391, - Zo_SwitchType = 404, - Zo_Dimmer = 415, - Zo_DimmerOptions = 422, - Zo_DimmerRemainingTime = 436, - Zo_OnOffTransitionTime = 456, - Zo_OnLevel = 476, - Zo_OnTransitionTime = 484, - Zo_OffTransitionTime = 501, - Zo_DefaultMoveRate = 519, - Zo_AlarmCount = 535, - Zo_Time = 546, - Zo_TimeStatus = 551, - Zo_TimeZone = 562, - Zo_DstStart = 571, - Zo_DstEnd = 580, - Zo_DstShift = 587, - Zo_StandardTime = 596, - Zo_LocalTime = 609, - Zo_LastSetTime = 619, - Zo_ValidUntilTime = 631, - Zo_TimeEpoch = 646, - Zo_LocationType = 656, - Zo_LocationMethod = 669, - Zo_LocationAge = 684, - Zo_QualityMeasure = 696, - Zo_NumberOfDevices = 711, - Zo_AnalogInActiveText = 727, - Zo_AnalogInDescription = 746, - Zo_AnalogInInactiveText = 766, - Zo_AnalogInMaxValue = 787, - Zo_AnalogInMinValue = 804, - Zo_AnalogInOutOfService = 821, - Zo_AqaraRotate = 842, - Zo_AnalogInPriorityArray = 854, - Zo_AnalogInReliability = 876, - Zo_AnalogInRelinquishDefault = 896, - Zo_AnalogInResolution = 922, - Zo_AnalogInStatusFlags = 941, - Zo_AnalogInEngineeringUnits = 961, - Zo_AnalogInApplicationType = 986, - Zo_Aqara_FF05 = 1010, - Zo_AnalogOutDescription = 1021, - Zo_AnalogOutMaxValue = 1042, - Zo_AnalogOutMinValue = 1060, - Zo_AnalogOutOutOfService = 1078, - Zo_AnalogOutValue = 1100, - Zo_AnalogOutPriorityArray = 1115, - Zo_AnalogOutReliability = 1138, - Zo_AnalogOutRelinquishDefault = 1159, - Zo_AnalogOutResolution = 1186, - Zo_AnalogOutStatusFlags = 1206, - Zo_AnalogOutEngineeringUnits = 1227, - Zo_AnalogOutApplicationType = 1253, - Zo_AnalogDescription = 1278, - Zo_AnalogOutOfService = 1296, - Zo_AnalogValue = 1315, - Zo_AnalogPriorityArray = 1327, - Zo_AnalogReliability = 1347, - Zo_AnalogRelinquishDefault = 1365, - Zo_AnalogStatusFlags = 1389, - Zo_AnalogEngineeringUnits = 1407, - Zo_AnalogApplicationType = 1430, - Zo_BinaryInActiveText = 1452, - Zo_BinaryInDescription = 1471, - Zo_BinaryInInactiveText = 1491, - Zo_BinaryInOutOfService = 1512, - Zo_BinaryInPolarity = 1533, - Zo_BinaryInValue = 1550, - Zo_BinaryInPriorityArray = 1564, - Zo_BinaryInReliability = 1586, - Zo_BinaryInStatusFlags = 1606, - Zo_BinaryInApplicationType = 1626, - Zo_BinaryOutActiveText = 1650, - Zo_BinaryOutDescription = 1670, - Zo_BinaryOutInactiveText = 1691, - Zo_BinaryOutMinimumOffTime = 1713, - Zo_BinaryOutMinimumOnTime = 1737, - Zo_BinaryOutOutOfService = 1760, - Zo_BinaryOutPolarity = 1782, - Zo_BinaryOutValue = 1800, - Zo_BinaryOutPriorityArray = 1815, - Zo_BinaryOutReliability = 1838, - Zo_BinaryOutRelinquishDefault = 1859, - Zo_BinaryOutStatusFlags = 1886, - Zo_BinaryOutApplicationType = 1907, - Zo_BinaryActiveText = 1932, - Zo_BinaryDescription = 1949, - Zo_BinaryInactiveText = 1967, - Zo_BinaryMinimumOffTime = 1986, - Zo_BinaryMinimumOnTime = 2007, - Zo_BinaryOutOfService = 2027, - Zo_BinaryValue = 2046, - Zo_BinaryPriorityArray = 2058, - Zo_BinaryReliability = 2078, - Zo_BinaryRelinquishDefault = 2096, - Zo_BinaryStatusFlags = 2120, - Zo_BinaryApplicationType = 2138, - Zo_MultiInStateText = 2160, - Zo_MultiInDescription = 2177, - Zo_MultiInNumberOfStates = 2196, - Zo_MultiInOutOfService = 2218, - Zo_MultiInValue = 2238, - Zo_MultiInReliability = 2251, - Zo_MultiInStatusFlags = 2270, - Zo_MultiInApplicationType = 2289, - Zo_MultiOutStateText = 2312, - Zo_MultiOutDescription = 2330, - Zo_MultiOutNumberOfStates = 2350, - Zo_MultiOutOutOfService = 2373, - Zo_MultiOutValue = 2394, - Zo_MultiOutPriorityArray = 2408, - Zo_MultiOutReliability = 2430, - Zo_MultiOutRelinquishDefault = 2450, - Zo_MultiOutStatusFlags = 2476, - Zo_MultiOutApplicationType = 2496, - Zo_MultiStateText = 2520, - Zo_MultiDescription = 2535, - Zo_MultiNumberOfStates = 2552, - Zo_MultiOutOfService = 2572, - Zo_MultiValue = 2590, - Zo_MultiReliability = 2601, - Zo_MultiRelinquishDefault = 2618, - Zo_MultiStatusFlags = 2641, - Zo_MultiApplicationType = 2658, - Zo_TotalProfileNum = 2679, - Zo_MultipleScheduling = 2695, - Zo_EnergyFormatting = 2714, - Zo_EnergyRemote = 2731, - Zo_ScheduleMode = 2744, - Zo_CheckinInterval = 2757, - Zo_LongPollInterval = 2773, - Zo_ShortPollInterval = 2790, - Zo_FastPollTimeout = 2808, - Zo_CheckinIntervalMin = 2824, - Zo_LongPollIntervalMin = 2843, - Zo_FastPollTimeoutMax = 2863, - Zo_PhysicalClosedLimit = 2882, - Zo_MotorStepSize = 2902, - Zo_Status = 2916, - Zo_ClosedLimit = 2923, - Zo_Mode = 2935, - Zo_LockState = 2940, - Zo_LockType = 2950, - Zo_ActuatorEnabled = 2959, - Zo_DoorState = 2975, - Zo_DoorOpenEvents = 2985, - Zo_DoorClosedEvents = 3000, - Zo_OpenPeriod = 3017, - Zo_AqaraVibrationMode = 3028, - Zo_AqaraVibrationsOrAngle = 3047, - Zo_AqaraVibration505 = 3070, - Zo_AqaraAccelerometer = 3088, - Zo_WindowCoveringType = 3107, - Zo_PhysicalClosedLimitLift = 3126, - Zo_PhysicalClosedLimitTilt = 3150, - Zo_CurrentPositionLift = 3174, - Zo_CurrentPositionTilt = 3194, - Zo_NumberofActuationsLift = 3214, - Zo_NumberofActuationsTilt = 3237, - Zo_ConfigStatus = 3260, - Zo_CurrentPositionLiftPercentage = 3273, - Zo_CurrentPositionTiltPercentage = 3303, - Zo_InstalledOpenLimitLift = 3333, - Zo_InstalledClosedLimitLift = 3356, - Zo_InstalledOpenLimitTilt = 3381, - Zo_InstalledClosedLimitTilt = 3404, - Zo_VelocityLift = 3429, - Zo_AccelerationTimeLift = 3442, - Zo_DecelerationTimeLift = 3463, - Zo_IntermediateSetpointsLift = 3484, - Zo_IntermediateSetpointsTilt = 3510, - Zo_Hue = 3536, - Zo_Sat = 3540, - Zo_RemainingTime = 3544, - Zo_X = 3558, - Zo_Y = 3560, - Zo_DriftCompensation = 3562, - Zo_CompensationText = 3580, - Zo_CT = 3597, - Zo_ColorMode = 3600, - Zo_NumberOfPrimaries = 3610, - Zo_Primary1X = 3628, - Zo_Primary1Y = 3638, - Zo_Primary1Intensity = 3648, - Zo_Primary2X = 3666, - Zo_Primary2Y = 3676, - Zo_Primary2Intensity = 3686, - Zo_Primary3X = 3704, - Zo_Primary3Y = 3714, - Zo_Primary3Intensity = 3724, - Zo_WhitePointX = 3742, - Zo_WhitePointY = 3754, - Zo_ColorPointRX = 3766, - Zo_ColorPointRY = 3779, - Zo_ColorPointRIntensity = 3792, - Zo_ColorPointGX = 3813, - Zo_ColorPointGY = 3826, - Zo_ColorPointGIntensity = 3839, - Zo_ColorPointBX = 3860, - Zo_ColorPointBY = 3873, - Zo_ColorPointBIntensity = 3886, - Zo_Illuminance = 3907, - Zo_IlluminanceMinMeasuredValue = 3919, - Zo_IlluminanceMaxMeasuredValue = 3947, - Zo_IlluminanceTolerance = 3975, - Zo_IlluminanceLightSensorType = 3996, - Zo_IlluminanceLevelStatus = 4023, - Zo_IlluminanceTargetLevel = 4046, - Zo_Temperature = 4069, - Zo_TemperatureMinMeasuredValue = 4081, - Zo_TemperatureMaxMeasuredValue = 4109, - Zo_TemperatureTolerance = 4137, - Zo_PressureUnit = 4158, - Zo_Pressure = 4171, - Zo_PressureMinMeasuredValue = 4180, - Zo_PressureMaxMeasuredValue = 4205, - Zo_PressureTolerance = 4230, - Zo_PressureScaledValue = 4248, - Zo_PressureMinScaledValue = 4268, - Zo_PressureMaxScaledValue = 4291, - Zo_PressureScaledTolerance = 4314, - Zo_PressureScale = 4338, - Zo_FlowRate = 4352, - Zo_FlowMinMeasuredValue = 4361, - Zo_FlowMaxMeasuredValue = 4382, - Zo_FlowTolerance = 4403, - Zo_Humidity = 4417, - Zo_HumidityMinMeasuredValue = 4426, - Zo_HumidityMaxMeasuredValue = 4451, - Zo_HumidityTolerance = 4476, - Zo_Occupancy = 4494, - Zo_OccupancySensorType = 4504, - Zo_ZoneState = 4524, - Zo_ZoneType = 4534, - Zo_ZoneStatus = 4543, - Zo_CompanyName = 4554, - Zo_MeterTypeID = 4566, - Zo_DataQualityID = 4578, - Zo_CustomerName = 4592, - Zo_Model = 4605, - Zo_PartNumber = 4611, - Zo_ProductRevision = 4622, - Zo_SoftwareRevision = 4638, - Zo_UtilityName = 4655, - Zo_POD = 4667, - Zo_AvailablePower = 4671, - Zo_PowerThreshold = 4686, - Zo_NumberOfResets = 4701, - Zo_PersistentMemoryWrites = 4716, - Zo_LastMessageLQI = 4739, - Zo_LastMessageRSSI = 4754, - Zo_Identify = 4770, - Zo_xxxx = 4779, - Zo_IdentifyQuery = 4784, - Zo_AddGroup = 4798, - Zo_xxxx00 = 4807, - Zo_ViewGroup = 4814, - Zo_GetGroup = 4824, - Zo_01xxxx = 4833, - Zo_GetAllGroups = 4840, - Zo_00 = 4853, - Zo_RemoveGroup = 4856, - Zo_RemoveAllGroups = 4868, - Zo_ViewScene = 4884, - Zo_xxxxyy = 4894, - Zo_RemoveScene = 4901, - Zo_RemoveAllScenes = 4913, - Zo_RecallScene = 4929, - Zo_GetSceneMembership = 4941, - Zo_PowerOffEffect = 4960, - Zo_xxyy = 4975, - Zo_PowerOnRecall = 4980, - Zo_PowerOnTimer = 4994, - Zo_xxyyyyzzzz = 5007, - Zo_xx0A00 = 5018, - Zo_DimmerUp = 5025, - Zo_00190200 = 5034, - Zo_DimmerDown = 5043, - Zo_01190200 = 5054, - Zo_DimmerStop = 5063, - Zo_ResetAlarm = 5074, - Zo_xxyyyy = 5085, - Zo_ResetAllAlarms = 5092, - Zo_xx000A00 = 5107, - Zo_HueSat = 5116, - Zo_xxyy0A00 = 5123, - Zo_Color = 5132, - Zo_xxxxyyyy0A00 = 5138, - Zo_xxxx0A00 = 5151, - Zo_ShutterOpen = 5160, - Zo_ShutterClose = 5172, - Zo_ShutterStop = 5185, - Zo_ShutterLift = 5197, - Zo_xx = 5209, - Zo_ShutterTilt = 5212, - Zo_Shutter = 5224, - Zo_DimmerMove = 5232, - Zo_xx0A = 5243, - Zo_DimmerStepUp = 5248, - Zo_00xx0A00 = 5261, - Zo_DimmerStepDown = 5270, - Zo_01xx0A00 = 5285, - Zo_DimmerStep = 5294, - Zo_xx190A00 = 5305, - Zo_01 = 5314, - Zo_HueMove = 5317, - Zo_xx19 = 5325, - Zo_HueStepUp = 5330, - Zo_HueStepDown = 5340, - Zo_03xx0A00 = 5352, - Zo_HueStep = 5361, - Zo_SatMove = 5369, - Zo_SatStep = 5377, - Zo_xx190A = 5385, - Zo_ColorMove = 5392, - Zo_xxxxyyyy = 5402, - Zo_ColorStep = 5411, - Zo_ColorTempMoveUp = 5421, - Zo_01xxxx000000000000 = 5437, - Zo_ColorTempMoveDown = 5456, - Zo_03xxxx000000000000 = 5474, - Zo_ColorTempMoveStop = 5493, - Zo_00xxxx000000000000 = 5511, - Zo_ColorTempMove = 5530, - Zo_xxyyyy000000000000 = 5544, - Zo_ColorTempStepUp = 5563, - Zo_01xxxx0A0000000000 = 5579, - Zo_ColorTempStepDown = 5598, - Zo_03xxxx0A0000000000 = 5616, - Zo_ColorTempStep = 5635, - Zo_xxyyyy0A0000000000 = 5649, - Zo_ArrowClick = 5668, - Zo_ArrowHold = 5679, - Zo_ArrowRelease = 5689, - Zo_ZoneStatusChange = 5702, - Zo_xxxxyyzz = 5719, - Zo_xxyyzzzz = 5728, - Zo_AddScene = 5737, - Zo_xxyyyyzz = 5746, - Zo_StoreScene = 5755, + Zo_Power = 373, + Zo_StartUpOnOff = 379, + Zo_SwitchType = 392, + Zo_Dimmer = 403, + Zo_DimmerOptions = 410, + Zo_DimmerRemainingTime = 424, + Zo_OnOffTransitionTime = 444, + Zo_AlarmCount = 464, + Zo_Time = 475, + Zo_TimeStatus = 480, + Zo_TimeZone = 491, + Zo_DstStart = 500, + Zo_DstEnd = 509, + Zo_DstShift = 516, + Zo_StandardTime = 525, + Zo_LocalTime = 538, + Zo_LastSetTime = 548, + Zo_ValidUntilTime = 560, + Zo_TimeEpoch = 575, + Zo_LocationType = 585, + Zo_LocationMethod = 598, + Zo_LocationAge = 613, + Zo_QualityMeasure = 625, + Zo_NumberOfDevices = 640, + Zo_AnalogInDescription = 656, + Zo_AnalogInMaxValue = 676, + Zo_AnalogInMinValue = 693, + Zo_AnalogInOutOfService = 710, + Zo_AqaraRotate = 731, + Zo_AnalogInReliability = 743, + Zo_AnalogInResolution = 763, + Zo_AnalogInStatusFlags = 782, + Zo_AnalogInEngineeringUnits = 802, + Zo_AnalogInApplicationType = 827, + Zo_Aqara_FF05 = 851, + Zo_AnalogOutDescription = 862, + Zo_AnalogOutMaxValue = 883, + Zo_AnalogOutMinValue = 901, + Zo_AnalogOutOutOfService = 919, + Zo_AnalogOutValue = 941, + Zo_AnalogOutReliability = 956, + Zo_AnalogOutRelinquishDefault = 977, + Zo_AnalogOutResolution = 1004, + Zo_AnalogOutStatusFlags = 1024, + Zo_AnalogOutEngineeringUnits = 1045, + Zo_AnalogOutApplicationType = 1071, + Zo_AnalogDescription = 1096, + Zo_AnalogOutOfService = 1114, + Zo_AnalogValue = 1133, + Zo_AnalogPriorityArray = 1145, + Zo_AnalogReliability = 1165, + Zo_AnalogRelinquishDefault = 1183, + Zo_AnalogStatusFlags = 1207, + Zo_AnalogEngineeringUnits = 1225, + Zo_AnalogApplicationType = 1248, + Zo_BinaryInActiveText = 1270, + Zo_BinaryInDescription = 1289, + Zo_BinaryInInactiveText = 1309, + Zo_BinaryInOutOfService = 1330, + Zo_BinaryInPolarity = 1351, + Zo_BinaryInValue = 1368, + Zo_BinaryInReliability = 1382, + Zo_BinaryInStatusFlags = 1402, + Zo_BinaryInApplicationType = 1422, + Zo_BinaryOutActiveText = 1446, + Zo_BinaryOutDescription = 1466, + Zo_BinaryOutInactiveText = 1487, + Zo_BinaryOutMinimumOffTime = 1509, + Zo_BinaryOutMinimumOnTime = 1533, + Zo_BinaryOutOutOfService = 1556, + Zo_BinaryOutPolarity = 1578, + Zo_BinaryOutValue = 1596, + Zo_BinaryOutReliability = 1611, + Zo_BinaryOutRelinquishDefault = 1632, + Zo_BinaryOutStatusFlags = 1659, + Zo_BinaryOutApplicationType = 1680, + Zo_BinaryActiveText = 1705, + Zo_BinaryDescription = 1722, + Zo_BinaryInactiveText = 1740, + Zo_BinaryMinimumOffTime = 1759, + Zo_BinaryMinimumOnTime = 1780, + Zo_BinaryOutOfService = 1800, + Zo_BinaryValue = 1819, + Zo_BinaryReliability = 1831, + Zo_BinaryRelinquishDefault = 1849, + Zo_BinaryStatusFlags = 1873, + Zo_BinaryApplicationType = 1891, + Zo_MultiInDescription = 1913, + Zo_MultiInNumberOfStates = 1932, + Zo_MultiInOutOfService = 1954, + Zo_MultiInValue = 1974, + Zo_MultiInReliability = 1987, + Zo_MultiInStatusFlags = 2006, + Zo_MultiInApplicationType = 2025, + Zo_MultiOutDescription = 2048, + Zo_MultiOutNumberOfStates = 2068, + Zo_MultiOutOutOfService = 2091, + Zo_MultiOutValue = 2112, + Zo_MultiOutReliability = 2126, + Zo_MultiOutRelinquishDefault = 2146, + Zo_MultiOutStatusFlags = 2172, + Zo_MultiOutApplicationType = 2192, + Zo_MultiDescription = 2216, + Zo_MultiNumberOfStates = 2233, + Zo_MultiOutOfService = 2253, + Zo_MultiValue = 2271, + Zo_MultiReliability = 2282, + Zo_MultiRelinquishDefault = 2299, + Zo_MultiStatusFlags = 2322, + Zo_MultiApplicationType = 2339, + Zo_TotalProfileNum = 2360, + Zo_MultipleScheduling = 2376, + Zo_EnergyFormatting = 2395, + Zo_EnergyRemote = 2412, + Zo_ScheduleMode = 2425, + Zo_CheckinInterval = 2438, + Zo_LongPollInterval = 2454, + Zo_ShortPollInterval = 2471, + Zo_FastPollTimeout = 2489, + Zo_CheckinIntervalMin = 2505, + Zo_LongPollIntervalMin = 2524, + Zo_FastPollTimeoutMax = 2544, + Zo_PhysicalClosedLimit = 2563, + Zo_MotorStepSize = 2583, + Zo_Status = 2597, + Zo_ClosedLimit = 2604, + Zo_Mode = 2616, + Zo_LockState = 2621, + Zo_LockType = 2631, + Zo_ActuatorEnabled = 2640, + Zo_DoorState = 2656, + Zo_DoorOpenEvents = 2666, + Zo_DoorClosedEvents = 2681, + Zo_OpenPeriod = 2698, + Zo_AqaraVibrationMode = 2709, + Zo_AqaraVibrationsOrAngle = 2728, + Zo_AqaraVibration505 = 2751, + Zo_AqaraAccelerometer = 2769, + Zo_WindowCoveringType = 2788, + Zo_PhysicalClosedLimitLift = 2807, + Zo_PhysicalClosedLimitTilt = 2831, + Zo_CurrentPositionLift = 2855, + Zo_CurrentPositionTilt = 2875, + Zo_NumberofActuationsLift = 2895, + Zo_NumberofActuationsTilt = 2918, + Zo_ConfigStatus = 2941, + Zo_CurrentPositionLiftPercentage = 2954, + Zo_CurrentPositionTiltPercentage = 2984, + Zo_InstalledOpenLimitLift = 3014, + Zo_InstalledClosedLimitLift = 3037, + Zo_InstalledOpenLimitTilt = 3062, + Zo_InstalledClosedLimitTilt = 3085, + Zo_VelocityLift = 3110, + Zo_AccelerationTimeLift = 3123, + Zo_DecelerationTimeLift = 3144, + Zo_IntermediateSetpointsLift = 3165, + Zo_IntermediateSetpointsTilt = 3191, + Zo_Hue = 3217, + Zo_Sat = 3221, + Zo_RemainingTime = 3225, + Zo_X = 3239, + Zo_Y = 3241, + Zo_DriftCompensation = 3243, + Zo_CompensationText = 3261, + Zo_CT = 3278, + Zo_ColorMode = 3281, + Zo_NumberOfPrimaries = 3291, + Zo_Primary1X = 3309, + Zo_Primary1Y = 3319, + Zo_Primary1Intensity = 3329, + Zo_Primary2X = 3347, + Zo_Primary2Y = 3357, + Zo_Primary2Intensity = 3367, + Zo_Primary3X = 3385, + Zo_Primary3Y = 3395, + Zo_Primary3Intensity = 3405, + Zo_WhitePointX = 3423, + Zo_WhitePointY = 3435, + Zo_ColorPointRX = 3447, + Zo_ColorPointRY = 3460, + Zo_ColorPointRIntensity = 3473, + Zo_ColorPointGX = 3494, + Zo_ColorPointGY = 3507, + Zo_ColorPointGIntensity = 3520, + Zo_ColorPointBX = 3541, + Zo_ColorPointBY = 3554, + Zo_ColorPointBIntensity = 3567, + Zo_Illuminance = 3588, + Zo_IlluminanceMinMeasuredValue = 3600, + Zo_IlluminanceMaxMeasuredValue = 3628, + Zo_IlluminanceTolerance = 3656, + Zo_IlluminanceLightSensorType = 3677, + Zo_IlluminanceLevelStatus = 3704, + Zo_IlluminanceTargetLevel = 3727, + Zo_Temperature = 3750, + Zo_TemperatureMinMeasuredValue = 3762, + Zo_TemperatureMaxMeasuredValue = 3790, + Zo_TemperatureTolerance = 3818, + Zo_PressureUnit = 3839, + Zo_Pressure = 3852, + Zo_PressureMinMeasuredValue = 3861, + Zo_PressureMaxMeasuredValue = 3886, + Zo_PressureTolerance = 3911, + Zo_PressureScaledValue = 3929, + Zo_PressureMinScaledValue = 3949, + Zo_PressureMaxScaledValue = 3972, + Zo_PressureScaledTolerance = 3995, + Zo_PressureScale = 4019, + Zo_FlowRate = 4033, + Zo_FlowMinMeasuredValue = 4042, + Zo_FlowMaxMeasuredValue = 4063, + Zo_FlowTolerance = 4084, + Zo_Humidity = 4098, + Zo_HumidityMinMeasuredValue = 4107, + Zo_HumidityMaxMeasuredValue = 4132, + Zo_HumidityTolerance = 4157, + Zo_Occupancy = 4175, + Zo_OccupancySensorType = 4185, + Zo_ZoneState = 4205, + Zo_ZoneType = 4215, + Zo_ZoneStatus = 4224, + Zo_CurrentSummDelivered = 4235, + Zo_CompanyName = 4256, + Zo_MeterTypeID = 4268, + Zo_DataQualityID = 4280, + Zo_CustomerName = 4294, + Zo_Model = 4307, + Zo_PartNumber = 4313, + Zo_ProductRevision = 4324, + Zo_SoftwareRevision = 4340, + Zo_UtilityName = 4357, + Zo_POD = 4369, + Zo_AvailablePower = 4373, + Zo_PowerThreshold = 4388, + Zo_RMSVoltage = 4403, + Zo_RMSCurrent = 4414, + Zo_ActivePower = 4425, + Zo_NumberOfResets = 4437, + Zo_PersistentMemoryWrites = 4452, + Zo_LastMessageLQI = 4475, + Zo_LastMessageRSSI = 4490, + Zo_Identify = 4506, + Zo_xxxx = 4515, + Zo_IdentifyQuery = 4520, + Zo_AddGroup = 4534, + Zo_xxxx00 = 4543, + Zo_ViewGroup = 4550, + Zo_GetGroup = 4560, + Zo_01xxxx = 4569, + Zo_GetAllGroups = 4576, + Zo_00 = 4589, + Zo_RemoveGroup = 4592, + Zo_RemoveAllGroups = 4604, + Zo_ViewScene = 4620, + Zo_xxxxyy = 4630, + Zo_RemoveScene = 4637, + Zo_RemoveAllScenes = 4649, + Zo_RecallScene = 4665, + Zo_GetSceneMembership = 4677, + Zo_PowerOffEffect = 4696, + Zo_xxyy = 4711, + Zo_PowerOnRecall = 4716, + Zo_PowerOnTimer = 4730, + Zo_xxyyyyzzzz = 4743, + Zo_xx0A00 = 4754, + Zo_DimmerUp = 4761, + Zo_00190200 = 4770, + Zo_DimmerDown = 4779, + Zo_01190200 = 4790, + Zo_DimmerStop = 4799, + Zo_ResetAlarm = 4810, + Zo_xxyyyy = 4821, + Zo_ResetAllAlarms = 4828, + Zo_xx000A00 = 4843, + Zo_HueSat = 4852, + Zo_xxyy0A00 = 4859, + Zo_Color = 4868, + Zo_xxxxyyyy0A00 = 4874, + Zo_xxxx0A00 = 4887, + Zo_ShutterOpen = 4896, + Zo_ShutterClose = 4908, + Zo_ShutterStop = 4921, + Zo_ShutterLift = 4933, + Zo_xx = 4945, + Zo_ShutterTilt = 4948, + Zo_Shutter = 4960, + Zo_DimmerMove = 4968, + Zo_xx0A = 4979, + Zo_DimmerStepUp = 4984, + Zo_00xx0A00 = 4997, + Zo_DimmerStepDown = 5006, + Zo_01xx0A00 = 5021, + Zo_DimmerStep = 5030, + Zo_xx190A00 = 5041, + Zo_01 = 5050, + Zo_HueMove = 5053, + Zo_xx19 = 5061, + Zo_HueStepUp = 5066, + Zo_HueStepDown = 5076, + Zo_03xx0A00 = 5088, + Zo_HueStep = 5097, + Zo_SatMove = 5105, + Zo_SatStep = 5113, + Zo_xx190A = 5121, + Zo_ColorMove = 5128, + Zo_xxxxyyyy = 5138, + Zo_ColorStep = 5147, + Zo_ColorTempMoveUp = 5157, + Zo_01xxxx000000000000 = 5173, + Zo_ColorTempMoveDown = 5192, + Zo_03xxxx000000000000 = 5210, + Zo_ColorTempMoveStop = 5229, + Zo_00xxxx000000000000 = 5247, + Zo_ColorTempMove = 5266, + Zo_xxyyyy000000000000 = 5280, + Zo_ColorTempStepUp = 5299, + Zo_01xxxx0A0000000000 = 5315, + Zo_ColorTempStepDown = 5334, + Zo_03xxxx0A0000000000 = 5352, + Zo_ColorTempStep = 5371, + Zo_xxyyyy0A0000000000 = 5385, + Zo_ArrowClick = 5404, + Zo_ArrowHold = 5415, + Zo_ArrowRelease = 5425, + Zo_ZoneStatusChange = 5438, + Zo_xxxxyyzz = 5455, + Zo_xxyyzzzz = 5464, + Zo_AddScene = 5473, + Zo_xxyyyyzz = 5482, + Zo_StoreScene = 5491, }; diff --git a/tasmota/xdrv_23_zigbee_5_converters.ino b/tasmota/xdrv_23_zigbee_5_converters.ino index 7b0f43ab3..68df76d9b 100644 --- a/tasmota/xdrv_23_zigbee_5_converters.ino +++ b/tasmota/xdrv_23_zigbee_5_converters.ino @@ -112,7 +112,7 @@ enum Cx_cluster_short { Cx0008, Cx0009, Cx000A, Cx000B, Cx000C, Cx000D, Cx000E, Cx000F, Cx0010, Cx0011, Cx0012, Cx0013, Cx0014, Cx001A, Cx0020, Cx0100, Cx0101, Cx0102, Cx0300, Cx0400, Cx0401, Cx0402, Cx0403, Cx0404, - Cx0405, Cx0406, Cx0500, Cx0B01, Cx0B05, + Cx0405, Cx0406, Cx0500, Cx0702, Cx0B01, Cx0B04, Cx0B05, }; const uint16_t Cx_cluster[] PROGMEM = { @@ -120,7 +120,7 @@ const uint16_t Cx_cluster[] PROGMEM = { 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x001A, 0x0020, 0x0100, 0x0101, 0x0102, 0x0300, 0x0400, 0x0401, 0x0402, 0x0403, 0x0404, - 0x0405, 0x0406, 0x0500, 0x0B01, 0x0B05, + 0x0405, 0x0406, 0x0500, 0x0702, 0x0B01, 0x0B04, 0x0B05, }; uint16_t CxToCluster(uint8_t cx) { @@ -186,7 +186,7 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zuint8, Cx0005, 0x0001, Z_(CurrentScene), 1, Z_Nop }, { Zuint16, Cx0005, 0x0002, Z_(CurrentGroup), 1, Z_Nop }, { Zbool, Cx0005, 0x0003, Z_(SceneValid), 1, Z_Nop }, - //{ Zmap8, Cx0005, 0x0004, Z_(NameSupport), 1, Z_Nop }, + //{ Zmap8, Cx0005, 0x0004, (NameSupport), 1, Z_Nop }, // On/off cluster { Zbool, Cx0006, 0x0000, Z_(Power), 1, Z_Nop }, @@ -201,10 +201,10 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zmap8, Cx0008, 0x000F, Z_(DimmerOptions), 1, Z_Nop }, { Zuint16, Cx0008, 0x0001, Z_(DimmerRemainingTime), 1, Z_Nop }, { Zuint16, Cx0008, 0x0010, Z_(OnOffTransitionTime), 1, Z_Nop }, - // { Zuint8, Cx0008, 0x0011, Z_(OnLevel), 1, Z_Nop }, - // { Zuint16, Cx0008, 0x0012, Z_(OnTransitionTime), 1, Z_Nop }, - // { Zuint16, Cx0008, 0x0013, Z_(OffTransitionTime), 1, Z_Nop }, - // { Zuint16, Cx0008, 0x0014, Z_(DefaultMoveRate), 1, Z_Nop }, + // { Zuint8, Cx0008, 0x0011, (OnLevel), 1, Z_Nop }, + // { Zuint16, Cx0008, 0x0012, (OnTransitionTime), 1, Z_Nop }, + // { Zuint16, Cx0008, 0x0013, (OffTransitionTime), 1, Z_Nop }, + // { Zuint16, Cx0008, 0x0014, (DefaultMoveRate), 1, Z_Nop }, // Alarms cluster { Zuint16, Cx0009, 0x0000, Z_(AlarmCount), 1, Z_Nop }, @@ -230,16 +230,16 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zuint8, Cx000B, 0x0004, Z_(NumberOfDevices), 1, Z_Nop }, // Analog Input cluster - // { 0xFF, Cx000C, 0x0004, Z_(AnalogInActiveText), 1, Z_Nop }, + // { 0xFF, Cx000C, 0x0004, (AnalogInActiveText), 1, Z_Nop }, { Zstring, Cx000C, 0x001C, Z_(AnalogInDescription), 1, Z_Nop }, - // { 0xFF, Cx000C, 0x002E, Z_(AnalogInInactiveText), 1, Z_Nop }, + // { 0xFF, Cx000C, 0x002E, (AnalogInInactiveText), 1, Z_Nop }, { Zsingle, Cx000C, 0x0041, Z_(AnalogInMaxValue), 1, Z_Nop }, { Zsingle, Cx000C, 0x0045, Z_(AnalogInMinValue), 1, Z_Nop }, { Zbool, Cx000C, 0x0051, Z_(AnalogInOutOfService), 1, Z_Nop }, { Zsingle, Cx000C, 0x0055, Z_(AqaraRotate), 1, Z_Nop }, - // { 0xFF, Cx000C, 0x0057, Z_(AnalogInPriorityArray),1, Z_Nop }, + // { 0xFF, Cx000C, 0x0057, (AnalogInPriorityArray),1, Z_Nop }, { Zenum8, Cx000C, 0x0067, Z_(AnalogInReliability), 1, Z_Nop }, - // { 0xFF, Cx000C, 0x0068, Z_(AnalogInRelinquishDefault),1, Z_Nop }, + // { 0xFF, Cx000C, 0x0068, (AnalogInRelinquishDefault),1, Z_Nop }, { Zsingle, Cx000C, 0x006A, Z_(AnalogInResolution), 1, Z_Nop }, { Zmap8, Cx000C, 0x006F, Z_(AnalogInStatusFlags), 1, Z_Nop }, { Zenum16, Cx000C, 0x0075, Z_(AnalogInEngineeringUnits),1, Z_Nop }, @@ -252,7 +252,7 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zsingle, Cx000D, 0x0045, Z_(AnalogOutMinValue), 1, Z_Nop }, { Zbool, Cx000D, 0x0051, Z_(AnalogOutOutOfService),1, Z_Nop }, { Zsingle, Cx000D, 0x0055, Z_(AnalogOutValue), 1, Z_Nop }, - // { Zunk, Cx000D, 0x0057, Z_(AnalogOutPriorityArray),1, Z_Nop }, + // { Zunk, Cx000D, 0x0057, (AnalogOutPriorityArray),1, Z_Nop }, { Zenum8, Cx000D, 0x0067, Z_(AnalogOutReliability), 1, Z_Nop }, { Zsingle, Cx000D, 0x0068, Z_(AnalogOutRelinquishDefault),1, Z_Nop }, { Zsingle, Cx000D, 0x006A, Z_(AnalogOutResolution), 1, Z_Nop }, @@ -278,7 +278,7 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zbool, Cx000F, 0x0051, Z_(BinaryInOutOfService),1, Z_Nop }, { Zenum8, Cx000F, 0x0054, Z_(BinaryInPolarity), 1, Z_Nop }, { Zstring, Cx000F, 0x0055, Z_(BinaryInValue), 1, Z_Nop }, - // { 0xFF, Cx000F, 0x0057, Z_(BinaryInPriorityArray),1, Z_Nop }, + // { 0xFF, Cx000F, 0x0057, (BinaryInPriorityArray),1, Z_Nop }, { Zenum8, Cx000F, 0x0067, Z_(BinaryInReliability), 1, Z_Nop }, { Zmap8, Cx000F, 0x006F, Z_(BinaryInStatusFlags), 1, Z_Nop }, { Zuint32, Cx000F, 0x0100, Z_(BinaryInApplicationType),1, Z_Nop }, @@ -292,7 +292,7 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zbool, Cx0010, 0x0051, Z_(BinaryOutOutOfService),1, Z_Nop }, { Zenum8, Cx0010, 0x0054, Z_(BinaryOutPolarity), 1, Z_Nop }, { Zbool, Cx0010, 0x0055, Z_(BinaryOutValue), 1, Z_Nop }, - // { Zunk, Cx0010, 0x0057, Z_(BinaryOutPriorityArray),1, Z_Nop }, + // { Zunk, Cx0010, 0x0057, (BinaryOutPriorityArray),1, Z_Nop }, { Zenum8, Cx0010, 0x0067, Z_(BinaryOutReliability), 1, Z_Nop }, { Zbool, Cx0010, 0x0068, Z_(BinaryOutRelinquishDefault),1, Z_Nop }, { Zmap8, Cx0010, 0x006F, Z_(BinaryOutStatusFlags), 1, Z_Nop }, @@ -306,14 +306,14 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zuint32, Cx0011, 0x0043, Z_(BinaryMinimumOnTime), 1, Z_Nop }, { Zbool, Cx0011, 0x0051, Z_(BinaryOutOfService), 1, Z_Nop }, { Zbool, Cx0011, 0x0055, Z_(BinaryValue), 1, Z_Nop }, - // { Zunk, Cx0011, 0x0057, Z_(BinaryPriorityArray), 1, Z_Nop }, + // { Zunk, Cx0011, 0x0057, (BinaryPriorityArray), 1, Z_Nop }, { Zenum8, Cx0011, 0x0067, Z_(BinaryReliability), 1, Z_Nop }, { Zbool, Cx0011, 0x0068, Z_(BinaryRelinquishDefault),1, Z_Nop }, { Zmap8, Cx0011, 0x006F, Z_(BinaryStatusFlags), 1, Z_Nop }, { Zuint32, Cx0011, 0x0100, Z_(BinaryApplicationType),1, Z_Nop }, // Multistate Input cluster - // { Zunk, Cx0012, 0x000E, Z_(MultiInStateText), 1, Z_Nop }, + // { Zunk, Cx0012, 0x000E, (MultiInStateText), 1, Z_Nop }, { Zstring, Cx0012, 0x001C, Z_(MultiInDescription), 1, Z_Nop }, { Zuint16, Cx0012, 0x004A, Z_(MultiInNumberOfStates),1, Z_Nop }, { Zbool, Cx0012, 0x0051, Z_(MultiInOutOfService), 1, Z_Nop }, @@ -324,19 +324,19 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zuint32, Cx0012, 0x0100, Z_(MultiInApplicationType),1, Z_Nop }, // Multistate output - // { Zunk, Cx0013, 0x000E, Z_(MultiOutStateText), 1, Z_Nop }, + // { Zunk, Cx0013, 0x000E, (MultiOutStateText), 1, Z_Nop }, { Zstring, Cx0013, 0x001C, Z_(MultiOutDescription), 1, Z_Nop }, { Zuint16, Cx0013, 0x004A, Z_(MultiOutNumberOfStates),1, Z_Nop }, { Zbool, Cx0013, 0x0051, Z_(MultiOutOutOfService), 1, Z_Nop }, { Zuint16, Cx0013, 0x0055, Z_(MultiOutValue), 1, Z_Nop }, - // { Zunk, Cx0013, 0x0057, Z_(MultiOutPriorityArray),1, Z_Nop }, + // { Zunk, Cx0013, 0x0057, (MultiOutPriorityArray),1, Z_Nop }, { Zenum8, Cx0013, 0x0067, Z_(MultiOutReliability), 1, Z_Nop }, { Zuint16, Cx0013, 0x0068, Z_(MultiOutRelinquishDefault),1, Z_Nop }, { Zmap8, Cx0013, 0x006F, Z_(MultiOutStatusFlags), 1, Z_Nop }, { Zuint32, Cx0013, 0x0100, Z_(MultiOutApplicationType),1, Z_Nop }, // Multistate Value cluster - // { Zunk, Cx0014, 0x000E, Z_(MultiStateText), 1, Z_Nop }, + // { Zunk, Cx0014, 0x000E, (MultiStateText), 1, Z_Nop }, { Zstring, Cx0014, 0x001C, Z_(MultiDescription), 1, Z_Nop }, { Zuint16, Cx0014, 0x004A, Z_(MultiNumberOfStates), 1, Z_Nop }, { Zbool, Cx0014, 0x0051, Z_(MultiOutOfService), 1, Z_Nop }, @@ -496,6 +496,9 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zenum16, Cx0500, 0x0001, Z_(ZoneType), 1, Z_Nop }, // Occupancy (map8) { Zmap16, Cx0500, 0x0002, Z_(ZoneStatus), 1, Z_Nop }, // Occupancy (map8) + // Metering (Smart Energy) cluster + { Zuint48, Cx0702, 0x0000, Z_(CurrentSummDelivered), 1, Z_Nop }, + // Meter Identification cluster { Zstring, Cx0B01, 0x0000, Z_(CompanyName), 1, Z_Nop }, { Zuint16, Cx0B01, 0x0001, Z_(MeterTypeID), 1, Z_Nop }, @@ -510,6 +513,11 @@ const Z_AttributeConverter Z_PostProcess[] PROGMEM = { { Zint24, Cx0B01, 0x000D, Z_(AvailablePower), 1, Z_Nop }, { Zint24, Cx0B01, 0x000E, Z_(PowerThreshold), 1, Z_Nop }, + // Electrical Measurement cluster + { Zuint16, Cx0B04, 0x0505, Z_(RMSVoltage), 1, Z_Nop }, + { Zuint16, Cx0B04, 0x0508, Z_(RMSCurrent), 1, Z_Nop }, + { Zint16, Cx0B04, 0x050B, Z_(ActivePower), 1, Z_Nop }, + // Diagnostics cluster { Zuint16, Cx0B05, 0x0000, Z_(NumberOfResets), 1, Z_Nop }, { Zuint16, Cx0B05, 0x0001, Z_(PersistentMemoryWrites),1, Z_Nop }, @@ -842,9 +850,12 @@ uint32_t parseSingleAttribute(JsonObject& json, char *attrid_str, class SBuffer case Zint64: // int64 { // uint8_t len = attrtype - 0x27; // 5 - 8 - // print as HEX - char hex[2*len+1]; - ToHex_P(buf.buf(i), len, hex, sizeof(hex)); + // print as HEX "0x...." + char hex[2*len+3]; + snprintf_P(hex, sizeof(hex), PSTR("0x")); + for (uint32_t j=0; j┆ %s"), device.getPower() ? PSTR(D_ON) : PSTR(D_OFF)); if (device.validDimmer() && (channels >= 1)) { - WSContentSend_P(PSTR(" 🔅%d%%"), changeUIntScale(device.dimmer,0,254,0,100)); + WSContentSend_P(PSTR(" 🔅 %d%%"), changeUIntScale(device.dimmer,0,254,0,100)); } if (device.validCT() && ((channels == 2) || (channels == 5))) { uint32_t ct_k = (((1000000 / device.ct) + 25) / 50) * 50; @@ -1432,6 +1432,15 @@ void ZigbeeShow(bool json) LightStateClass::XyToRgb(device.x / 65535.0f, device.y / 65535.0f, &r, &g, &b); WSContentSend_P(PSTR(" #%02X%02X%02X"), r,g,b,r,g,b); } + if (device.validMainsPower() || device.validMainsVoltage()) { + WSContentSend_P(PSTR(" ⚡ ")); + if (device.validMainsVoltage()) { + WSContentSend_P(PSTR(" %dV"), device.mains_voltage); + } + if (device.validMainsPower()) { + WSContentSend_P(PSTR(" %dW"), device.mains_power); + } + } } }