From 4820da229822687e472b9d5abb2a09093a877a3a Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 24 九月 2021 13:27:49 +0800
Subject: [PATCH] 更新spk

---
 HDL-ON_Android/Properties/AndroidManifest.xml                                                    |    2 
 HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs                                                        |   11 
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs                                                             |    6 
 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs |    4 
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs                                   |   19 
 HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs                                |    6 
 HDL_ON/Common/ApiUtlis.cs                                                                        |    2 
 HDL_ON/UI/UI2/2-Classification/RoomPage.cs                                                       |    2 
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs                                     |    3 
 HDL_ON/DAL/Mqtt/MqttClient.cs                                                                    |    2 
 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs                                                          |    4 
 HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs                                      |    3 
 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs                                           |   23 
 HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs                                          |   54 -
 HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs                                       |  192 +++---
 HDL_ON/DAL/DriverLayer/Packet.cs                                                                 |    4 
 .vs/HDL_APP_Project/xs/UserPrefs.xml                                                             |   32 
 HDL_ON/DAL/DriverLayer/Control.cs                                                                |   12 
 HDL_ON/UI/MainPage.cs                                                                            |   31 
 HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs                                         |    2 
 DLL/Shared.Droid.dll                                                                             |    0 
 HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs                                                 |   11 
 HDL_ON/DAL/DriverLayer/Control_Udp.cs                                                            |  677 ++++++++++++--------------
 HDL_ON/Entity/FunctionList.cs                                                                    |   19 
 HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs                                   |    5 
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs                                      |    2 
 HDL_ON/Entity/Function/Function.cs                                                               |  268 ++++++++--
 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs                                            |   85 +-
 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs                              |    2 
 29 files changed, 808 insertions(+), 675 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 99e471b..a1982d3 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,24 +1,22 @@
 锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
   <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" />
-  <MonoDevelop.Ide.Workbench>
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs">
     <Files>
-      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="15" Column="40" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSciencePage.cs" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" />
-      <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" />
-      <File FileName="HDL_ON/Entity/Enumerative/Command.cs" />
-      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" />
-      <File FileName="HDL_ON/UI/MainPage.cs" />
-      <File FileName="HDL-ON_iOS/Info.plist" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Packet.cs" Line="310" Column="62" />
-      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" Line="316" Column="28" />
+      <File FileName="HDL_ON/Entity/Function/Function.cs" Line="1347" Column="46" />
+      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="1114" Column="90" />
+      <File FileName="HDL_ON/UI/MainPage.cs" Line="127" Column="64" />
+      <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="127" Column="38" />
+      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="1118" Column="61" />
+      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs" Line="118" Column="43" />
+      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs" Line="158" Column="79" />
+      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddSensorEnvironmentPage.cs" Line="133" Column="43" />
+      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorEnvironment/AddQingpingSensorEnvirTipPage.cs" Line="30" Column="4" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="HDL_APP_Project" expanded="True">
             <Node name="HDL-ON_Android" selected="True" />
-            <Node name="HDL-ON_iOS" expanded="True" />
           </Node>
         </State>
       </Pad>
@@ -39,8 +37,8 @@
     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
     <String>Shared.IOS/Shared.IOS.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
-  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.2ffc9a07" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Release" />
+  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
     <BreakpointStore>
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
@@ -50,9 +48,9 @@
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs" line="168" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="481" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" relfile="HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs" line="541" column="1" />
-      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="314" column="1" />
-      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/FunctionList.cs" relfile="HDL_ON/Entity/FunctionList.cs" line="492" column="1" />
-      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/FunctionList.cs" relfile="HDL_ON/Entity/FunctionList.cs" line="491" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Mqtt/MqttClient.cs" relfile="HDL_ON/DAL/Mqtt/MqttClient.cs" line="315" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/FunctionList.cs" relfile="HDL_ON/Entity/FunctionList.cs" line="475" column="1" />
+      <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/FunctionList.cs" relfile="HDL_ON/Entity/FunctionList.cs" line="474" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" line="153" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/Entity/Function/Scene.cs" relfile="HDL_ON/Entity/Function/Scene.cs" line="338" column="1" />
       <Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/DAL/Server/HttpServerRequest.cs" relfile="HDL_ON/DAL/Server/HttpServerRequest.cs" line="2144" column="1" />
diff --git a/DLL/Shared.Droid.dll b/DLL/Shared.Droid.dll
index 31b63c9..ff87e25 100644
--- a/DLL/Shared.Droid.dll
+++ b/DLL/Shared.Droid.dll
Binary files differ
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 0f48627..c3a7a53 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202109232" android:versionName="1.2.202109232" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202109241" android:versionName="1.2.202109241" package="com.hdl.onpro">
 	<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
 	<!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 -->
 	<!--<uses-permission android:name="android.permission.INTERNET" />-->
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index d03d275..0bb6e41 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -170,7 +170,7 @@
                             for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;)
                             {
                                 var localFunction = FunctionList.List.GetDeviceFunctionList()[i];
-                                if (localFunction.Spk_Prefix == FunctionCategory.Music || string.IsNullOrEmpty(localFunction.Spk_Prefix))
+                                if (SPK.MusicSpkList().Contains(localFunction.spk))
                                 {
                                     i++;
                                     continue;
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 04eb714..84584fd 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -407,9 +407,12 @@
             switch (function.spk)
             {
                 case SPK.ElectricTuyaAirCleaner:
+                case SPK.ElectricTuyaAirCleaner2:
                 case SPK.ElectricTuyaFan:
+                case SPK.ElectricTuyaFan2:
                 case SPK.ElectricTuyaWaterValve:
                 case SPK.ElectricTuyaWeepRobot:
+                case SPK.ElectricTuyaWeepRobot2:
                     useRemote = true;
                     break;
             }
@@ -974,6 +977,7 @@
                                 DimmerPage.UpdataStates(localFunction);
                                 break;
                             case SPK.ElectricFan:
+                            case SPK.HvacFan:
                                 localFunction.lastState = Language.StringByID(StringId.Level) + " : " +
                                    localFunction.GetAttrState(FunctionAttributeKey.OpenLevel);
                                 FanPage.UpdataState(localFunction);
@@ -1044,6 +1048,7 @@
                                     ACPage.UpdataStates(localFunction);
                                 }
                                 break;
+                            case SPK.HvacFloorHeat:
                             case SPK.FloorHeatStandard:
                                 localFunction.lastState = "";
                                 switch (localFunction.GetAttrState(FunctionAttributeKey.Mode))
@@ -1098,14 +1103,19 @@
                                 //A_EnvironmentalDataCenter.LoadEvent_UpdataStatus(localFunction);
                                 break;
                             case SPK.ElectricSocket:
+                            case SPK.PanelSocket:
                                 SocketPage.UpdataState(localFunction);
                                 break;
                             case SPK.ElectricTV:
                                 break;
                             case SPK.ElectricTuyaAirCleaner:
+                            case SPK.ElectricTuyaAirCleaner2:
                             case SPK.ElectricTuyaFan:
+                            case SPK.ElectricTuyaFan2:
                             case SPK.ElectricTuyaWeepRobot:
+                            case SPK.ElectricTuyaWeepRobot2:
                             case SPK.ElectricTuyaWaterValve:
+                            case SPK.ElectricTuyaWaterValve2:
                             case SPK.SensorPir:
                             case SPK.SensorDoorWindow:
                             case SPK.SensorSmoke:
@@ -1113,7 +1123,9 @@
                             case SPK.ClothesHanger:
                             case SPK.AcIr:
                             case SPK.SenesorMegahealth:
+                            case SPK.SenesorMegahealth2:
                             case SPK.AirFreshStandard:
+                            case SPK.HvacAirFresh:
                                 //璁惧鐘舵�佹帹閫�
                                 //鐘舵�佹洿鏂�
                                 Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
diff --git a/HDL_ON/DAL/DriverLayer/Control_Udp.cs b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
index 5707532..369ab7e 100644
--- a/HDL_ON/DAL/DriverLayer/Control_Udp.cs
+++ b/HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -297,7 +297,7 @@
                             break;
                         case SPK.LightRGB:
                             break;
-                        case SPK.FloorHeatStandard:
+                        case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:
                             if (f.status.Find((obj)=>obj.key ==FunctionAttributeKey.Mode) == null)
                             {
                                 foreach (var dic in f.status)
@@ -366,6 +366,7 @@
                             }
                             break;
                         case SPK.ElectricSocket:
+                        case SPK.PanelSocket:
                             foreach (var attr in f.status)
                             {
                                 if (attr.key == FunctionAttributeKey.OnOff)
@@ -424,7 +425,7 @@
         /// </summary>
         /// <param name="commandString"></param>
         /// <returns></returns>
-        public void WriteBusData(Function function, Dictionary<string, string> commandDictionary,bool reSend = false)
+        public void WriteBusData(Function function, Dictionary<string, string> commandDictionary, bool reSend = false)
         {
             try
             {
@@ -432,163 +433,199 @@
                 var deviceId = function.bus.DeviceID;
                 var loopId = function.bus.LoopId;
 
-                switch (function.Spk_Prefix)
+                switch (function.spk)
                 {
-                    case FunctionCategory.Light:
-                        switch (function.spk)
+                    case SPK.LightCCT:
+                        #region cct light
+                        byte b0 = 100;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
                         {
-                            case SPK.LightCCT:
-                                byte b0 = 100;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
-                                {
-                                    if (function.trait_on_off.curValue.ToString() == "off")
-                                    {
-                                        b0 = 0;
-                                    }
-                                    else
-                                    {
-                                        b0 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
-                                    }
-                                }
-                                else
-                                {
-                                    b0 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
-                                }
-                                var bytes0 = new byte[] { function.bus.LoopId,
+                            if (function.trait_on_off.curValue.ToString() == "off")
+                            {
+                                b0 = 0;
+                            }
+                            else
+                            {
+                                b0 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
+                            }
+                        }
+                        else
+                        {
+                            b0 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
+                        }
+                        var bytes0 = new byte[] { function.bus.LoopId,
                                             b0,
                                             254, 0,Convert.ToByte(function.GetAttrState(FunctionAttributeKey.FadeTime)) ,2,
                                             (byte)(Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.CCT))/256),
                                             (byte)(Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.CCT))%256),
                                             0,
                                             0,0};
-                                ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes0, 1);
-                                break;
-                            case SPK.LightRGB:
-                                byte b = 100;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
-                                {
-                                    if (function.trait_on_off.curValue.ToString() == "off")
-                                    {
-                                        b = 0;
-                                    }
-                                    else
-                                    {
-                                        b = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
-                                    }
-                                }
-                                else
-                                {
-                                    b = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
-                                }
-                                var tempLight = new Light();
-                                var bytes = new byte[] { function.bus.LoopId,
+                        ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes0, 1);
+                        #endregion
+                        break;
+                    case SPK.LightRGB:
+                        #region rgb light
+                        byte b = 100;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
+                        {
+                            if (function.trait_on_off.curValue.ToString() == "off")
+                            {
+                                b = 0;
+                            }
+                            else
+                            {
+                                b = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
+                            }
+                        }
+                        else
+                        {
+                            b = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
+                        }
+                        var tempLight = new Light();
+                        var bytes = new byte[] { function.bus.LoopId,
                                             b,
                                             254, 0,Convert.ToByte(function.GetAttrState(FunctionAttributeKey.FadeTime)) ,3,
                                             (byte)tempLight.GetColor(0,function),
                                             (byte)tempLight.GetColor(1,function),
                                             (byte)tempLight.GetColor(2,function),
                                             0,0};
-                                ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes, 1);
-                                break;
-                            case SPK.LightDimming:
-                                byte b1 = 100;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
-                                {
-                                    if (function.trait_on_off.curValue.ToString() == "off")
-                                    {
-                                        b1 = 0;
-                                    }
-                                    else
-                                    {
-                                        b1 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
-                                    }
-                                }
-                                else
-                                {
-                                    b1 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
-                                }
-                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] {
+                        ControlBytesSend(Command.SetLogicLoopColor, subnetId, deviceId, bytes, 1);
+                        #endregion
+                        break;
+                    case SPK.LightDimming:
+                        #region dimming light
+                        byte b1 = 100;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff))
+                        {
+                            if (function.trait_on_off.curValue.ToString() == "off")
+                            {
+                                b1 = 0;
+                            }
+                            else
+                            {
+                                b1 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness);
+                            }
+                        }
+                        else
+                        {
+                            b1 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness));
+                        }
+                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] {
                                             function.bus.LoopId,
                                             b1,
                                             0, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.FadeTime)) });
-                                break;
-                            case SPK.LightSwitch:
-                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, function.trait_on_off.curValue.ToString() == "on" ? (byte)100 : (byte)0, 0, 0 });
-                                break;
-                        }
+                        #endregion
                         break;
-                    case FunctionCategory.Curtain:
-                        switch (function.spk)
+                    case SPK.LightSwitch:
+                        #region LightSwitch
+                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, function.trait_on_off.curValue.ToString() == "on" ? (byte)100 : (byte)0, 0, 0 });
+                        #endregion
+                        break;
+                    case SPK.CurtainSwitch:
+                        #region switch curtain
+                        byte switchCurtain = 0;
+                        if (function.trait_on_off.curValue.ToString() == "stop")
                         {
-                            case SPK.CurtainSwitch:
-                                byte b1 = 0;
-                                if (function.trait_on_off.curValue.ToString() == "stop")
-                                {
-                                    b1 = 0;
-                                }
-                                else if (function.trait_on_off.curValue.ToString() == "on")
-                                {
-                                    b1 = 1;
-                                }
-                                else
-                                {
-                                    b1 = 2;
-                                }
-                                ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { function.bus.LoopId, b1 });
-                                break;
-                            case SPK.CurtainTrietex:
-                            case SPK.CurtainRoller:
-                                if (function.trait_on_off.curValue.ToString() == "stop")
-                                {
-                                    ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { function.bus.LoopId, 0 });
-                                }
-                                else
-                                {
-                                    ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { 17, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Percent)) });
+                            switchCurtain = 0;
+                        }
+                        else if (function.trait_on_off.curValue.ToString() == "on")
+                        {
+                            switchCurtain = 1;
+                        }
+                        else
+                        {
+                            switchCurtain = 2;
+                        }
+                        ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { function.bus.LoopId, switchCurtain });
+                        #endregion
+                        break;
+                    case SPK.CurtainTrietex:
+                    case SPK.CurtainRoller:
+                        if (function.trait_on_off.curValue.ToString() == "stop")
+                        {
+                            ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { function.bus.LoopId, 0 });
+                        }
+                        else
+                        {
+                            ControlBytesSend(Command.SetCurtainModelStutas, subnetId, deviceId, new byte[] { 17, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Percent)) });
 
-                                }
-                                break;
                         }
                         break;
-                    case FunctionCategory.AC:
-                        switch (function.spk)
+                    case SPK.AcStandard:
+                        var ac = new AC();
+                        foreach (var dic in commandDictionary)
                         {
-                            case SPK.AcStandard:
-                                var ac = new AC();
-                                //ControlBytesSend(Command.SetACMode, subnetId, deviceId, new byte[] { function.bus.LoopId, 0, 32, 32, 32, 32, 32, 0, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0,
-                                //    ac.GetModeIndex(function),
-                                //    ac.GetFanIndex(function), Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), 0 });
+                            switch (dic.Key)
+                            {
+                                case FunctionAttributeKey.OnOff:
+                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 3, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId });
+                                    break;
+                                case "mode":
+                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 6, ac.GetModeIndex(function), function.bus.LoopId });
+                                    break;
+                                case "fan":
+                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 5, ac.GetFanIndex(function), function.bus.LoopId });
+                                    break;
+                                case FunctionAttributeKey.SetTemp:
+                                    byte modeKey = 4;
+                                    switch (ac.GetModeIndex(function))
+                                    {
+                                        case 3:
+                                            modeKey = 8;
+                                            break;
+                                        case 0:
+                                            modeKey = 4;
+                                            break;
+                                        case 1:
+                                            modeKey = 7;
+                                            break;
+                                        case 4:
+                                            modeKey = 19;
+                                            break;
+                                        case 2:
+                                            modeKey = 2;
+                                            break;
+                                    }
+                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] {
+                                                modeKey, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), function.bus.LoopId });
+                                    break;
+                                default:
+                                    MainPage.Log($"鍔熻兘鏈敮鎸� : {dic.Key}");
+                                    break;
+                            }
+                        }
+                        break;
+                    case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:
+                        var fhTemp = new FloorHeating();
+                        if (function.Fh_Mode_Temp.Count == 4)
+                        {
+                            if (function.GetAttribute(FunctionAttributeKey.Mode) == null)
+                            {
                                 foreach (var dic in commandDictionary)
                                 {
                                     switch (dic.Key)
                                     {
                                         case FunctionAttributeKey.OnOff:
-                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 3, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId });
+                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 20, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId });
                                             break;
                                         case "mode":
-                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 6, ac.GetModeIndex(function), function.bus.LoopId });
-                                            break;
-                                        case "fan":
-                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 5, ac.GetFanIndex(function), function.bus.LoopId });
+                                            ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 21, fhTemp.GetModeIndex(function), function.bus.LoopId });
                                             break;
                                         case FunctionAttributeKey.SetTemp:
-                                            byte modeKey = 4;
-                                            switch (ac.GetModeIndex(function))
+                                            byte modeKey = 25;
+                                            switch (fhTemp.GetModeIndex(function))
                                             {
-                                                case 3:
-                                                    modeKey = 8;
-                                                    break;
-                                                case 0:
-                                                    modeKey = 4;
-                                                    break;
                                                 case 1:
-                                                    modeKey = 7;
-                                                    break;
-                                                case 4:
-                                                    modeKey = 19;
+                                                    modeKey = 25;
                                                     break;
                                                 case 2:
-                                                    modeKey = 2;
+                                                    modeKey = 26;
+                                                    break;
+                                                case 3:
+                                                    modeKey = 27;
+                                                    break;
+                                                case 4:
+                                                    modeKey = 28;
                                                     break;
                                             }
                                             ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] {
@@ -599,180 +636,127 @@
                                             break;
                                     }
                                 }
-
-                                break;
-                        }
-                        break;
-                    case FunctionCategory.FloorHeat:
-                        var fhTemp = new FloorHeating();
-                        switch (function.spk)
-                        {
-                            case SPK.FloorHeatStandard:
-                                if (function.Fh_Mode_Temp.Count == 4)
+                            }
+                            else
+                            {
+                                var onoffString = function.trait_on_off.curValue.ToString();
+                                byte b12 = 1;
+                                if (onoffString == "off")
                                 {
-                                    if (function.GetAttribute(FunctionAttributeKey.Mode) == null)
+                                    b12 = 0;
+                                }
+                                var wm = fhTemp.GetWorkModeIndex(function);
+                                if (wm > 0)
+                                {
+                                    b12 += (byte)(16 + wm);
+                                }
+                                if (commandDictionary.ContainsKey("set_temp"))
+                                {
+                                    var dicTempString = "";
+                                    commandDictionary.TryGetValue("set_temp", out dicTempString);
+                                    var dicTemp = Convert.ToByte(dicTempString);
+                                    var mode = function.GetAttrState(FunctionAttributeKey.Mode);
+                                    switch (mode)
                                     {
-                                        foreach (var dic in commandDictionary)
-                                        {
-                                            switch (dic.Key)
-                                            {
-                                                case FunctionAttributeKey.OnOff:
-                                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 20, function.trait_on_off.curValue.ToString() == "on" ? (byte)1 : (byte)0, function.bus.LoopId });
-                                                    break;
-                                                case "mode":
-                                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] { 21, fhTemp.GetModeIndex(function), function.bus.LoopId });
-                                                    break;
-                                                case FunctionAttributeKey.SetTemp:
-                                                    byte modeKey = 25;
-                                                    switch (fhTemp.GetModeIndex(function))
-                                                    {
-                                                        case 1:
-                                                            modeKey = 25;
-                                                            break;
-                                                        case 2:
-                                                            modeKey = 26;
-                                                            break;
-                                                        case 3:
-                                                            modeKey = 27;
-                                                            break;
-                                                        case 4:
-                                                            modeKey = 28;
-                                                            break;
-                                                    }
-                                                    ControlBytesSend(Command.InstructionPanelKey, function.bus.SubnetID, function.bus.DeviceID, new byte[] {
-                                                modeKey, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.SetTemp)), function.bus.LoopId });
-                                                    break;
-                                                default:
-                                                    MainPage.Log($"鍔熻兘鏈敮鎸� : {dic.Key}");
-                                                    break;
-                                            }
-                                        }
+                                        case "day":
+                                            function.Fh_Mode_Temp["day"] = dicTemp;
+                                            break;
+                                        case "night":
+                                            function.Fh_Mode_Temp["night"] = dicTemp;
+                                            break;
+                                        case "away":
+                                            function.Fh_Mode_Temp["away"] = dicTemp;
+                                            break;
+                                        case "normal":
+                                            function.Fh_Mode_Temp["normal"] = dicTemp;
+                                            break;
                                     }
-                                    else
-                                    {
-                                        var onoffString = function.trait_on_off.curValue.ToString();
-                                        byte b1 = 1;
-                                        if (onoffString == "off")
-                                        {
-                                            b1 = 0;
-                                        }
-                                        var wm = fhTemp.GetWorkModeIndex(function);
-                                        if (wm > 0)
-                                        {
-                                            b1 += (byte)(16 + wm);
-                                        }
-                                        if (commandDictionary.ContainsKey("set_temp"))
-                                        {
-                                            var dicTempString = "";
-                                            commandDictionary.TryGetValue("set_temp", out dicTempString);
-                                            var dicTemp = Convert.ToByte(dicTempString);
-                                            var mode = function.GetAttrState(FunctionAttributeKey.Mode);
-                                            switch (mode)
-                                            {
-                                                case "day":
-                                                    function.Fh_Mode_Temp["day"] = dicTemp;
-                                                    break;
-                                                case "night":
-                                                    function.Fh_Mode_Temp["night"] = dicTemp;
-                                                    break;
-                                                case "away":
-                                                    function.Fh_Mode_Temp["away"] = dicTemp;
-                                                    break;
-                                                case "normal":
-                                                    function.Fh_Mode_Temp["normal"] = dicTemp;
-                                                    break;
-                                            }
-                                        }
-                                        var tt = fhTemp.GetTempUintIndex(function);
-                                        ControlBytesSend(Command.SetFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId, b1,
+                                }
+                                var tt = fhTemp.GetTempUintIndex(function);
+                                ControlBytesSend(Command.SetFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId, b12,
                                         (byte)tt,fhTemp.GetModeIndex(function), function.Fh_Mode_Temp["normal"], function.Fh_Mode_Temp["day"], function.Fh_Mode_Temp["night"], function.Fh_Mode_Temp["away"], 0, 0 });
-                                    }
-                                }
-                                break;
+                            }
                         }
                         break;
-                    case FunctionCategory.Electric:
-                        switch (function.spk)
+                    case SPK.HvacFan:
+                    case SPK.ElectricFan:
+                        #region ElectricFan
+                        if (function.trait_on_off.curValue.ToString() == "on")
                         {
-                            case SPK.ElectricFan:
-                                if (function.trait_on_off.curValue.ToString() == "on")
-                                {
-                                    ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.OpenLevel)) });
-                                }
-                                {
-                                    ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, 0 });
-                                }
-                                break;
-                            case SPK.ElectricSocket:
-                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, function.trait_on_off.curValue.ToString() == "on" ? (byte)100 : (byte)0 });
-                                break;
+                            ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, Convert.ToByte(function.GetAttrState(FunctionAttributeKey.OpenLevel)) });
                         }
-                        break;
-                    case FunctionCategory.AirFresh:
-                        switch(function.spk)
                         {
-                            case SPK.AirFreshJinmao:
-                                //1   鏂伴缂栧彿    1~200
-                                //2   绫诲瀷 绗笁鏂圭被鍨�  0锛氶噾鑼傛柊椋�
+                            ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, 0 });
+                        }
+                        #endregion
+                        break;
+                    case SPK.ElectricSocket:
+                    case SPK.PanelSocket:
+                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, function.trait_on_off.curValue.ToString() == "on" ? (byte)100 : (byte)0 });
+                        break;
+                    case SPK.AirFreshJinmao:case SPK.HvacAirFreshJinmao:
+                        #region AirFresh
+                        //1   鏂伴缂栧彿    1~200
+                        //2   绫诲瀷 绗笁鏂圭被鍨�  0锛氶噾鑼傛柊椋�
 
-                                //3   寮�鍏�  0 - 鍏虫満锛�1 - 寮�鏈�
-                                byte switchValue = 0;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff) == true
-                                    && commandDictionary[FunctionAttributeKey.OnOff] == "on")
-                                {
-                                    switchValue = 1;
-                                }
+                        //3   寮�鍏�  0 - 鍏虫満锛�1 - 寮�鏈�
+                        byte switchValue = 0;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff) == true
+                            && commandDictionary[FunctionAttributeKey.OnOff] == "on")
+                        {
+                            switchValue = 1;
+                        }
 
-                                //4   杩愯妯″紡    1 - 閫氶锛�2 - 鍔犳箍
-                                byte airFreshMode = 1;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.Mode) == true
-                                    && commandDictionary[FunctionAttributeKey.Mode] == "humidification")
-                                {
-                                    airFreshMode = 2;
-                                }
-                                //5   鑺傝兘鑸掗�傞�夋嫨  1 - 鑸掗�傦紝2 - 鑺傝兘
-                                byte airFreshEnergy = 1;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.Energy) == true
-                                   && commandDictionary[FunctionAttributeKey.Energy] == "true")
-                                {
-                                    airFreshEnergy = 2;
-                                }
-                                //6   椋庨�熸。浣�    0 - 鑷姩锛�1 - 1妗o紝2 - 2妗o紝3 - 3妗�
-                                byte airFreshFan = 0;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.FanSpeed) == true)
-                                {
-                                    switch (commandDictionary[FunctionAttributeKey.FanSpeed])
-                                    {
-                                        case "auto":
-                                            airFreshFan = 0;
-                                            break;
-                                        case "level_1":
-                                            airFreshFan = 1;
-                                            break;
-                                        case "level_2":
-                                            airFreshFan = 2;
-                                            break;
-                                        case "level_3":
-                                            airFreshFan = 3;
-                                            break;
-                                    }
-                                }
-                                //7   婀垮害璁惧畾 %
-                                //8   瀹ゅ唴娓╁害鍊�   鈩�
-                                byte indoorTemp_airFrsh = 0;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorTemp) == true)
-                                {
-                                    indoorTemp_airFrsh= Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorTemp]);
-                                }
-                                byte indoorHumidity_airFrsh = 0;
-                                if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorHumidity) == true)
-                                {
-                                    indoorHumidity_airFrsh = Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorHumidity]);
-                                }
-                                //9   瀹ゅ唴婀垮害鍊�   鈩�
-                                //10  杩囨护缃戝墿浣� %
-                                //11  杩囨护缃戜娇鐢ㄨ秴鏃� 1 瓒呮椂 0 鏃�    
-                                ControlBytesSend(Command.FreshAirControl_JinMao, subnetId, deviceId, new byte[] {
+                        //4   杩愯妯″紡    1 - 閫氶锛�2 - 鍔犳箍
+                        byte airFreshMode = 1;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.Mode) == true
+                            && commandDictionary[FunctionAttributeKey.Mode] == "humidification")
+                        {
+                            airFreshMode = 2;
+                        }
+                        //5   鑺傝兘鑸掗�傞�夋嫨  1 - 鑸掗�傦紝2 - 鑺傝兘
+                        byte airFreshEnergy = 1;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.Energy) == true
+                           && commandDictionary[FunctionAttributeKey.Energy] == "true")
+                        {
+                            airFreshEnergy = 2;
+                        }
+                        //6   椋庨�熸。浣�    0 - 鑷姩锛�1 - 1妗o紝2 - 2妗o紝3 - 3妗�
+                        byte airFreshFan = 0;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.FanSpeed) == true)
+                        {
+                            switch (commandDictionary[FunctionAttributeKey.FanSpeed])
+                            {
+                                case "auto":
+                                    airFreshFan = 0;
+                                    break;
+                                case "level_1":
+                                    airFreshFan = 1;
+                                    break;
+                                case "level_2":
+                                    airFreshFan = 2;
+                                    break;
+                                case "level_3":
+                                    airFreshFan = 3;
+                                    break;
+                            }
+                        }
+                        //7   婀垮害璁惧畾 %
+                        //8   瀹ゅ唴娓╁害鍊�   鈩�
+                        byte indoorTemp_airFrsh = 0;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorTemp) == true)
+                        {
+                            indoorTemp_airFrsh = Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorTemp]);
+                        }
+                        byte indoorHumidity_airFrsh = 0;
+                        if (commandDictionary.ContainsKey(FunctionAttributeKey.IndoorHumidity) == true)
+                        {
+                            indoorHumidity_airFrsh = Convert.ToByte(commandDictionary[FunctionAttributeKey.IndoorHumidity]);
+                        }
+                        //9   瀹ゅ唴婀垮害鍊�   鈩�
+                        //10  杩囨护缃戝墿浣� %
+                        //11  杩囨护缃戜娇鐢ㄨ秴鏃� 1 瓒呮椂 0 鏃�    
+                        ControlBytesSend(Command.FreshAirControl_JinMao, subnetId, deviceId, new byte[] {
                                     function.bus.LoopId,0, switchValue ,
                                     airFreshMode,airFreshEnergy,
                                     airFreshFan,
@@ -783,8 +767,7 @@
                                     //function.GetAttrState(FunctionAttributeKey.FilterTimeout) =="true"?1:0,
                                     0,0
                                 });
-                                break;
-                        }
+                        #endregion
                         break;
                 }
                 #region 鍙戦�佸懡浠ょ珛鍗虫洿鏂癠I
@@ -811,89 +794,55 @@
                 var deviceId = function.bus.DeviceID;
                 var loopId = function.bus.LoopId;
 
-                switch (function.Spk_Prefix)
+                switch (function.spk)
                 {
-                    case FunctionCategory.Light:
-                        switch (function.spk)
-                        {
-                            case SPK.LightSwitch:
-                            case SPK.LightDimming:
-                                ControlBytesSend(Command.ReadLightAllLoopBrightness, subnetId, deviceId, new byte[] { });
-                                break;
-                            case SPK.LightRGB:
-                                ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus.LoopId});
-                                break;
-                            case SPK.LightCCT:
-                                ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus.LoopId });
-                                break;
-                        }
+                    case SPK.LightSwitch:
+                    case SPK.LightDimming:
+                        ControlBytesSend(Command.ReadLightAllLoopBrightness, subnetId, deviceId, new byte[] { });
                         break;
-                    case FunctionCategory.Curtain:
-                        switch (function.spk)
-                        {
-                            case SPK.CurtainSwitch:
-                            case SPK.CurtainTrietex:
-                            case SPK.CurtainRoller:
-                                ControlBytesSend(Command.ReadCurtainStatus, subnetId, deviceId, new byte[] { function.bus.LoopId });
-                                break;
-                        }
+                    case SPK.LightRGB:
+                        ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus.LoopId });
                         break;
-                    case FunctionCategory.AC:
-                        switch (function.spk)
-                        {
-                            case SPK.AcStandard:
-                                ControlBytesSend(Command.ReadACMode, subnetId, deviceId, new byte[] { function.bus.LoopId });
-                                break;
-                        }
+                    case SPK.LightCCT:
+                        ControlBytesSend(Command.ReadLogicLoopColor, subnetId, deviceId, new byte[] { function.bus.LoopId });
                         break;
-                    case FunctionCategory.FloorHeat:
-                        switch (function.spk)
-                        {
-                            case SPK.FloorHeatStandard:
-                                ControlBytesSend(Command.ReadFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId });
-                                break;
-                        }
+                    case SPK.CurtainSwitch:
+                    case SPK.CurtainTrietex:
+                    case SPK.CurtainRoller:
+                        ControlBytesSend(Command.ReadCurtainStatus, subnetId, deviceId, new byte[] { function.bus.LoopId });
                         break;
-                    case FunctionCategory.Electric:
-                        switch (function.spk)
-                        {
-                            case SPK.ElectricFan:
-                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId });
-                                break;
-                            case SPK.ElectricSocket:
-                                ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId });
-                                break;
-                        }
+                    case SPK.AcStandard:
+                        ControlBytesSend(Command.ReadACMode, subnetId, deviceId, new byte[] { function.bus.LoopId });
                         break;
-                    case FunctionCategory.Sensor:
-                        byte sensorType = 0;
-                        switch (function.spk)
-                        {
-                            case SPK.SensorTemperature:
-                                sensorType = 2;
-                                break;
-                            case SPK.SensorHumidity:
-                                sensorType = 3;
-                                break;
-                            case SPK.SensorTVOC:
-                                sensorType = 5;
-                                break;
-                            case SPK.SensorPm25:
-                                sensorType = 6;
-                                break;
-                            case SPK.SensorCO2:
-                                sensorType = 7;
-                                break;
-                        }
-                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, sensorType, function.bus.LoopId });
+                    case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:
+                        ControlBytesSend(Command.ReadFloorHeat, subnetId, deviceId, new byte[] { function.bus.LoopId });
                         break;
-                    case FunctionCategory.AirFresh:
-                        switch(function.spk)
-                        {
-                            case SPK.AirFreshJinmao:
-                                ControlBytesSend(Command.FreshAirRead_JinMao, subnetId, deviceId, new byte[] { function.bus.LoopId });
-                                break;
-                        }
+                    case SPK.HvacFan:
+                    case SPK.ElectricFan:
+                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId });
+                        break;
+                    case SPK.ElectricSocket:
+                    case SPK.PanelSocket:
+                        ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId });
+                        break;
+                    case SPK.SensorTemperature:
+                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 2, function.bus.LoopId });
+                        break;
+                    case SPK.SensorHumidity:
+                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 3, function.bus.LoopId });
+                        break;
+                    case SPK.SensorTVOC:
+                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 5, function.bus.LoopId });
+                        break;
+                    case SPK.SensorPm25:
+                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 6, function.bus.LoopId });
+                        break;
+                    case SPK.SensorCO2:
+                        ControlBytesSend(Command.ReadDeviceLoopInfo, subnetId, deviceId, new byte[] { 5, 7, function.bus.LoopId });
+                        break;
+                    case SPK.AirFreshJinmao:
+                    case SPK.HvacAirFreshJinmao:
+                        ControlBytesSend(Command.FreshAirRead_JinMao, subnetId, deviceId, new byte[] { function.bus.LoopId });
                         break;
                 }
             }
diff --git a/HDL_ON/DAL/DriverLayer/Packet.cs b/HDL_ON/DAL/DriverLayer/Packet.cs
index 173d521..96222c0 100644
--- a/HDL_ON/DAL/DriverLayer/Packet.cs
+++ b/HDL_ON/DAL/DriverLayer/Packet.cs
@@ -138,6 +138,7 @@
                                     {
                                         switch (updataObj.spk)
                                         {
+                                            case SPK.HvacFan:
                                             case SPK.ElectricFan:
                                                 updataObj.SetAttrState(FunctionAttributeKey.OpenLevel, receiveBytes[2].ToString());
                                                 updataObj.lastState = Language.StringByID(StringId.Level) + " : " + receiveBytes[2];
@@ -160,6 +161,7 @@
                                         case SPK.LightDimming:
                                             DimmerPage.UpdataStates(updataObj);
                                             break;
+                                        case SPK.HvacFan:
                                         case SPK.ElectricFan:
                                             FanPage.UpdataState(updataObj);
                                             break;
@@ -216,9 +218,11 @@
                                     switch (function.spk)
                                     {
                                         case SPK.ElectricFan:
+                                        case SPK.HvacFan:
                                             FanPage.UpdataState(function);
                                             break;
                                         case SPK.ElectricSocket:
+                                        case SPK.PanelSocket:
                                             SocketPage.UpdataState(function);
                                             break;
                                     }
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 8757db9..87451d5 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -408,7 +408,7 @@
                                             for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;)
                                             {
                                                 var localFunction = FunctionList.List.GetDeviceFunctionList()[i];
-                                                if (localFunction.Spk_Prefix == FunctionCategory.Music || string.IsNullOrEmpty(localFunction.Spk_Prefix))
+                                                if (SPK.MusicSpkList().Contains(localFunction.spk))
                                                 {
                                                     i++;
                                                     continue;
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index d24bbdf..1ca6724 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -146,7 +146,48 @@
         {
             get
             {
-                return spk.Replace(".","");
+                string iconPath = spk.Replace(".", "");
+                switch (spk)
+                {
+                    case SPK.PanelSocket:
+                        iconPath = "electricalsocket";
+                        break;
+                    case SPK.SenesorMegahealth2:
+                        iconPath = "sensormegahealth";
+                        break;
+                    case SPK.SensorEnvironmentHailin:
+                        iconPath = "sensorenvironment";
+                        break;
+                    case SPK.HvacAirFresh:
+                        iconPath = "airFreshstandard";
+                        break;
+                    case SPK.HvacAirFreshJinmao:
+                        iconPath = "airFreshjinmao";
+                        break;
+                    case SPK.HvacAC:
+                        iconPath = "acstandard";
+                        break;
+                    case SPK.HvacFan:
+                        iconPath = "electricalfan";
+                        break;
+                    case SPK.ElectricTuyaFan2:
+                        iconPath = "electricaltyqborgovyzytytz";
+                        break;
+                    case SPK.ElectricTuyaAirCleaner2:
+                        iconPath = "electricalQ1RsefNf91tIXyyQ";
+                        break;
+                    case SPK.ElectricTuyaWaterValve2:
+                        iconPath = "electricalkoiGhMKwLf2ZP81g";
+                        break;
+                    case SPK.ElectricTuyaWeepRobot2:
+                        iconPath = "electricalai6HtccKFIw3dxo3";
+                        break;
+                    case SPK.AvMusic:
+                        iconPath = "musicstandard";
+                        break;
+
+                }
+                return iconPath;
             }
         }
 
@@ -188,24 +229,87 @@
         /// </summary>
         public string spk = "";
 
-        string spk_Prefix;
+        private string _SpkCategory = string.Empty;
         /// <summary>
-        /// spk鍓嶇紑
-        /// 澶х被
-        /// 鍔熻兘绫诲埆
-        /// 濡傦細绌鸿皟绫汇�佺伅鍏夌被銆佺獥甯樼被
+        /// spk  浜у搧鐨勫搧绫�
         /// </summary>
-        public string Spk_Prefix
+        public string SpkCategory
         {
             get
             {
-                if (string.IsNullOrEmpty(spk_Prefix))
+                if (string.IsNullOrEmpty(_SpkCategory))
                 {
-                    spk_Prefix = spk.Split(".")[0];
+                    var arr = spk.Split(".");
+                    if (arr.Length > 0)
+                    {
+                        _SpkCategory = arr[0];
+                    }
                 }
-                return spk_Prefix;
+                return _SpkCategory;
             }
         }
+
+        private string _SpkClassification = string.Empty;
+        /// <summary>
+        /// spk 浜у搧鍝佺被涓嬬殑鍒嗙被
+        /// </summary>
+        public string SpkClassification
+        {
+            get
+            {
+                if (string.IsNullOrEmpty(_SpkClassification))
+                {
+                    var arr = spk.Split(".");
+                    if (arr.Length > 1)
+                    {
+                        _SpkClassification = arr[1];
+                    }
+                }
+                return _SpkClassification;
+            }
+        }
+
+        string _SpkManufacturer = string.Empty;
+        /// <summary>
+        /// spk 浜у搧鐨勫巶鍟�
+        /// </summary>
+        public string SpkManufacturer
+        {
+            get
+            {
+                if (string.IsNullOrEmpty(_SpkManufacturer))
+                {
+                    var arr = spk.Split(".");
+                    if (arr.Length > 2)
+                    {
+                        _SpkManufacturer = arr[2];
+                    }
+                }
+                return _SpkManufacturer;
+            }
+        }
+
+
+        //string spk_Prefix;
+        ///// <summary>
+        ///// spk鍓嶇紑
+        ///// 澶х被
+        ///// 鍔熻兘绫诲埆
+        ///// 濡傦細绌鸿皟绫汇�佺伅鍏夌被銆佺獥甯樼被
+        ///// </summary>
+        //public string Spk_Prefix
+        //{
+        //    get
+        //    {
+        //        if (string.IsNullOrEmpty(spk_Prefix))
+        //        {
+        //            spk_Prefix = spk.Split(".")[0];
+        //        }
+        //        return spk_Prefix;
+        //    }
+        //}
+
+
         /// <summary>
         /// A鍗忚鍔熻兘鐨勭壒鎬�
         /// 濡傦細鏄疉C鍔熻兘锛氱壒鎬э細on_off,mode,fan,temperature
@@ -1075,6 +1179,10 @@
         /// 锛堢孩澶栫┖璋冿級
         /// </summary>
         public const string AcIr= "ir.ac";
+        /// <summary>
+        /// 绌鸿皟
+        /// </summary>
+        public const string HvacAC = "hvac.ac";
 
         /// <summary>
         /// 绌鸿皟spk鍒楄〃
@@ -1084,6 +1192,7 @@
         {
             var spkList = new List<string>();
             spkList.Add(AcStandard);
+            spkList.Add(HvacAC);
             spkList.Add(AcIr);
             return spkList;
         }
@@ -1094,6 +1203,10 @@
         /// 锛堝湴鐑級
         /// </summary>
         public const string FloorHeatStandard = "floorHeat.standard";
+        /// <summary>
+        /// 鍦版殩
+        /// </summary>
+        public const string HvacFloorHeat = "hvac.floorHeat";
 
         /// <summary>
         /// 鍦扮儹spk鍒楄〃
@@ -1103,6 +1216,7 @@
         {
             var spkList = new List<string>();
             spkList.Add(FloorHeatStandard);
+            spkList.Add(HvacFloorHeat);
             return spkList;
         }
         #endregion
@@ -1113,9 +1227,17 @@
         /// </summary>
         public const string AirFreshStandard = "airFresh.standard";
         /// <summary>
+        /// 鏂伴
+        /// </summary>
+        public const string HvacAirFresh = "hvac.airFresh";
+        /// <summary>
         /// 鏂伴 鈥斺�旈噾鑼傚畾鍒�
         /// </summary>
         public const string AirFreshJinmao = "airFresh.jinmao";
+        /// <summary>
+        /// 鏂伴 鈥斺�旈噾鑼傚畾鍒�
+        /// </summary>
+        public const string HvacAirFreshJinmao = "hvac.airFresh.jinmao";
 
         /// <summary>
         /// 鏂伴spk鍒楄〃
@@ -1126,6 +1248,8 @@
             var spkList = new List<string>();
             spkList.Add(AirFreshStandard);
             spkList.Add(AirFreshJinmao);
+            spkList.Add(HvacAirFresh);
+            spkList.Add(HvacAirFreshJinmao);
             return spkList;
         }
         #endregion
@@ -1157,6 +1281,10 @@
         /// 锛堥煶涔愶級
         /// </summary>
         public const string MusicStandard = "music.standard";
+        /// <summary>
+        /// 闊充箰
+        /// </summary>
+        public const string AvMusic = "av.music";
 
         /// <summary>
         /// 闊充箰spk鍒楄〃
@@ -1166,6 +1294,7 @@
         {
             var spkList = new List<string>();
             spkList.Add(MusicStandard);
+            spkList.Add(AvMusic);
             return spkList;
         }
         #endregion
@@ -1216,6 +1345,7 @@
         /// 姣背娉紶鎰熷櫒
         /// </summary>
         public const string SenesorMegahealth = "sensor.megahealth";
+        public const string SenesorMegahealth2 = "sensor.megahealth.zg";
         /// <summary>
         /// 瀹夐槻浼犳劅鍣╯pk鍒楄〃
         /// </summary>
@@ -1234,6 +1364,7 @@
             //spkList.Add(SensoruUtrasonic);
             spkList.Add(SensorDryContact);
             spkList.Add(SenesorMegahealth);
+            spkList.Add(SenesorMegahealth2);
             return spkList;
         }
         #endregion
@@ -1274,6 +1405,7 @@
         /// 闈掕悕鐜浼犳劅鍣�
         /// </summary>
         public const string SensorEnvironment3 = "sensor.environment3";
+        public const string SensorEnvironmentHailin = "sensor.environment.hailin";
         /// <summary>
         /// 鐢查啗
         /// </summary>
@@ -1335,6 +1467,10 @@
         /// </summary>
         public const string ElectricSocket = "electrical.socket";
         /// <summary>
+        /// 闈㈡澘銆佹彃搴с�侀潰鏉�
+        /// </summary>
+        public const string PanelSocket = "panel.socket";
+        /// <summary>
         /// 瀹剁數銆佺數瑙�
         /// </summary>
         public const string ElectricTV = "electrical.tv";
@@ -1350,6 +1486,7 @@
         /// 瀹剁數銆侀鎵�
         /// </summary>
         public const string ElectricFan = "electrical.fan";
+        public const string HvacFan = "hvac.fan";
         /// <summary>
         /// 鍑夐湼
         /// </summary>
@@ -1392,18 +1529,22 @@
         /// 瀹剁數銆佹秱楦︾┖姘斿噣鍖栧櫒
         /// </summary>
         public const string ElectricTuyaAirCleaner = "electrical.Q1RsefNf91tIXyyQ";
+        public const string ElectricTuyaAirCleaner2 = "hvac.air.tuya_epi345";
         /// <summary>
         /// 瀹剁數銆佹秱楦︾數椋庢墖
         /// </summary>
         public const string ElectricTuyaFan = "electrical.tyqborgovyzytytz";
+        public const string ElectricTuyaFan2 = "hvac.fan.tuya_ef101";
         /// <summary>
         /// 瀹剁數銆佹秱楦︽壂鍦版満鍣ㄤ汉
         /// </summary>
         public const string ElectricTuyaWeepRobot = "electrical.ai6HtccKFIw3dxo3";
+        public const string ElectricTuyaWeepRobot2 = "electrical.sweep.tuya";
         /// <summary>
         /// 瀹剁數銆佹秱楦︽按闃�
         /// </summary>
         public const string ElectricTuyaWaterValve = "electrical.koiGhMKwLf2ZP81g";
+        public const string ElectricTuyaWaterValve2 = "electrical.watervalve.tuya_aw713";
         #endregion
 
 
@@ -1415,19 +1556,25 @@
         {
             var spkList = new List<string>();
             spkList.Add(ElectricSocket);
+            spkList.Add(PanelSocket);
             spkList.Add(ElectricTV);
             spkList.Add(TvIr);
             spkList.Add(TvXmIr);
             spkList.Add(ElectricFan);
+            spkList.Add(HvacFan);
             spkList.Add(FanIr);
             spkList.Add(ClothesHanger);
             spkList.Add(IrLearn);
             spkList.Add(PjtIr);
             spkList.Add(StbIr);
             spkList.Add(ElectricTuyaAirCleaner);
+            spkList.Add(ElectricTuyaAirCleaner2);
             spkList.Add(ElectricTuyaFan);
+            spkList.Add(ElectricTuyaFan2);
             spkList.Add(ElectricTuyaWeepRobot);
+            spkList.Add(ElectricTuyaWeepRobot2);
             spkList.Add(ElectricTuyaWaterValve);
+            spkList.Add(ElectricTuyaWaterValve2);
             spkList.Add(AirSwitch);
             return spkList;
         }
@@ -1462,10 +1609,15 @@
         {
             var spkList = new List<string>();
             spkList.Add(ElectricTuyaAirCleaner);
+            spkList.Add(ElectricTuyaAirCleaner2);
             spkList.Add(ElectricTuyaFan);
+            spkList.Add(ElectricTuyaFan2);
             spkList.Add(ElectricTuyaWaterValve);
+            spkList.Add(ElectricTuyaWaterValve2);
             spkList.Add(ElectricTuyaWeepRobot);
+            spkList.Add(ElectricTuyaWeepRobot2);
             spkList.Add(SenesorMegahealth);
+            spkList.Add(SenesorMegahealth2);
             return spkList;
         }
         /// <summary>
@@ -1483,6 +1635,10 @@
                     list.Add(ElectricTuyaFan);
                     list.Add(ElectricTuyaWaterValve);
                     list.Add(ElectricTuyaWeepRobot);
+                    list.Add(ElectricTuyaAirCleaner2);
+                    list.Add(ElectricTuyaFan2);
+                    list.Add(ElectricTuyaWaterValve2);
+                    list.Add(ElectricTuyaWeepRobot2);
                     break;
                 case BrandType.All3tyBrand:
                     list.Add(SenesorMegahealth);//鍏嗚
@@ -1520,56 +1676,56 @@
     }
 
 
-    /// <summary>
-    /// 鍔熻兘绫诲埆
-    /// </summary>
-    public static class FunctionCategory
-    {
-        /// <summary>
-        ///锛堢伅锛�
-        /// </summary>
-        public const string Light = "light";
-        /// <summary>
-        /// 锛堢獥甯橈級
-        /// </summary>
-        public const string Curtain = "curtain";
-        /// <summary>
-        /// 锛堢┖璋冿級
-        /// </summary>
-        public const string AC = "ac";
-        /// <summary>
-        /// 锛堝湴鐑級
-        /// </summary>
-        public const string FloorHeat = "floorHeat";
-        /// <summary>
-        /// 锛堟柊椋庯級
-        /// </summary>
-        public const string AirFresh = "airFresh";
-        /// <summary>
-        /// 锛堥煶涔愶級
-        /// </summary>
-        public const string Music = "music";
-        /// <summary>
-        /// 锛堜紶鎰熷櫒锛�
-        /// </summary>
-        public const string Sensor = "sensor";
-        /// <summary>
-        /// 锛堝共鎺ョ偣锛�
-        /// </summary>
-        public const string DryContact = "dryContact";
-        /// <summary>
-        /// 瀹剁數
-        /// </summary>
-        public const string Electric = "electrical";
-        /// <summary>
-        /// 绾㈠璁惧
-        /// </summary>
-        public const string IR = "ir";
+    ///// <summary>
+    ///// 鍔熻兘绫诲埆
+    ///// </summary>
+    //public static class FunctionCategory
+    //{
+    //    /// <summary>
+    //    ///锛堢伅锛�
+    //    /// </summary>
+    //    public const string Light = "light";
+    //    /// <summary>
+    //    /// 锛堢獥甯橈級
+    //    /// </summary>
+    //    public const string Curtain = "curtain";
+    //    /// <summary>
+    //    /// 锛堢┖璋冿級
+    //    /// </summary>
+    //    public const string AC = "ac";
+    //    /// <summary>
+    //    /// 锛堝湴鐑級
+    //    /// </summary>
+    //    public const string FloorHeat = "floorHeat";
+    //    /// <summary>
+    //    /// 锛堟柊椋庯級
+    //    /// </summary>
+    //    public const string AirFresh = "airFresh";
+    //    /// <summary>
+    //    /// 锛堥煶涔愶級
+    //    /// </summary>
+    //    public const string Music = "music";
+    //    /// <summary>
+    //    /// 锛堜紶鎰熷櫒锛�
+    //    /// </summary>
+    //    public const string Sensor = "sensor";
+    //    /// <summary>
+    //    /// 锛堝共鎺ョ偣锛�
+    //    /// </summary>
+    //    public const string DryContact = "dryContact";
+    //    /// <summary>
+    //    /// 瀹剁數
+    //    /// </summary>
+    //    public const string Electric = "electrical";
+    //    /// <summary>
+    //    /// 绾㈠璁惧
+    //    /// </summary>
+    //    public const string IR = "ir";
 
 
 
 
-    }
+    //}
 
 
 public class VersionInfo
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index 2419c00..aee9ad3 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -415,24 +415,7 @@
                     {
                         foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl))
                         {
-                            switch (function.Spk_Prefix)
-                            {
-                                case FunctionCategory.Music:
-                                case FunctionCategory.DryContact:
-                                    continue;
-                            }
-                            DriverLayer.Control.Ins.SendReadCommand(function);
-                            //switch (function.Spk_Prefix)
-                            //{
-                            //    case FunctionCategory.Light:
-                            //    case FunctionCategory.Electric:
-                            //    case FunctionCategory.Curtain:
-                            //    case FunctionCategory.AC:
-                            //    case FunctionCategory.FloorHeat:
-                            //    case FunctionCategory.Sensor:
-                            //        DriverLayer.Control.Ins.SendReadCommand(function);
-                            //        break;
-                            //}
+                            Control.Ins.SendReadCommand(function);
                         }
                         if(DB_ResidenceData.Instance.GatewayType == 1)
                         {
diff --git a/HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs b/HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
index ca7519b..e3d96a7 100644
--- a/HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
+++ b/HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
@@ -101,6 +101,17 @@
         /// 璁惧缁戝畾鏂瑰紡 WIFI銆丵RSCAN銆乑IG_BEE銆丒THERNET
         /// </summary>
         public string bindType;
+
+        /// <summary>
+        /// icon鏂囦欢鍚嶇О
+        /// </summary>
+        public string IconName
+        {
+            get
+            {
+                return spk.Replace(".", "");
+            }
+        }
     }
 
 }
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index df4e13e..4426346 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -25,7 +25,7 @@
         /// <summary>
         /// 鐗堟湰鍙�
         /// </summary>
-        public static string VersionString = "1.2.0923";
+        public static string VersionString = "1.2.0924";
         ///// <summary>
         ///// 瀹㈡埛绔被鍨�
         ///// </summary>
@@ -106,20 +106,33 @@
             SPK.LightCCT,SPK.LightDimming,SPK.LightSwitch,SPK.LightRGB,
             SPK.CurtainRoller,SPK.CurtainSwitch,SPK.CurtainTrietex,
             SPK.AcIr,SPK.AcStandard,
-            SPK.FloorHeatStandard,
-            SPK.AirFreshStandard,
+            SPK.FloorHeatStandard,SPK.HvacFloorHeat,
+            SPK.AirFreshStandard,SPK.HvacAirFresh,
             SPK.AirSwitch,
         };
+
+
+        static List<string> _RoomNotSupportFunctionList = null;
         /// <summary>
         /// 鎴块棿鍔熻兘鍒楄〃涓嶅姞杞界殑鍔熻兘鍒楄〃
         /// </summary>
-        public static List<string> RoomNotSupportFunctionList = new List<string>
+        public static List<string> RoomNotSupportFunctionList
         {
-            SPK.EnergyStandard,
-            SPK.MusicStandard,
-            SPK.AirSwitch,
-            SPK.ElectricEnergy,
-        };
+            get {
+                if(_RoomNotSupportFunctionList == null)
+                {
+                    _RoomNotSupportFunctionList = new List<string>();
+                    _RoomNotSupportFunctionList.Add(SPK.EnergyStandard);
+                    _RoomNotSupportFunctionList.Add(SPK.MusicStandard);
+                    _RoomNotSupportFunctionList.Add(SPK.AvMusic);
+                    _RoomNotSupportFunctionList.Add(SPK.AirSwitch);
+                    _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy);
+                    _RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList());
+                    _RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList());
+                }
+                return _RoomNotSupportFunctionList;
+            }
+        }
 
 
 
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index b91669f..89928f8 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -63,18 +63,21 @@
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                         break;
                     case SPK.FloorHeatStandard:
+                    case SPK.HvacFloorHeat:
                         var fhView = new FloorHeatingPage(function);
                         MainPage.BasePageView.AddChidren(fhView);
                         fhView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                         break;
                     case SPK.ElectricFan:
+                    case SPK.HvacFan:
                         var fanView = new FanPage(function);
                         MainPage.BasePageView.AddChidren(fanView);
                         fanView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                         break;
                     case SPK.ElectricSocket:
+                    case SPK.PanelSocket:
                         var sView = new SocketPage(function);
                         MainPage.BasePageView.AddChidren(sView);
                         sView.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
@@ -101,22 +104,27 @@
                         MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                         break;
                     case SPK.ElectricTuyaAirCleaner:
+                    case SPK.ElectricTuyaAirCleaner2:
                         var airCleaner = new TuyaAirCleanerPage();
                         airCleaner.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
                     case SPK.ElectricTuyaFan:
+                    case SPK.ElectricTuyaFan2:
                         var tuyaFan = new TuyaFanPage();
                         tuyaFan.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
                     case SPK.ElectricTuyaWaterValve:
+                    case SPK.ElectricTuyaWaterValve2:
                         var tyWaterValve = new TuyaWaterValvePage();
                         tyWaterValve.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
                     case SPK.ElectricTuyaWeepRobot:
+                    case SPK.ElectricTuyaWeepRobot2:
                         var weepRobot = new TuyaWeepRobotPage();
                         weepRobot.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
                     case SPK.MusicStandard:
+                    case SPK.AvMusic:
                         Music.A31MusicModel.Current = (function as Music.A31MusicModel);//褰撳墠鎾斁鍣�
                         var a31PlayMusicPage = new Music.A31PlayMusicPage();
                         MainPage.BasePageView.AddChidren(a31PlayMusicPage);
@@ -150,6 +158,7 @@
                         doorwindowPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
                     case SPK.SenesorMegahealth:
+                    case SPK.SenesorMegahealth2:
                         var smPage = new SenesorMegahealthPage();
                         smPage.ShowColltionButton = false;
                         smPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
@@ -177,10 +186,12 @@
                         irLearinPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
                     case SPK.AirFreshJinmao:
+                    case SPK.HvacAirFreshJinmao:
                         var airFresh1 = new AirFreshControlPage();
                         airFresh1.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
                     case SPK.AirFreshStandard:
+                    case SPK.HvacAirFresh:
                         var airFresh2 = new AirFreshRelayControlPage();
                         airFresh2.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
                         break;
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index a99dee1..c639ccd 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -782,7 +782,7 @@
                 foreach (var function in list)
                 {
                     //闊充箰妯″潡鏈変富浠庡叧绯伙紝闇�瑕佺壒娈婂鐞�
-                    if (function.Spk_Prefix == FunctionCategory.Music)
+                    if (SPK.MusicSpkList().Contains( function.spk))
                     {
                         //var music = function as Music.A31MusicModel;
                         var music = Music.A31MusicModel.A31MusicModelList.Find((obj) => obj.sid == function.sid);
@@ -1111,7 +1111,7 @@
                     LoadEvent_ControlTV(function, btnPower);
                 }
 
-                else if (function.spk == SPK.MusicStandard)
+                else if (function.spk == SPK.MusicStandard || function.spk == SPK.AvMusic)
                 {
                     btnIcon.UnSelectedImagePath = "FunctionIcon/Music/MusicIcon.png";
                     btnIcon.SelectedImagePath = "FunctionIcon/Music/MusicOnIcon.png";
@@ -1208,7 +1208,7 @@
                 //鍙栨秷鏀惰棌浜嬩欢
                 Action cannelCollect = () => {
                     function.collect = false;
-                    if (function.Spk_Prefix == FunctionCategory.Music)//澶勭悊闊充箰涓讳粠鍏崇郴
+                    if (SPK.MusicSpkList().Contains(function.spk))//澶勭悊闊充箰涓讳粠鍏崇郴
                     {
                         if ((function as Music.A31MusicModel).ServerClientType == 1)
                         {
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 75cec12..0c30e50 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -221,7 +221,7 @@
             btn.MouseUpEventHandler += (sender, e) =>
             {
                 function.collect = false;
-                if (function.Spk_Prefix == FunctionCategory.Music)//澶勭悊闊充箰涓讳粠鍏崇郴
+                if (SPK.MusicSpkList().Contains(function.spk))//澶勭悊闊充箰涓讳粠鍏崇郴
                 {
                     if ((function as Music.A31MusicModel).ServerClientType == 1)
                     {
@@ -351,7 +351,7 @@
                                         btn.IsSelected = state;
                                         if (btn.Tag != null && btn.Tag.ToString() == "state")
                                         {
-                                            if (function.Spk_Prefix == FunctionCategory.Music)
+                                            if (SPK.MusicSpkList().Contains(function.spk))
                                             {
                                                 btn.Text = (function as Music.A31MusicModel).A31PlayStatus.Title;
                                             }
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
index 32ef478..5a6a5d3 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -52,123 +52,123 @@
                                     if (fcView.GetChildren(j).Tag == null)
                                         continue;
                                     var cTag = fcView.GetChildren(j).Tag.ToString();
-                                    switch (updataFunction.Spk_Prefix)
+                                    if (SPK.LightSpkList().Contains(updataFunction.spk) ||
+                                    SPK.AcSpkList().Contains(updataFunction.spk) ||
+                                    SPK.FhSpkList().Contains(updataFunction.spk) ||
+                                    SPK.ElectricalSpkList().Contains(updataFunction.spk) ||
+                                    SPK.AirFreshSpkList().Contains(updataFunction.spk))
                                     {
-                                        case FunctionCategory.Light:
-                                        case FunctionCategory.AC:
-                                        case FunctionCategory.FloorHeat:
-                                        case FunctionCategory.Electric:
-                                        case FunctionCategory.AirFresh:
-                                            #region 鎸夐挳鐘舵�佹洿鏂�
-                                            if (cTag == updataFunction.sid + "_Switch")
+                                        #region 鎸夐挳鐘舵�佹洿鏂�
+                                        if (cTag == updataFunction.sid + "_Switch")
+                                        {
+                                            try
                                             {
-                                                try
-                                                {
-                                                    (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.curValue.ToString() == "on";
-                                                }
-                                                catch (Exception ex)
-                                                {
-                                                    MainPage.Log($"{this.GetType()} error 0 : {ex.Message}");
-                                                }
+                                                (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.curValue.ToString() == "on";
                                             }
-                                            #endregion
-                                            #region 璋冨厜鐘舵�佽繘搴︽洿鏂�
-                                            else if (cTag == updataFunction.sid + "_DimmerBar")
+                                            catch (Exception ex)
                                             {
-                                                try
-                                                {
-                                                    (fcView.GetChildren(j) as DiyImageSeekBar).Progress = Convert.ToInt32(updataFunction.GetAttrState(FunctionAttributeKey.Brightness));
-                                                    if (updataFunction.trait_on_off.curValue.ToString() == "on")
-                                                    {
-                                                        (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
-                                                    }
-                                                    else
-                                                    {
-                                                        (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.PromptingColor2;
-                                                    }
-                                                }
-                                                catch (Exception ex)
-                                                {
-                                                    MainPage.Log($"{this.GetType()} error 1 : {ex.Message}");
-                                                }
+                                                MainPage.Log($"{this.GetType()} error 0 : {ex.Message}");
                                             }
-                                            #endregion
-                                            #region 鍔熻兘鐘舵�佷俊鎭洿鏂�
-                                            else if (cTag == updataFunction.spk + "_laststates_" + updataFunction.sid)
-                                            {
-                                                try
-                                                {
-                                                    (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.curValue.ToString() == "on";
-                                                    (fcView.GetChildren(j) as Button).Text = updataFunction.lastState;
-                                                }
-                                                catch (Exception ex)
-                                                {
-                                                    MainPage.Log($"{this.GetType()} error 2 : {ex.Message}");
-                                                }
-                                            }
-                                            break;
+                                        }
                                         #endregion
-                                        case FunctionCategory.Curtain:
-                                            #region 绐楀笜鏇存柊
-                                            var onoffString = updataFunction.GetAttrState(FunctionAttributeKey.OnOff);
-                                            if (onoffString == "stop")
+                                        #region 璋冨厜鐘舵�佽繘搴︽洿鏂�
+                                        else if (cTag == updataFunction.sid + "_DimmerBar")
+                                        {
+                                            try
                                             {
-                                                return;
-                                            }
-                                            var percent = onoffString == "off" ? 0 : 100;
-                                            if(updataFunction.GetAttributes().Contains(FunctionAttributeKey.Percent))
-                                            {
-                                                string percentString = updataFunction.GetAttrState(FunctionAttributeKey.Percent);
-                                                int.TryParse(percentString, out percent);
-                                            }
-                                            if (percent == 0)
-                                            {
-                                                if (cTag == updataFunction.sid + "_off")
+                                                (fcView.GetChildren(j) as DiyImageSeekBar).Progress = Convert.ToInt32(updataFunction.GetAttrState(FunctionAttributeKey.Brightness));
+                                                if (updataFunction.trait_on_off.curValue.ToString() == "on")
                                                 {
-                                                    try
-                                                    {
-                                                        (fcView.GetChildren(j) as Button).IsSelected = true;
-                                                    }
-                                                    catch { }
+                                                    (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.AuxiliaryColor1;
                                                 }
                                                 else
                                                 {
-                                                    (fcView.GetChildren(j) as Button).IsSelected = false;
+                                                    (fcView.GetChildren(j) as DiyImageSeekBar).ProgressBarColor = CSS.CSS_Color.PromptingColor2;
                                                 }
+                                            }
+                                            catch (Exception ex)
+                                            {
+                                                MainPage.Log($"{this.GetType()} error 1 : {ex.Message}");
+                                            }
+                                        }
+                                        #endregion
+                                        #region 鍔熻兘鐘舵�佷俊鎭洿鏂�
+                                        else if (cTag == updataFunction.spk + "_laststates_" + updataFunction.sid)
+                                        {
+                                            try
+                                            {
+                                                (fcView.GetChildren(j) as Button).IsSelected = updataFunction.trait_on_off.curValue.ToString() == "on";
+                                                (fcView.GetChildren(j) as Button).Text = updataFunction.lastState;
+                                            }
+                                            catch (Exception ex)
+                                            {
+                                                MainPage.Log($"{this.GetType()} error 2 : {ex.Message}");
+                                            }
+                                        }
+                                        #endregion
+                                    }
+                                    else if (SPK.CurtainSpkList().Contains(updataFunction.spk))
+                                    {
+                                        #region 绐楀笜鏇存柊
+                                        var onoffString = updataFunction.GetAttrState(FunctionAttributeKey.OnOff);
+                                        if (onoffString == "stop")
+                                        {
+                                            return;
+                                        }
+                                        var percent = onoffString == "off" ? 0 : 100;
+                                        if (updataFunction.GetAttributes().Contains(FunctionAttributeKey.Percent))
+                                        {
+                                            string percentString = updataFunction.GetAttrState(FunctionAttributeKey.Percent);
+                                            int.TryParse(percentString, out percent);
+                                        }
+                                        if (percent == 0)
+                                        {
+                                            if (cTag == updataFunction.sid + "_off")
+                                            {
+                                                try
+                                                {
+                                                    (fcView.GetChildren(j) as Button).IsSelected = true;
+                                                }
+                                                catch { }
                                             }
                                             else
                                             {
-                                                if (cTag == updataFunction.sid + "_on")
-                                                {
-                                                    try
-                                                    {
-                                                        (fcView.GetChildren(j) as Button).IsSelected = true;
-                                                    }
-                                                    catch { }
-                                                }
-                                                else
-                                                {
-                                                    (fcView.GetChildren(j) as Button).IsSelected = false;
-                                                }
+                                                (fcView.GetChildren(j) as Button).IsSelected = false;
                                             }
-                                            #endregion
-                                            break;
-                                        case FunctionCategory.Music:
-                                            #region 闊充箰鏇存柊
-                                            var uMusic = updataFunction as Music.A31MusicModel;
-                                            if (cTag == updataFunction.spk + "_State_" + updataFunction.sid)
+                                        }
+                                        else
+                                        {
+                                            if (cTag == updataFunction.sid + "_on")
                                             {
                                                 try
                                                 {
-                                                    (fcView.GetChildren(j) as Button).IsSelected = uMusic.A31PlayStatus.status == "play";
+                                                    (fcView.GetChildren(j) as Button).IsSelected = true;
                                                 }
-                                                catch (Exception ex)
-                                                {
-                                                    MainPage.Log($"{this.GetType()} error 3 : {ex.Message}");
-                                                }
+                                                catch { }
                                             }
-                                            #endregion
-                                            break;
+                                            else
+                                            {
+                                                (fcView.GetChildren(j) as Button).IsSelected = false;
+                                            }
+                                        }
+                                        #endregion
+                                    }
+                                    else if (SPK.MusicSpkList().Contains(updataFunction.spk))
+                                    {
+                                        #region 闊充箰鏇存柊
+                                        var uMusic = updataFunction as Music.A31MusicModel;
+                                        if (cTag == updataFunction.spk + "_State_" + updataFunction.sid)
+                                        {
+                                            try
+                                            {
+                                                (fcView.GetChildren(j) as Button).IsSelected = uMusic.A31PlayStatus.status == "play";
+                                            }
+                                            catch (Exception ex)
+                                            {
+                                                MainPage.Log($"{this.GetType()} error 3 : {ex.Message}");
+                                            }
+                                        }
+                                        #endregion
                                     }
                                 }
                             }
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
index 12a47a3..0e8f778 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
@@ -23,39 +23,29 @@
                 try
                 {
                     ShowFunction vv = ShowFunction.Light;
-                    switch (function.spk)
+                    if (SPK.ElectricalSpkList().Contains(function.spk))
                     {
-                        case SPK.FloorHeatStandard:
-                            vv = ShowFunction.FloorHeating;
-                            break;
-                        case SPK.AcStandard:
-                            vv = ShowFunction.AC;
-                            break;
-                        case SPK.CurtainRoller:
-                        case SPK.CurtainShades:
-                        case SPK.CurtainSwitch:
-                        case SPK.CurtainTrietex:
-                            vv = ShowFunction.Curtain;
-                            break;
-                        case SPK.LightCCT:
-                        case SPK.LightDimming:
-                        case SPK.LightRGB:
-                        case SPK.LightSwitch:
-                            vv = ShowFunction.Light;
-                            break;
-                        case SPK.ElectricSocket:
-                        case SPK.ElectricTuyaAirCleaner:
-                        case SPK.ElectricTuyaFan:
-                        case SPK.ElectricTuyaWaterValve:
-                        case SPK.ElectricTuyaWeepRobot:
-                        case SPK.ClothesHanger:
-                        case SPK.AirSwitch:
-                            vv = ShowFunction.Electric;
-                            break;
-                        case SPK.AirFreshJinmao:
-                        case SPK.AirFreshStandard:
-                            vv = ShowFunction.FreshAir;
-                            break;
+                        vv = ShowFunction.Electric;
+                    }
+                    else if (SPK.FhSpkList().Contains(function.spk))
+                    {
+                        vv = ShowFunction.FloorHeating;
+                    }
+                    else if (SPK.AcSpkList().Contains(function.spk))
+                    {
+                        vv = ShowFunction.AC;
+                    }
+                    else if (SPK.CurtainSpkList().Contains(function.spk))
+                    {
+                        vv = ShowFunction.Curtain;
+                    }
+                    else if (SPK.LightSpkList().Contains(function.spk))
+                    {
+                        vv = ShowFunction.Light;
+                    }
+                    else if (SPK.AirFreshSpkList().Contains(function.spk))
+                    {
+                        vv = ShowFunction.FreshAir;
                     }
                     UpdataFunctionOnCount(vv, function.spk);
                     UpdataCloseAllButton(function);
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 27ce249..1786290 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -63,40 +63,32 @@
 
             btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/{function.IconName}.png";
 
-            if (function.Spk_Prefix == FunctionCategory.Curtain//绐楀笜娌℃湁寮�鍏虫寜閽�
-                || function.Spk_Prefix == FunctionCategory.Music//闊充箰娌℃湁寮�鍏虫寜閽�
-                || function.Spk_Prefix == FunctionCategory.Sensor//浼犳劅鍣ㄦ病鏈夊紑鍏虫寜閽�
-                )
+            if (SPK.CurtainSpkList().Contains(function.spk))
+            {//绐楀笜娌℃湁寮�鍏虫寜閽�
+                CurtainFragment();
+            }
+            else if (SPK.MusicSpkList().Contains(function.spk))
+            {//闊充箰娌℃湁寮�鍏虫寜閽�
+                MusicFragment();
+            }
+            else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk)) //浼犳劅鍣ㄦ病鏈夊紑鍏虫寜閽�)
             {
-                switch (function.Spk_Prefix)
+                var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+                if (powerLowTipAttr != null)
                 {
-                    case FunctionCategory.Curtain:
-                        CurtainFragment();
-                        break;
-                    case FunctionCategory.Sensor:
-                        var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
-                        if (powerLowTipAttr != null)
+                    if (powerLowTipAttr.state.ToLower() == "low")
+                    {
+                        Button btnTipPowerLow = new Button()
                         {
-                            if (powerLowTipAttr.state.ToLower() == "low")
-                            {
-                                Button btnTipPowerLow = new Button()
-                                {
-                                    X = Application.GetRealWidth(307),
-                                    Y = Application.GetRealHeight(25),
-                                    Width = Application.GetRealWidth(24),
-                                    Height = Application.GetRealWidth(24),
-                                    UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
-                                    SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
-                                };
-                                this.AddChidren(btnTipPowerLow);
-                            }
-                        }
-
-                        break;
-                    case FunctionCategory.Music:
-                        MusicFragment();
-                        break;
-
+                            X = Application.GetRealWidth(307),
+                            Y = Application.GetRealHeight(25),
+                            Width = Application.GetRealWidth(24),
+                            Height = Application.GetRealWidth(24),
+                            UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
+                            SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
+                        };
+                        this.AddChidren(btnTipPowerLow);
+                    }
                 }
             }
             else
@@ -148,24 +140,19 @@
                         LoadEvent_SwitchFunction(btnSwitch);
                     }
 
-                    switch (function.Spk_Prefix)
+                    if (SPK.AcSpkList().Contains(function.spk) ||
+                        SPK.FhSpkList().Contains(function.spk))
                     {
-                        case FunctionCategory.AC:
-                            LoadLastStatesButton();
-                            break;
-                        case FunctionCategory.IR:
-                            LoadLastStatesButton();
-                            break;
-                        case FunctionCategory.FloorHeat:
-                            LoadLastStatesButton();
-                            break;
-                        case FunctionCategory.Light:
-                            btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
-                            LoadLightControl();
-                            break;
-                        case FunctionCategory.Electric:
-                            btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
-                            break;
+                        LoadLastStatesButton();
+                    }
+                    else if (SPK.LightSpkList().Contains(function.spk))
+                    {
+                        btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
+                        LoadLightControl();
+                    }
+                    else if (SPK.ElectricalSpkList().Contains(function.spk))
+                    {
+                        btnSwitch.IsSelected = function.trait_on_off.curValue.ToString() == "on";
                     }
                     #endregion
                 }
@@ -227,7 +214,7 @@
             };
             //bodyDiv.AddChidren(btnCollectionIcon);
             //2020-12-16 濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
-            if ( function.Spk_Prefix != FunctionCategory.Sensor)//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare &&
+            if ( !SPK.ArmSensorSpkList().Contains(function.spk) || !SPK.EnvironDeviceSpkList().Contains( function.spk))//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare &&
             {
                 bodyDiv.AddChidren(btnCollectionIcon);
             }
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
index 66a2ff8..cdaef53 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -119,7 +119,7 @@
                 btnSwitch.IsSelected = !btnSwitch.IsSelected;
                 new System.Threading.Thread(() =>
                 {
-                    if (function.Spk_Prefix == FunctionCategory.Light)
+                    if (SPK.LightSpkList().Contains( function.spk))
                     {
                         function.trait_on_off.curValue = btnSwitch.IsSelected ? "on" : "off";
                         Dictionary<string, string> d = new Dictionary<string, string>();
diff --git a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs
index 9b05c24..b2138df 100644
--- a/HDL_ON/UI/UI2/2-Classification/RoomPage.cs
+++ b/HDL_ON/UI/UI2/2-Classification/RoomPage.cs
@@ -77,7 +77,7 @@
 
             foreach (var function in room.GetRoomFunctions(false))
             {
-                if (function.Spk_Prefix == FunctionCategory.Sensor || function.spk == SPK.ElectricEnergy)
+                if (MainPage.RoomNotSupportFunctionList.Contains( function.spk))
                 {
                     continue;
                 }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 4a53bf1..bd54b23 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -56,8 +56,10 @@
                 case SPK.AcStandard:
                 //鍦扮儹
                 case SPK.FloorHeatStandard:
+                case SPK.HvacFloorHeat:
                 //鏂伴
                 case SPK.AirFreshStandard:
+                case SPK.HvacAirFresh:
                     {
 
                         LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -189,6 +191,7 @@
                     break;
                 //姣背娉紶鎰熷櫒
                 case SPK.SenesorMegahealth:
+                case SPK.SenesorMegahealth2:
                     {
                         LogicView.FunTypeView view = new LogicView.FunTypeView();
                         view.btnText.TextID = StringId.mubiaozhuangtai;//鐩爣鐘舵��
@@ -478,6 +481,7 @@
                         }
                         break;
                     case SPK.SenesorMegahealth:
+                    case SPK.SenesorMegahealth2:
                         {
                             keyVlaue = "action_state";
                         }
@@ -515,7 +519,7 @@
                         break;
                     case StringId.wuren:
                         {
-                            if (device.spk == SPK.SenesorMegahealth)
+                            if (device.spk == SPK.SenesorMegahealth || device.spk == SPK.SenesorMegahealth2)
                             {
                                 value = "uninhabited";
                             }
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index b979155..404eeb0 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -148,10 +148,11 @@
                                 //绌鸿皟
                                 case SPK.AcStandard:
                                 //鍦扮儹
-                                case SPK.FloorHeatStandard:
+                                case SPK.HvacFloorHeat:case SPK.FloorHeatStandard:
                                 //鏂伴
                                 case SPK.AirFreshStandard:
-                                    {//寮�鍏崇伅
+                                case SPK.HvacAirFresh:
+                                {//寮�鍏崇伅
                                         foreach (var dic in dicList)
                                         {
 
@@ -302,6 +303,7 @@
                                     }
                                     break;
                                 case SPK.SenesorMegahealth:
+                                case SPK.SenesorMegahealth2:
                                     {
                                         foreach (var dic in dicList)
                                         {
@@ -1073,7 +1075,7 @@
 
                                     }
                                     break;
-                                case SPK.FloorHeatStandard:
+                                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                                     {
                                         string on_off = GetKeyValue("on_off", dicList);
                                         string set_temp = GetKeyValue("set_temp", dicList);
@@ -1146,6 +1148,7 @@
                                     }
                                     break;
                                 case SPK.AirFreshStandard:
+                                case SPK.HvacAirFresh:
                                     {
                                         string on_off = GetKeyValue("on_off", dicList);
                                         string fan = GetKeyValue("fan", dicList);
@@ -1542,7 +1545,7 @@
 
                     }
                     break;
-                case SPK.FloorHeatStandard:
+                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                     {
 
                         foreach (var dic in dicList)
@@ -1626,6 +1629,7 @@
                     }
                     break;
                 case SPK.AirFreshStandard:
+                case SPK.HvacAirFresh:
                     {
 
                         foreach (var dic in dicList)
@@ -1650,8 +1654,8 @@
                                         }
                                     }
                                     break;
-                             
-                                   case "fan":
+
+                                case "fan":
                                     {
                                         if (button2 == null)
                                         {
@@ -1815,6 +1819,7 @@
                     }
                     break;
                 case SPK.SenesorMegahealth:
+                case SPK.SenesorMegahealth2:
                     {
                         foreach (var dic in dicList)
                         {
@@ -1983,7 +1988,7 @@
                                     }
                                     break;
                                 case SPK.AcStandard:
-                                case SPK.FloorHeatStandard:
+                                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                                     {
                                         foreach (var dic in dicList)
                                         {
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index 906212f..bffa5c8 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -339,12 +339,13 @@
                         strPath = "LogicIcon/airconditionerlogic.png";
                     }
                     break;
-                case SPK.FloorHeatStandard:
+                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                     {
                         strPath = "LogicIcon/heatlogic.png";
                     }
                     break;
                 case SPK.AirFreshStandard:
+                case SPK.HvacAirFresh:
                     {
                         strPath = "LogicIcon/heatlogic.png";
                     }
@@ -359,6 +360,7 @@
                 case SPK.SensorDoorWindow:
                 case SPK.SensorUtrasonic:
                 case SPK.SenesorMegahealth:
+                case SPK.SenesorMegahealth2:
                 case SPK.SensorEnvironment:
                 case SPK.SensorEnvironment2:
                 case SPK.SensorEnvironment3:
@@ -410,12 +412,12 @@
             {
                 deviceStrTypeList.Add(Language.StringByID(StringId.AC));
             }
-            var floorHeating = deviceList.Find((device) => device.spk == SPK.FloorHeatStandard);
+            var floorHeating = deviceList.Find((device) => device.spk == SPK.FloorHeatStandard || device.spk == SPK.HvacFloorHeat);
             if (floorHeating != null)
             {
                 deviceStrTypeList.Add(Language.StringByID(StringId.FloorHeating));
             }
-            var airFresh = deviceList.Find((device) => device.spk == SPK.AirFreshStandard);
+            var airFresh = deviceList.Find((device) => device.spk == SPK.AirFreshStandard || device.spk == SPK.HvacAirFresh);
             if (airFresh != null)
             {
                 deviceStrTypeList.Add(Language.StringByID(StringId.AirFresh));
@@ -431,6 +433,7 @@
             || device.spk == SPK.SensorDoorWindow
             || device.spk == SPK.SensorUtrasonic
             || device.spk == SPK.SenesorMegahealth
+            || device.spk == SPK.SenesorMegahealth2
             || device.spk == SPK.SensorEnvironment
              || device.spk == SPK.SensorEnvironment2
               || device.spk == SPK.SensorEnvironment3
@@ -476,11 +479,11 @@
             }
             else if (deviceType == Language.StringByID(StringId.FloorHeating))
             {
-                functionTypeList.Add(SPK.FloorHeatStandard);
+                functionTypeList.Add(SPK.FloorHeatStandard);functionTypeList.Add(SPK.HvacFloorHeat);
             }
             else if (deviceType == Language.StringByID(StringId.AirFresh))
             {
-                functionTypeList.Add(SPK.AirFreshStandard);
+                functionTypeList.Add(SPK.AirFreshStandard); functionTypeList.Add(SPK.HvacAirFresh);
             }
             else if (deviceType == Language.StringByID(StringId.Sensor))
             {
@@ -494,6 +497,7 @@
                 functionTypeList.Add(SPK.SensorDoorWindow);
                 functionTypeList.Add(SPK.SensorUtrasonic);
                 functionTypeList.Add(SPK.SenesorMegahealth);
+                functionTypeList.Add(SPK.SenesorMegahealth2);
                 functionTypeList.Add(SPK.SensorEnvironment);
                 functionTypeList.Add(SPK.SensorEnvironment2);
                 functionTypeList.Add(SPK.SensorEnvironment3);
@@ -528,9 +532,9 @@
                         deviceTypeList.Add(SPK.CurtainSwitch);
                         deviceTypeList.Add(SPK.CurtainRoller);
                         deviceTypeList.Add(SPK.CurtainTrietex);
-                        deviceTypeList.Add(SPK.AcStandard);
+                        deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAirFresh);
                         deviceTypeList.Add(SPK.AirFreshStandard);
-                        deviceTypeList.Add(SPK.FloorHeatStandard);
+                        deviceTypeList.Add(SPK.FloorHeatStandard); deviceTypeList.Add(SPK.HvacFloorHeat);
                         deviceTypeList.Add(SPK.SensorSmoke);
                         deviceTypeList.Add(SPK.SensorWater);
                         deviceTypeList.Add(SPK.SensorGas);
@@ -541,6 +545,7 @@
                         deviceTypeList.Add(SPK.SensorDoorWindow);
                         deviceTypeList.Add(SPK.SensorUtrasonic);
                         deviceTypeList.Add(SPK.SenesorMegahealth);
+                        deviceTypeList.Add(SPK.SenesorMegahealth2);
                         deviceTypeList.Add(SPK.SensorEnvironment);
                         deviceTypeList.Add(SPK.SensorEnvironment2);
                         deviceTypeList.Add(SPK.SensorEnvironment3);
@@ -563,8 +568,8 @@
                         deviceTypeList.Add(SPK.CurtainSwitch);
                         deviceTypeList.Add(SPK.CurtainRoller);
                         deviceTypeList.Add(SPK.CurtainTrietex);
-                        deviceTypeList.Add(SPK.AcStandard);
-                        deviceTypeList.Add(SPK.FloorHeatStandard);
+                        deviceTypeList.Add(SPK.AcStandard); deviceTypeList.Add(SPK.HvacAirFresh);
+                        deviceTypeList.Add(SPK.FloorHeatStandard); deviceTypeList.Add(SPK.HvacFloorHeat);
                         deviceTypeList.Add(SPK.AirFreshStandard);
                     }
                     break;
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 2352632..51ee8b6 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -233,7 +233,7 @@
                         #endregion
                     }
                     break;
-                case SPK.FloorHeatStandard:
+                case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                     {
                         #region 鐣岄潰
                         ///寮�鍏�
@@ -313,6 +313,7 @@
                     }
                     break;
                 case SPK.AirFreshStandard:
+                case SPK.HvacAirFresh:
                     {
                         #region 鐣岄潰
                         ///寮�鍏�
@@ -437,7 +438,7 @@
                                 break;
                             }
                         case SPK.AcStandard:
-                        case SPK.FloorHeatStandard:
+                        case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
                             {
                                 //鍋氫簡涓�涓壒娈婂鐞嗭紱
                                 bool _bool = false;
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
index f56f371..da46c06 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs
@@ -18,6 +18,7 @@
         /// </summary>
         public Action<Function> AddDeviceEvent = null;
 
+        public IntegratedBrandDevice device;
         #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
@@ -26,6 +27,7 @@
         /// </summary>
         public void ShowForm(IntegratedBrandDevice device)
         {
+            this.device = device;
             if (Language.CurrentLanguage == "Chinese")
             {
                 //璁剧疆澶撮儴淇℃伅
@@ -113,7 +115,7 @@
                         try
                         {
                             var pm = new HttpServerRequest();
-                            var pack = pm.IndependentRegister3TyDevcie(SPK.SenesorMegahealth, snCode,Language.StringByID(StringId.SenesorMillimeterWave));
+                            var pack = pm.IndependentRegister3TyDevcie(device.spk, snCode,Language.StringByID(StringId.SenesorMillimeterWave));
                             if (pack.Code == StateCode.SUCCESS)
                             {
                                 //var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<IntegratedBrandDevice>>(pack.Data.ToString());
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
index b49af1a..68ac66b 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs
@@ -119,7 +119,7 @@
                     Width = Application.GetRealWidth(32),
                     Height = Application.GetRealWidth(32),
                     Radius = (uint)Application.GetRealWidth(4),
-                    UnSelectedImagePath = $"FunctionIcon/Icon/{device.spk.Replace(".","")}.png",
+                    UnSelectedImagePath =  $"FunctionIcon/Icon/{device.IconName}.png",
                 };
                 row.AddChidren(btnIcon);
                 Button btnRight = new Button()
@@ -154,6 +154,7 @@
                             }; 
                             break;
                         case SPK.SenesorMegahealth:
+                        case SPK.SenesorMegahealth2:
                             var form1 = new AddSenesorMegahealthDirection1Page();
                             form1.AddForm(device);
                             form1.AddDeviceEvent = (functionObj) => {
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
index 470121b..f6824e8 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -138,7 +138,7 @@
                     Width = Application.GetRealWidth(32),
                     Height = Application.GetRealWidth(32),
                     Radius = (uint)Application.GetRealWidth(4),
-                    UnSelectedImagePath = $"FunctionIcon/Icon/{device.spk.Replace(".", "")}.png",
+                    UnSelectedImagePath = $"FunctionIcon/Icon/{device.IconName}.png",
                 };
                 row.AddChidren(btnIcon);
                 Button btnRight = new Button()
@@ -172,6 +172,7 @@
                             });
                             break;
                         case SPK.SenesorMegahealth:
+                        case SPK.SenesorMegahealth2:
                             var smPage = new SenesorMegahealthManagerPage();
                             smPage.AddForm(device);
                             smPage.DelDeviceEvent = () =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
index 74924ef..fc66920 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
@@ -43,7 +43,7 @@
             //璇诲彇鐘舵��
             new System.Threading.Thread(() =>
             {
-                if (device.spk == SPK.SenesorMegahealth)
+                if (device.spk == SPK.SenesorMegahealth|| device.spk == SPK.SenesorMegahealth2)
                 {
                     DriverLayer.Control.Ins.SendReadCommand(device, true);
                 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs
index ac4b459..109084a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs
@@ -43,7 +43,7 @@
             //璇诲彇鐘舵��
             new System.Threading.Thread(() =>
             {
-                if (device.spk == SPK.SenesorMegahealth)
+                if (device.spk == SPK.SenesorMegahealth|| device.spk == SPK.SenesorMegahealth2)
                 {
                     DriverLayer.Control.Ins.SendReadCommand(device, true);
                 }

--
Gitblit v1.8.0