wei
2021-09-24 4820da229822687e472b9d5abb2a09093a877a3a
更新spk
29个文件已修改
1483 ■■■■ 已修改文件
.vs/HDL_APP_Project/xs/UserPrefs.xml 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Shared.Droid.dll 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/ApiUtlis.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control_Udp.cs 677 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Packet.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Mqtt/MqttClient.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 268 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/FunctionList.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs 192 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/RoomPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/SenesorMegahealth/AddSenesorMegahealthDirection1Page.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/AddDevciePage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorGasPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.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" />
DLL/Shared.Droid.dll
Binary files differ
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" />-->
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;
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);
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档,2 - 2档,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档,2 - 2档,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 发送命令立即更新UI
@@ -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;
                }
            }
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;
                                    }
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;
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协议功能的特性
        /// 如:是AC功能:特性: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>
        /// 安防传感器spk列表
        /// </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
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)
                        {
HDL_ON/Entity/Integratedbrand/IntegratedBrand.cs
@@ -101,6 +101,17 @@
        /// 设备绑定方式 WIFI、QRSCAN、ZIG_BEE、ETHERNET
        /// </summary>
        public string bindType;
        /// <summary>
        /// icon文件名称
        /// </summary>
        public string IconName
        {
            get
            {
                return spk.Replace(".", "");
            }
        }
    }
}
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;
            }
        }
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;
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)
                        {
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;
                                            }
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
                                    }
                                }
                            }
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);
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);
            }
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>();
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;
                }
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";
                            }
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)
                                        {
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;
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;
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());
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) => {
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 = () =>
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);
                }
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);
                }