黄学彪
2020-04-02 9904031f5291daaf56985146bb671f25e18ebbdf
ZigbeeApp/Shared/Common/Device.cs
@@ -62,9 +62,9 @@
        /// </summary>
        public const string deviceModelIdName = "uDeviceModelId";
        /// <summary>
        /// R文件里面设备默认名字的ID
        /// R文件里面所有设备名字的ID
        /// </summary>
        public Dictionary<string, int> dicDeviceDefultNameID = null;
        public Dictionary<string, int> dicDeviceAllNameID = null;
        /// <summary>
        /// 设备的模块ID的枚举(keys:模块ID  value:设备具体类型值-设备所属类型值(自定义的值,嘛,只要不重复就可以)
        /// </summary>
@@ -306,6 +306,7 @@
            }
            //如果本地和网关的设备不一致的时候,删除本地的设备
            var listDeleteMac = new List<string>();
            foreach (var device in dicExist.Values)
            {
                if (device is OTADevice)
@@ -316,6 +317,16 @@
                {
                    this.DeleteMemmoryDevice(device, true);
                }
                if (listDeleteMac.Contains(device.DeviceAddr) == false)
                {
                    //收集被删除的Mac
                    listDeleteMac.Add(device.DeviceAddr);
                }
            }
            if (listDeleteMac.Count > 0)
            {
                //将真实物理设备从房间中移除
                this.DeleteRealDeviceFromRoom(listDeleteMac);
            }
            return statu;
@@ -394,7 +405,7 @@
        #region ■ 修改设备___________________________
        /// <summary>
        /// 更改名字并且刷新缓存(修改失败时,会显示信息)
        /// 更改端点名字并且刷新缓存(修改失败时,会显示信息)
        /// </summary>
        /// <param name="device">设备对象</param>
        /// <param name="newName">新名字</param>
@@ -585,7 +596,7 @@
        /// <param name="deleteRoom">是否从房间删除</param>
        public void DeleteMemmoryDevice(CommonDevice device, bool deleteRoom = true)
        {
            if (deleteRoom == true && HdlRoomLogic.Current.CurrentRoom != null)
            if (deleteRoom == true)
            {
                //从房间中删除
                HdlRoomLogic.Current.DeleteDevice(device);
@@ -947,41 +958,40 @@
            {
                return dName;
            }
            //根据设备类型获取名称
            var tempValue = this.GetDeviceObjectText(new List<CommonDevice>() { device }, false);
            var arry = tempValue.Split(new string[] { "(" }, StringSplitOptions.RemoveEmptyEntries);
            dName = arry[0].Trim();
            //如果是虚拟设备
            if (device.DriveCode > 0)
            //如果这个设备只有一个回路的话,返回Mac名字给它
            if (this.GetDevicesCountByMac(device.DeviceAddr) <= 1)
            {
                //在端点名字的后面附加【回路】字样
                dName += "(" + device.DeviceEpoint + Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + ")";
                return dName;
                return this.GetDeviceMacName(device);
            }
            if (device.Type == DeviceType.OnOffOutput
                || device.Type == DeviceType.DimmableLight || device.Type == DeviceType.ColorDimmableLight)
            {
                //继电器,掉光器都叫回路
                return Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + device.DeviceEpoint;
            }
            else if (device.Type == DeviceType.Thermostat)
            {
                //空调都叫室内机
                return Language.StringByID(R.MyInternationalizationString.uIndoorUnit) + device.DeviceEpoint;
            }
            //获取设备类型
            var deviceInfoType = this.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
            if (deviceInfoType.BeloneType == Common.DeviceBeloneType.A按键面板 && device.Type == DeviceType.TemperatureSensor)
            if (device.Type == DeviceType.OnOffSwitch)
            {
                //面板的最后一个回路是温度传感器
                dName += Language.StringByID(R.MyInternationalizationString.uDeviceBelongId11);
            }
            else if (deviceInfoType.ConcreteType == Common.DeviceConcreteType.Sensor_Pir)
            {
                //pir传感器,它又搞特殊东西,传感器自身用自己的名字,继电器回路的话……
                if (device.Type == DeviceType.OnOffOutput)
                //面板的干接点叫按键
                if (deviceInfoType.BeloneType == DeviceBeloneType.A按键面板)
                {
                    dName += Language.StringByID(R.MyInternationalizationString.uDeviceBelongId2300);
                    return Language.StringByID(R.MyInternationalizationString.uPanelButton) + device.DeviceEpoint;
                }
                //其他的干接点叫干接点
                else
                {
                    return Language.StringByID(R.MyInternationalizationString.uDeviceBelongId16) + device.DeviceEpoint;
                }
            }
            else if (this.dicDeviceEpoint.ContainsKey(device.DeviceAddr) == true && this.dicDeviceEpoint[device.DeviceAddr].Count > 1)
            {
                //XXXXX(N回路)
                dName += "(" + device.DeviceEpoint + Language.StringByID(R.MyInternationalizationString.uDeviceCircuit) + ")";
            }
            return dName;
            //其他情况,使用它的默认名称
            return Language.StringByID(deviceInfoType.DefultNameId) + device.DeviceEpoint;
        }
        /// <summary>
@@ -997,52 +1007,9 @@
                return dName;
            }
            //是否拥有配置的模块ID
            if (this.dicDeviceModelIdEnum.ContainsKey(device.ModelIdentifier) == true)
            {
                //获取模块ID名字
                return this.GetNameByModelId(device);
            }
            else
            {
                //获取第三方设备的翻译名字
                var myDeviceType = this.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                return Language.StringByID(myDeviceType.ConcreteTextId);
            }
        }
        /// <summary>
        /// 根据模块ID,获取翻译名字
        /// </summary>
        /// <param name="device"></param>
        /// <returns></returns>
        private string GetNameByModelId(CommonDevice device)
        {
            if (device.ModelIdentifier == string.Empty)
            {
                //未知设备
                return Language.StringByID(R.MyInternationalizationString.UnknowDevice);
            }
            string modelKeys = device.ModelIdentifier;
            if (this.dicDeviceModelIdEnum.ContainsKey(modelKeys) == false)
            {
                //未知设备
                return Language.StringByID(R.MyInternationalizationString.UnknowDevice);
            }
            string[] strValue = this.dicDeviceModelIdEnum[modelKeys].Split(new string[] { "-" }, StringSplitOptions.RemoveEmptyEntries);
            int ConcreteValue = Convert.ToInt32(strValue[0]);
            string keyName = deviceModelIdName + ConcreteValue;
            if (this.dicDeviceDefultNameID.ContainsKey(keyName) == true)
            {
                //R文件里面设置的名字
                return Language.StringByID(this.dicDeviceDefultNameID[keyName]);
            }
            //未知设备
            return Language.StringByID(R.MyInternationalizationString.UnknowDevice);
            //获取设备类型
            var deviceInfoType = this.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
            return Language.StringByID(deviceInfoType.DefultNameId);
        }
        /// <summary>
@@ -1092,11 +1059,11 @@
        /// </summary>
        private void InitDeviceDefultNameIDList()
        {
            if (this.dicDeviceDefultNameID != null)
            if (this.dicDeviceAllNameID != null)
            {
                return;
            }
            this.dicDeviceDefultNameID = new Dictionary<string, int>();
            this.dicDeviceAllNameID = new Dictionary<string, int>();
            Type type = typeof(R.MyInternationalizationString);
            var PropertyList = type.GetFields();
@@ -1105,7 +1072,7 @@
                if (item.Name.StartsWith(deviceModelIdName) == true
                    || item.Name.StartsWith("uDeviceBelongId") == true)
                {
                    this.dicDeviceDefultNameID[item.Name] = Convert.ToInt32(item.GetValue(null));
                    this.dicDeviceAllNameID[item.Name] = Convert.ToInt32(item.GetValue(null));
                }
            }
@@ -1398,28 +1365,39 @@
                    checkDevice = temp;
                }
            }
            //获取自定义设备类型
            var myInfoType = this.GetMyDeviceEnumInfo(listDevice);
            //获取设备类型的翻译名字
            string strName = Language.StringByID(myInfoType.ObjectTypeNameId);
            if (strName == string.Empty)
            {
                //加一层保险,未知设备
                strName = Language.StringByID(R.MyInternationalizationString.UnknowDevice);
            }
            string strName = string.Empty;
            if (this.dicDeviceModelIdEnum.ContainsKey(checkDevice.ModelIdentifier) == true)
            if (ApendFalge == true)
            {
                //根据模块ID,获取设备名字
                strName = this.GetNameByModelId(checkDevice);
            }
            else
            {
                //获取第三方设备的【设备类型】
                var myDeviceType = this.GetNotHdlMyDeviceEnumInfo(listDevice);
                strName = Language.StringByID(myDeviceType.ConcreteTextId);
            }
            if (ApendFalge == true && listDevice[0].DriveCode > 0)
            {
                //虚拟设备加个标识
                strName += "✩";
            }
            else if (ApendFalge == true && this.IsHdlDevice(checkDevice) == false)
            {
                //第三方设备加个标识
                strName += "★";
                if (listDevice[0].DriveCode > 0)
                {
                    //虚拟设备加个标识
                    strName += "✩";
                }
                else
                {
                    foreach (var temp in listDevice)
                    {
                        //拿拥有模块ID的那个回路来判断
                        if (temp.ModelIdentifier != string.Empty)
                        {
                            if (this.IsHdlDevice(checkDevice) == false)
                            {
                                //第三方设备加个标识
                                strName += "★";
                                break;
                            }
                        }
                    }
                }
            }
            return strName;
        }
@@ -1457,10 +1435,10 @@
            int BeloneValue = Convert.ToInt32(strValue[1]);
            //设置设备的【设备所属类型】
            info.BeloneType = (DeviceBeloneType)BeloneValue;
            if (dicDeviceDefultNameID.ContainsKey("uDeviceBelongId" + BeloneValue) == true)
            if (dicDeviceAllNameID.ContainsKey("uDeviceBelongId" + BeloneValue) == true)
            {
                //设备所属类型的翻译名字
                info.BeloneTextId = dicDeviceDefultNameID["uDeviceBelongId" + BeloneValue];
                info.BeloneTextId = dicDeviceAllNameID["uDeviceBelongId" + BeloneValue];
            }
            //设备具体类型
@@ -1469,6 +1447,16 @@
            {
                info.ConcreteType = DeviceConcreteType.UnKownDevice;
            }
            string keyName = deviceModelIdName + ConcreteValue;
            if (this.dicDeviceAllNameID.ContainsKey(keyName) == true)
            {
                //设备的官方名称
                info.ConcreteTextId = this.dicDeviceAllNameID[keyName];
            }
            //设备的类型翻译名称
            info.ObjectTypeNameId = Convert.ToInt32(strValue[2]);
            return info;
        }
@@ -1491,12 +1479,13 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId15;
                info.BeloneType = DeviceBeloneType.A灯光;
                info.ConcreteType = DeviceConcreteType.Light;
                info.ObjectTypeNameId = 60007;//调光模块
                int value = (int)info.BeloneType;
                if (dicDeviceDefultNameID.ContainsKey("uDeviceBelongId" + value) == true)
                if (dicDeviceAllNameID.ContainsKey("uDeviceBelongId" + value) == true)
                {
                    //设备所属类型的翻译名字
                    info.BeloneTextId = dicDeviceDefultNameID["uDeviceBelongId" + value];
                    info.BeloneTextId = dicDeviceAllNameID["uDeviceBelongId" + value];
                }
            }
            else if (info.BeloneType == DeviceBeloneType.A传感器
@@ -1506,12 +1495,13 @@
                info.BeloneType = DeviceBeloneType.A传感器;
                info.ConcreteType = DeviceConcreteType.Sensor;
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId1200;
                info.ObjectTypeNameId = 60000;//传感器
                int value = (int)info.BeloneType;
                if (dicDeviceDefultNameID.ContainsKey("uDeviceBelongId" + value) == true)
                if (dicDeviceAllNameID.ContainsKey("uDeviceBelongId" + value) == true)
                {
                    //设备所属类型的翻译名字
                    info.BeloneTextId = dicDeviceDefultNameID["uDeviceBelongId" + value];
                    info.BeloneTextId = dicDeviceAllNameID["uDeviceBelongId" + value];
                }
            }
@@ -1550,6 +1540,7 @@
                    info.BeloneType = DeviceBeloneType.A干接点;
                    info.ConcreteType = DeviceConcreteType.DryContact;
                }
                info.ObjectTypeNameId = 60003;//智能面板
            }
            //3包含窗帘的话,当窗帘处理
            else if (dicType.ContainsKey(DeviceType.WindowCoveringDevice) == true)
@@ -1557,6 +1548,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId100;
                info.BeloneType = DeviceBeloneType.A窗帘;
                info.ConcreteType = DeviceConcreteType.Curtain;
                info.ObjectTypeNameId = 60002;//遮阳模块
            }
            //4空气开关
            else if (dicType.ContainsKey(DeviceType.AirSwitch) == true)
@@ -1565,6 +1557,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId4100;
                info.BeloneType = DeviceBeloneType.A智能空开;
                info.ConcreteType = DeviceConcreteType.AirSwitch;
                info.ObjectTypeNameId = 60001;//开关模块
                if (dicType[DeviceType.AirSwitch].DfunctionType == DeviceFunctionType.A开关)
                {
@@ -1592,6 +1585,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId2300;
                info.BeloneType = DeviceBeloneType.A继电器;
                info.ConcreteType = DeviceConcreteType.Relay;
                info.ObjectTypeNameId = 60001;//开关模块
                if (dicType[DeviceType.OnOffOutput].DfunctionType == DeviceFunctionType.A开关)
                {
@@ -1618,6 +1612,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId2500;
                info.BeloneType = DeviceBeloneType.A调光器;
                info.ConcreteType = DeviceConcreteType.DimmableLight;
                info.ObjectTypeNameId = 60007;//调光模块
            }
            //7彩灯
            else if (dicType.ContainsKey(DeviceType.ColorDimmableLight) == true)
@@ -1625,6 +1620,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId9;
                info.BeloneType = DeviceBeloneType.A彩灯;
                info.ConcreteType = DeviceConcreteType.ColorLight;
                info.ObjectTypeNameId = 60007;//调光模块
            }
            //8空调
            else if (dicType.ContainsKey(DeviceType.Thermostat) == true)
@@ -1632,6 +1628,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId3600;
                info.BeloneType = DeviceBeloneType.A空调;
                info.ConcreteType = DeviceConcreteType.AirConditioner;
                info.ObjectTypeNameId = 60009;//空调模块
            }
            //9中继器
            else if (dicType.ContainsKey(DeviceType.Repeater) == true)
@@ -1639,6 +1636,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId3900;
                info.BeloneType = DeviceBeloneType.A中继器;
                info.ConcreteType = DeviceConcreteType.Repeater;
                info.ObjectTypeNameId = 60006;//系统设备
            }
            //10转换器
            else if (dicType.ContainsKey(DeviceType.Transverter) == true)
@@ -1646,6 +1644,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId4200;
                info.BeloneType = DeviceBeloneType.A转换器;
                info.ConcreteType = DeviceConcreteType.Converter;
                info.ObjectTypeNameId = 60008;//转换器
            }
            //11智能门锁
            else if (dicType.ContainsKey(DeviceType.DoorLock) == true)
@@ -1653,6 +1652,7 @@
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId2800;
                info.BeloneType = DeviceBeloneType.A智能门锁;
                info.ConcreteType = DeviceConcreteType.IntelligentLocks;
                info.ObjectTypeNameId = 60010;//智能门锁
            }
            //12包含传感器的话,当传感器处理
            else if (dicType.ContainsKey(DeviceType.IASZone) == true)
@@ -1660,6 +1660,7 @@
                info.BeloneType = DeviceBeloneType.A传感器;
                info.ConcreteType = DeviceConcreteType.Sensor;
                info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId1200;
                info.ObjectTypeNameId = 60000;//传感器
                //设置传感器具体的类型
                this.SetSensorDeviceSpecificType(ref info, listdevice);
            }
@@ -1707,13 +1708,14 @@
                    info.ConcreteTextId = R.MyInternationalizationString.uDeviceBelongId12;
                    info.ConcreteType = DeviceConcreteType.Sensor_Humidity;
                }
                info.ObjectTypeNameId = 60000;//传感器
            }
            int value = (int)info.BeloneType;
            if (dicDeviceDefultNameID.ContainsKey("uDeviceBelongId" + value) == true)
            if (dicDeviceAllNameID.ContainsKey("uDeviceBelongId" + value) == true)
            {
                //设备所属类型的翻译名字
                info.BeloneTextId = dicDeviceDefultNameID["uDeviceBelongId" + value];
                info.BeloneTextId = dicDeviceAllNameID["uDeviceBelongId" + value];
            }
            return info;
@@ -1808,7 +1810,15 @@
        {
            if (listDevice != null)
            {
                this.dicDeviceRoomId[listDevice[0].DeviceAddr] = roomId;
                if (roomId == string.Empty)
                {
                    //选择的是未分配
                    this.dicDeviceRoomId.Remove(listDevice[0].DeviceAddr);
                }
                else
                {
                    this.dicDeviceRoomId[listDevice[0].DeviceAddr] = roomId;
                }
            }
            //保存记录
@@ -1863,6 +1873,34 @@
                return null;
            }
            return HdlRoomLogic.Current.GetRoomById(this.dicDeviceRoomId[device.DeviceAddr]);
        }
        /// <summary>
        /// 将真实物理设备从房间中移除
        /// </summary>
        /// <param name="device">随便一个回路</param>
        public void DeleteRealDeviceFromRoom(CommonDevice device)
        {
            //将真实物理设备从房间中移除
            this.DeleteRealDeviceFromRoom(new List<string>() { device.DeviceAddr });
        }
        /// <summary>
        /// 将真实物理设备从房间中移除
        /// </summary>
        /// <param name="listMac">设备Mac地址</param>
        public void DeleteRealDeviceFromRoom(List<string> listMac)
        {
            foreach (var deviceMacAddr in listMac)
            {
                this.dicDeviceRoomId.Remove(deviceMacAddr);
            }
            //保存记录
            string fullName = UserCenterLogic.CombinePath(DirNameResourse.DeviceRoomIdFile);
            UserCenterLogic.SaveFileContent(fullName, this.dicDeviceRoomId);
            //添加自动备份
            HdlAutoBackupLogic.AddOrEditorFile(DirNameResourse.DeviceRoomIdFile);
        }
        #endregion
@@ -1942,6 +1980,35 @@
        #endregion
        #region ■ 一般方法___________________________
        /// <summary>
        /// 判断该设备是否可以显示在主页
        /// </summary>
        /// <param name="i_device"></param>
        /// <returns></returns>
        public bool CanShowInHomeHomeMainPage(CommonDevice i_device)
        {
            if (i_device == null || i_device.Type == DeviceType.OnOffSwitch)//干接点
            {
                //这个设备不见了
                return false;
            }
            if (i_device.Type == DeviceType.OnOffOutput && i_device.DfunctionType == DeviceFunctionType.A未定义)
            {
                //2020.03.23追加式样:未指定类型的继电器,不显示
                return false;
            }
            //2020.03.30追加式样:如果是面板的温度探头,不显示
            else if (i_device.Type == DeviceType.TemperatureSensor && ((TemperatureSensor)i_device).SensorDiv == 1)
            {
                var myInfoType = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { i_device });
                if (myInfoType.BeloneType == DeviceBeloneType.A按键面板)
                {
                    return false;
                }
            }
            return true;
        }
        /// <summary>
        /// 判断是不是河东的设备
@@ -2190,8 +2257,10 @@
                    statu = 2;
                }
            }
            statu = 1;
            else
            {
                statu = 1;
            }
            return listDevice;
        }
@@ -2303,6 +2372,15 @@
                    mainDevice.IconPath = "Device/Light.png";
                }
            }
            //如果是空气开关的话
            else if (mainDevice.Type == DeviceType.AirSwitch)
            {
                //空气开关默认为开关
                if (mainDevice.DfunctionType == DeviceFunctionType.A未定义)
                {
                    mainDevice.DfunctionType = DeviceFunctionType.A开关;
                }
            }
            //如果是彩灯的话
            else if (mainDevice.Type == DeviceType.ColorDimmableLight)
            {
@@ -2376,74 +2454,84 @@
            }
            this.dicDeviceModelIdEnum = new Dictionary<string, string>();
            //定义规则:模块ID(已翻译)=设备具体类型值-设备所属类型值(自定义的值,嘛,只要不重复就可以)
            //第一个值是:DeviceConcreteType  第二个值是:DeviceBeloneType
            //*********************************************************************
            //新设备添加方法:
            //1、在这里填写上模块ID,然后是 DeviceConcreteType ,然后是 DeviceBeloneType
            //1、在这里填写上模块ID,然后是 DeviceConcreteType ,然后是 DeviceBeloneType , 然后是 设备类型的翻译ID
            //2、然后在最下面的【自定义设备类型】折叠栏里添加【设备的具体类型】,【设备的所属类型】
            //3、以设备的具体类型为名字(去掉【-】)添加设备的【所属图片】,【真实物理图片】。回路图片需要特殊处理
            //4、添加R文件(uDeviceModelId),添加Language文件
            //5、如果需要共有图片,则在这个函数的最底下添加
            //*********************************************************************
            //前言:因为zigbeehome的设备拥有四种名字:
            //1、设备官方名称            ----它由DeviceConcreteType的数值所决定(个人中心专用)
            //2、设备入网后的默认名称    ----它不需要再代码里面定义,它直接在Language文件里面定义
            //                               范围:50000开始,它的规则是DeviceConcreteType对应的R文件里面的ID的数值+20000,
            //3、设备所属名称            ----它有DeviceBeloneType的数值所决定
            //4、设备类型名称            ----它由【设备类型的翻译ID】所决定,这个值是个人中心专用,
            //                               它是Language文件里面的 60000之后的那些值
            //定义规则:模块ID(已翻译) = 设备具体类型值 - 设备所属类型值 - 设备类型的翻译ID
            //设备具体类型值:DeviceConcreteType(在这个文件最下面进行定义)
            //设备所属类型值: DeviceBeloneType(自定义的值,嘛,只要不重复就可以,在这个文件最下面进行定义)
            //设备类型的翻译ID:这个值是个人中心专用,它是Language文件里面的 60000之后的那些值
            //=========★★开合帘类(100-199)★★=========
            this.dicDeviceModelIdEnum["MWM65B-ZB.20"] = "100-100";//智能开合帘电机
            this.dicDeviceModelIdEnum["MVSM35B-ZB.20"] = "101-100";//智能管状电机
            this.dicDeviceModelIdEnum["MWM65B-ZB.20"] = "100-100-60002";//智能开合帘电机
            this.dicDeviceModelIdEnum["MVSM35B-ZB.20"] = "101-100-60002";//智能管状电机
            //=========★★按键面板类(200-1199)★★=========
            this.dicDeviceModelIdEnum["MPT4/R4-ZB.18"] = "200-200";//4按键触摸面板(带4路继电器底座)
            this.dicDeviceModelIdEnum["MPT3/R3-ZB.18"] = "201-200";//3按键触摸面板
            this.dicDeviceModelIdEnum["MPT2/R2-ZB.18"] = "202-200";//2按键触摸面板
            this.dicDeviceModelIdEnum["MPT1/R1-ZB.18"] = "203-200";//12按键触摸面板
            this.dicDeviceModelIdEnum["MPT4-ZB.18"] = "210-200";//4按键触摸面板(只带电源底座)
            this.dicDeviceModelIdEnum["MPT4R4L/S-ZB.18"] = "220-200";//简约4按键面板
            this.dicDeviceModelIdEnum["MPT3R3L/S-ZB.18"] = "221-200";//简约3按键面板
            this.dicDeviceModelIdEnum["MPT2R2L/S-ZB.18"] = "222-200";//简约2按键面板
            this.dicDeviceModelIdEnum["MPT4SC/S-ZB.18"] = "224-200";//简约4按键场景面板
            this.dicDeviceModelIdEnum["MPT2W/S-ZB.18"] = "226-200";//简约2路窗帘面板
            this.dicDeviceModelIdEnum["MP2B/TILE-ZB.18"] = "240-200";//方悦单开双控面板
            this.dicDeviceModelIdEnum["MP4B/TILE-ZB.18"] = "241-200";//方悦双开四控面板
            this.dicDeviceModelIdEnum["MP8B/TILE-ZB.18"] = "242-200";//方悦四开八控面板
            this.dicDeviceModelIdEnum["MPFA/TILE-ZB.18"] = "250-200";//方悦新风面板
            this.dicDeviceModelIdEnum["MPTE3/TILE-ZB.18"] = "253-200";//方悦环境面板
            this.dicDeviceModelIdEnum["MP2W/TILE-ZB.18"] = "256-200";//窗帘面板
            this.dicDeviceModelIdEnum["MPT4/R4-ZB.18"] = "200-200-60003";//4按键触摸面板(带4路继电器底座)
            this.dicDeviceModelIdEnum["MPT3/R3-ZB.18"] = "201-200-60003";//3按键触摸面板
            this.dicDeviceModelIdEnum["MPT2/R2-ZB.18"] = "202-200-60003";//2按键触摸面板
            this.dicDeviceModelIdEnum["MPT1/R1-ZB.18"] = "203-200-60003";//12按键触摸面板
            this.dicDeviceModelIdEnum["MPT4-ZB.18"] = "210-200-60003";//4按键触摸面板(只带电源底座)
            this.dicDeviceModelIdEnum["MPT4R4L/S-ZB.18"] = "220-200-60003";//简约4按键面板
            this.dicDeviceModelIdEnum["MPT3R3L/S-ZB.18"] = "221-200-60003";//简约3按键面板
            this.dicDeviceModelIdEnum["MPT2R2L/S-ZB.18"] = "222-200-60003";//简约2按键面板
            this.dicDeviceModelIdEnum["MPT4SC/S-ZB.18"] = "224-200-60003";//简约4按键场景面板
            this.dicDeviceModelIdEnum["MPT2W/S-ZB.18"] = "226-200-60003";//简约2路窗帘面板
            this.dicDeviceModelIdEnum["MP2B/TILE-ZB.18"] = "240-200-60003";//方悦单开双控面板
            this.dicDeviceModelIdEnum["MP4B/TILE-ZB.18"] = "241-200-60003";//方悦双开四控面板
            this.dicDeviceModelIdEnum["MP8B/TILE-ZB.18"] = "242-200-60003";//方悦四开八控面板
            this.dicDeviceModelIdEnum["MPFA/TILE-ZB.18"] = "250-200-60003";//方悦新风面板
            this.dicDeviceModelIdEnum["MPTE3/TILE-ZB.18"] = "253-200-60003";//方悦环境面板
            this.dicDeviceModelIdEnum["MP2W/TILE-ZB.18"] = "256-200-60003";//窗帘面板
            //=========★★PIR传感器类(1200-1299)★★=========
            this.dicDeviceModelIdEnum["MSPIR01-ZB.10"] = "1200-1200";//pir传感器220
            this.dicDeviceModelIdEnum["MSPIR01-ZB.10"] = "1200-1200-60000";//pir传感器220
            //=========★★安防类传感器类(1300-2299)★★=========
            this.dicDeviceModelIdEnum["MULTI-GASE--EA07"] = "1300-1300";//燃气传感器
            this.dicDeviceModelIdEnum["MULTI-MECI--EA01"] = "1301-1300";//门窗磁传感器
            this.dicDeviceModelIdEnum["MULTI-FIRE--EA05"] = "1302-1300";//烟雾传感器
            this.dicDeviceModelIdEnum["MULTI-MOTI--EA04"] = "1303-1300";//红外传感器
            this.dicDeviceModelIdEnum["MULTI-WATE--EA02"] = "1304-1300";//水浸传感器
            this.dicDeviceModelIdEnum["MULTI-BURO--EA06"] = "1305-1300";//紧急按键
            this.dicDeviceModelIdEnum["MULTI-GASE--EA07"] = "1300-1300-60000";//燃气传感器
            this.dicDeviceModelIdEnum["MULTI-MECI--EA01"] = "1301-1300-60000";//门窗磁传感器
            this.dicDeviceModelIdEnum["MULTI-FIRE--EA05"] = "1302-1300-60000";//烟雾传感器
            this.dicDeviceModelIdEnum["MULTI-MOTI--EA04"] = "1303-1300-60000";//红外传感器
            this.dicDeviceModelIdEnum["MULTI-WATE--EA02"] = "1304-1300-60000";//水浸传感器
            this.dicDeviceModelIdEnum["MULTI-BURO--EA06"] = "1305-1300-60000";//紧急按键
            //=========★★继电器类(2300-2499)★★=========
            this.dicDeviceModelIdEnum["MPR0310-ZB.10"] = "2300-2300";//3路继电器小模块
            this.dicDeviceModelIdEnum["MFA01-ZB1.0"] = "2310-2300";//方悦新风小模块
            this.dicDeviceModelIdEnum["MPR0310-ZB.10"] = "2300-2300-60001";//3路继电器小模块
            this.dicDeviceModelIdEnum["MFA01-ZB1.0"] = "2310-2300-60001";//方悦新风小模块
            //=========★★调光器类(2500-2799)★★=========
            this.dicDeviceModelIdEnum["MPD0101-ZB.10"] = "2500-2500";//1路调光器小模块
            this.dicDeviceModelIdEnum["MPD0101-ZB.10"] = "2500-2500-60007";//1路调光器小模块
            //=========★★智能门锁类(2800-????)★★=========
            this.dicDeviceModelIdEnum["H06C"] = "2800-2800";//智能门锁(H06C)
            this.dicDeviceModelIdEnum["S-one"] = "2802-2800";//智能门锁(S-one)
            this.dicDeviceModelIdEnum["H06C"] = "2800-2800-60010";//智能门锁(H06C)
            this.dicDeviceModelIdEnum["S-one"] = "2802-2800-60010";//智能门锁(S-one)
            //=========★★空调类(3600-3899)★★=========
            this.dicDeviceModelIdEnum["MAC/GW-ZB.10"] = "3600-3600";//zigbee空调网关模块
            this.dicDeviceModelIdEnum["MAC/GW-ZB.10"] = "3600-3600-60009";//zigbee空调网关模块
            //=========★★中继器类(3900-3999)★★=========
            this.dicDeviceModelIdEnum["MSR-ZB.10"] = "3900-3900"; //zigbee中继器
            this.dicDeviceModelIdEnum["MSR-ZB.10"] = "3900-3900-60006"; //zigbee中继器
            //=========★★空气开关类(4100-4199)★★=========
            this.dicDeviceModelIdEnum["MBCI01-ZB.10"] = "4100-4100";//zigbee微断云控制器
            this.dicDeviceModelIdEnum["MBCI01-ZB.10"] = "4100-4100-60001";//zigbee微断云控制器
            //=========★★转换器类(4200-4699)★★=========
            this.dicDeviceModelIdEnum["MBUS/GW-ZB.10"] = "4200-4200";//zigbee转buspro协议转换器
            this.dicDeviceModelIdEnum["M485/GW-ZB.10"] = "4201-4200";//zigbee转485协议转换器
            this.dicDeviceModelIdEnum["MBUS/GW-ZB.10"] = "4200-4200-60008";//zigbee转buspro协议转换器
            this.dicDeviceModelIdEnum["M485/GW-ZB.10"] = "4201-4200-60008";//zigbee转485协议转换器