예제 #1
0
        void SetLevelOnDevice(uint newLevel)
        {
            ZclCommand command = null;

            // look for level control cluster and move to level command
            var levelControlCluster = m_endPoint.GetCluster(LevelControlCluster.CLUSTER_ID);

            if (levelControlCluster == null ||
                !levelControlCluster.CommandList.TryGetValue(LevelControlCluster.COMMAND_MOVETOLEVEL, out command))
            {
                return;
            }

            // get level parameter
            var parameter = command.GetInputParamByName(LevelControlCluster.LEVEL_PARAM);

            if (parameter == null)
            {
                return;
            }

            // level is a byte in ZCL and a uint32 in LSF
            parameter.Data = (byte)(newLevel / LIGHTLEVEL_SCALERATIO);
            command.Send();
            m_level = newLevel;
        }
예제 #2
0
        private void SetOnOffStateOnDevice(bool newOnOffState)
        {
            ZclCommand command = null;

            // look for OnOff cluster of this end point
            var onOffCluster = m_endPoint.GetCluster(OnOffCluster.CLUSTER_ID);

            if (onOffCluster == null)
            {
                return;
            }

            // get on or off command depending on the on/off state to set
            if (newOnOffState)
            {
                onOffCluster.CommandList.TryGetValue(OnOffCluster.COMMAND_ON, out command);
            }
            else
            {
                onOffCluster.CommandList.TryGetValue(OnOffCluster.COMMAND_OFF, out command);
            }

            if (command == null)
            {
                return;
            }

            // send the command
            command.Send();
            m_onOffState = newOnOffState;
        }
예제 #3
0
        internal OnOffCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }

            // OnOff attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ONOFF))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ONOFF, "OnOff", ZclHelper.BOOLEAN_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // IMPORTANT NOTE,  parameters MUST be added in parameter list of each command
            // in the order specified in ZCL standard

            // Off command (no response required)
            var command = new ZclCommand(this, COMMAND_OFF, "Off", false);

            m_commandList.Add(command.Id, command);
            // On command (no response required)
            command = new ZclCommand(this, COMMAND_ON, "On", false);
            m_commandList.Add(command.Id, command);
            // Toggle command (no response required)
            command = new ZclCommand(this, COMMAND_TOGGLE, "Toggle", false);
            m_commandList.Add(command.Id, command);

            // add ZLL profile specific attributes and commands
            bool areZllAttributesSupported = false;

            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_GLOBALSCENECONTROL_ZLL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_GLOBALSCENECONTROL_ZLL, "GlobalSceneControl", ZclHelper.BOOLEAN_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
                areZllAttributesSupported = true;
            }
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ONTIME_ZLL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ONTIME_ZLL, "OnTime", ZclHelper.UINT16_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
                areZllAttributesSupported = true;
            }
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_OFFWAITTIME_ZLL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_OFFWAITTIME_ZLL, "OnWaitTime", ZclHelper.UINT16_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
                areZllAttributesSupported = true;
            }

            // add ZLL command if ZLL attributes are supported
            if (areZllAttributesSupported)
            {
                command = new ZclCommand(this, COMMAND_OFFWITHEFFECT_ZLL, "OffWithEffect", false);
                var parameter = new ZclValue(ZclHelper.UINT8_TYPE, "EffectIdentifier");
                command.AddInParam(parameter);
                parameter = new ZclValue(ZclHelper.UINT8_TYPE, "EffectVariant");
                command.AddInParam(parameter);
                m_commandList.Add(command.Id, command);

                command = new ZclCommand(this, COMMAND_ONWITHRECALLGLOBALSCENE_ZLL, "OnWithRecallGlobalScene", false);
                m_commandList.Add(command.Id, command);

                command   = new ZclCommand(this, COMMAND_ONWITHTIMEOFF_ZLL, "OnWithTimeOff", false);
                parameter = new ZclValue(ZclHelper.UINT8_TYPE, "OnOffControl");
                command.AddInParam(parameter);
                parameter = new ZclValue(ZclHelper.UINT16_TYPE, "OnTime");
                command.AddInParam(parameter);
                parameter = new ZclValue(ZclHelper.UINT16_TYPE, "OffWaitTime");
                command.AddInParam(parameter);
                m_commandList.Add(command.Id, command);
            }

            // call parent class "post constructor"
            PostChildClassConstructor();
        }
예제 #4
0
        internal LevelControlCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }
            // current level attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTLEVEL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTLEVEL, "CurrentLevel", ZclHelper.UINT8_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // remaining time attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_REMAININGTIME))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_REMAININGTIME, "RemainingTime", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // on/off transition time attribute (read/write)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ONOFFTRANSITIONTIME))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ONOFFTRANSITIONTIME, "OnOffTransitionTime", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // on level attribute (read/write)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ONLEVEL))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ONLEVEL, "OnLevel", ZclHelper.UINT8_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // IMPORTANT NOTE,  parameters MUST be added in parameter list of each command
            // in the order specified in ZCL standard

            // move to level command (no response required)
            var command   = new ZclCommand(this, COMMAND_MOVETOLEVEL, "MoveToLevel", false);
            var parameter = new ZclValue(ZclHelper.UINT8_TYPE, LEVEL_PARAM);

            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Move command (no response required)
            command   = new ZclCommand(this, COMMAND_MOVE, "Move", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "MoveMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Rate");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Step command (no response required)
            command   = new ZclCommand(this, COMMAND_STEP, "Step", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "StepMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "StepSize");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Stop command (no response required)
            command = new ZclCommand(this, COMMAND_STOP, "Stop", false);
            m_commandList.Add(command.Id, command);

            // move to level with on/off command (no response required)
            command   = new ZclCommand(this, COMMAND_MOVETOLEVEL_WITHONOFF, "MoveToLevelWithOnOff", false);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, LEVEL_PARAM);
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Move command (no response required)
            command   = new ZclCommand(this, COMMAND_MOVE_WITHONOFF, "MoveWithOnOff", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "MoveMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Rate");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Step command (no response required)
            command   = new ZclCommand(this, COMMAND_STEP_WITHONOFF, "StepWithOnOff", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "StepMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "StepSize");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // Stop command (no response required)
            command = new ZclCommand(this, COMMAND_STOP_WITHONOFF, "StopWithOnOff", false);
            m_commandList.Add(command.Id, command);

            // call parent class "post constructor"
            PostChildClassConstructor();
        }
예제 #5
0
        internal DoorLockCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }

            // Lock State attribute (read only, mandatory, reportable))
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_LOCKSTATE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_LOCKSTATE, "LockState", ZclHelper.ENUMERATION_8_BIT_TYPE, true, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Lock Type attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_LOCKTYPE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_LOCKTYPE, "LockType", ZclHelper.ENUMERATION_8_BIT_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Actuator Enabled attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_ACTUATORENABLED))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_ACTUATORENABLED, "ActuatorEnabled", ZclHelper.BOOLEAN_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Door State attribute (read only, optional, reportable)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_DOORSTATE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_DOORSTATE, "DoorState", ZclHelper.ENUMERATION_8_BIT_TYPE, true, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Door Open Events attribute
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_DOOROPENEVENTS))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_DOOROPENEVENTS, "DoorOpenEvents", ZclHelper.UINT32_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Door Close Events attribute
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_DOORCLOSEDEVENTS))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_DOORCLOSEDEVENTS, "DoorCloseEvents", ZclHelper.UINT32_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // Open Period attribute
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_OPENPERIOD))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_OPENPERIOD, "OpenPeriod", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // IMPORTANT NOTE,  parameters MUST be added in parameter list of each command
            // in the order specified in ZCL standard

            // Lock door command
            var command   = new ZclCommand(this, COMMAND_LOCKDOOR, "LockDoor", true);
            var parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "Status");

            command.AddOutParam(parameter);
            m_commandList.Add(command.Id, command);

            // Unlock door command
            command   = new ZclCommand(this, COMMAND_UNLOCKDOOR, "UnlockDoor", true);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "Status");
            command.AddOutParam(parameter);
            m_commandList.Add(command.Id, command);

            // call parent class "post constructor"
            PostChildClassConstructor();
        }
예제 #6
0
        internal ColorControlCluster(ZigBeeEndPoint endPoint, List <UInt16> supportedAttributes)
            : base(endPoint)
        {
            // set cluster name and cluster Id
            Name = CLUSTER_NAME;
            m_Id = CLUSTER_ID;

            // if supportedAttributes is null assume all attributes supported
            bool supportAllAttributesBydefault = false;

            if (supportedAttributes == null)
            {
                supportAllAttributesBydefault = true;
            }

            // current hue attribute (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTHUE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTHUE, "CurrentHue", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // current saturation (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTSATURATION))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTSATURATION, "CurrentSaturation", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // remaining time (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_REMAININGTIME))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_REMAININGTIME, "RemainingTime", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // current X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTX, "CurrentX", ZclHelper.UINT16_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // current Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_CURRENTY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_CURRENTY, "CurrentY", ZclHelper.UINT16_TYPE, true, false);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // drift compensation (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_DRIFTCOMPENSATION))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_DRIFTCOMPENSATION, "DriftCompensation", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // compensation text (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COMPENSATIONTEXT))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COMPENSATIONTEXT, "CompensationText", ZclHelper.CHAR_STRING_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color temperature (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORTEMPERATURE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORTEMPERATURE, "ColorTemperature", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color mode (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORMODE))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORMODE, "ColorMode", ZclHelper.ENUMERATION_8_BIT_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // number of primaries (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_NUMBEROFPRIMARIES))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_NUMBEROFPRIMARIES, "NumberOfPrimaries", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 1 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY1X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY1X, "Primary1X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 1 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY1Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY1Y, "Primary1Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 1 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY1INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY1INTENSITY, "Primary1Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 2 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY2X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY2X, "Primary2X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 2 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY2Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY2Y, "Primary2Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 2 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY2INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY2INTENSITY, "Primary2Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 3 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY3X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY3X, "Primary3X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 3 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY3Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY3Y, "Primary3Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 3 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY3INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY3INTENSITY, "Primary3Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 4 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY4X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY4X, "Primary4X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 4 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY4Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY4Y, "Primary4Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 4 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY4INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY4INTENSITY, "Primary4Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 5 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY5X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY5X, "Primary5X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 5 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY5Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY5Y, "Primary5Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 5 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY5INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY5INTENSITY, "Primary5Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 6 X (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY6X))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY6X, "Primary6X", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 6 Y (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY6Y))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY6Y, "Primary6Y", ZclHelper.UINT16_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // primary 6 intensity (read only)
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_PRIMARY6INTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_PRIMARY6INTENSITY, "Primary6Intensity", ZclHelper.UINT8_TYPE, true, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // white point X
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_WHITEPOINTX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_WHITEPOINTX, "WhitePointX", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // white point Y
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_WHITEPOINTY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_WHITEPOINTY, "WhitePointY", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point R X
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTRX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTRX, "ColorPointRX", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point R Y
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTRY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTRY, "ColorPointRY", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point R intensity
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTRINTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTRINTENSITY, "ColorPointRIntensity", ZclHelper.UINT8_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point G X
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTGX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTGX, "ColorPointGX", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point G Y
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTGY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTGY, "ColorPointGY", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point G intensity
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTGINTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTGINTENSITY, "ColorPointGIntensity", ZclHelper.UINT8_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point B X
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTBX))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTBX, "ColorPointBX", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point B Y
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTBY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTBY, "ColorPointBY", ZclHelper.UINT16_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }
            // color point B intensity
            if (supportAllAttributesBydefault ||
                supportedAttributes.Contains(ATTRIBUTE_COLORPOINTBINTENSITY))
            {
                var attrib = new ZclAttribute(this, ATTRIBUTE_COLORPOINTBINTENSITY, "ColorPointBIntensity", ZclHelper.UINT8_TYPE, false, true);
                m_attributeList.Add(attrib.Id, attrib);
            }

            // move to hue command
            var command   = new ZclCommand(this, COMMAND_MOVETOHUE, "MoveToHue", false);
            var parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Hue");

            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "Direction");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move hue command
            command   = new ZclCommand(this, COMMAND_MOVEHUE, "MoveHue", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "MoveMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Rate");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // step hue command
            command   = new ZclCommand(this, COMMAND_STEPHUE, "StepHue", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "StepMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "StepSize");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move to saturation command
            command   = new ZclCommand(this, COMMAND_MOVETOSATURATION, "MoveToSaturation", false);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Saturation");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move saturation command
            command   = new ZclCommand(this, COMMAND_MOVESATURATION, "MoveSaturation", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "MoveMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Rate");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // step saturation command
            command   = new ZclCommand(this, COMMAND_STEPSATURATION, "StepSaturation", false);
            parameter = new ZclValue(ZclHelper.ENUMERATION_8_BIT_TYPE, "StepMode");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "StepSize");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move hue and saturation command
            command   = new ZclCommand(this, COMMAND_MOVETOHUEANDSATURATION, "MoveHueAndSaturation", false);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Hue");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT8_TYPE, "Saturation");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move to color command
            command   = new ZclCommand(this, COMMAND_MOVETOCOLOR, "MoveToColor", false);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "ColorX");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "ColorY");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move color command
            command   = new ZclCommand(this, COMMAND_MOVECOLOR, "MoveColor", false);
            parameter = new ZclValue(ZclHelper.INT16_TYPE, "RateX");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.INT16_TYPE, "RateY");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // step color command
            command   = new ZclCommand(this, COMMAND_STEPCOLOR, "StepColor", false);
            parameter = new ZclValue(ZclHelper.INT16_TYPE, "StepX");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.INT16_TYPE, "StepY");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // move to color temperature command
            command   = new ZclCommand(this, COMMAND_MOVETOCOLORTEMPERATURE, "MoveToColorTemperature", false);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "ColorTemperature");
            command.AddInParam(parameter);
            parameter = new ZclValue(ZclHelper.UINT16_TYPE, "TransitionTime");
            command.AddInParam(parameter);
            m_commandList.Add(command.Id, command);

            // call parent class "post constructor"
            PostChildClassConstructor();
        }