xm
2020-05-18 490696fba6c1f1318e088c439ee81d536126581b
优化门锁远程问题
19个文件已修改
1 文件已重命名
1112 ■■■■■ 已修改文件
ZigbeeApp/Home.Ios/Resources/Language.ini 184 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Common/Device.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs 211 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/R.cs 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Shared/Shared.projitems 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -317,6 +317,12 @@
314=自动模式不支持操作
315=空气质量
316=空气质量传感器
317=优
318=良
319=轻度污染
320=中度污染
321=重度污染
322=严重污染
5097=取消
5098=确定
@@ -1847,95 +1853,95 @@
16115=常开自动化手动取消
16116=游客体验
;★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
18004=指定网关已经被绑定
18005=用户不存在于此住宅
18006=账号已经存在于此住宅
18009=操作权限不足
18010=被绑定的子账号不存在,请注册后再试
18011=操作的子账号不存在
18012=解除绑定的子账号不存在
18013=验证码发送失败
18015=账号已经存在
18016=验证码错误
18017=验证码已失效
18018=绑定的账号不存在
18019=指定账号已存在
18022=验证码发送失败
18024=指定账号不存在
18025=原密码和新密码相同
18026=原密码错误
18034=账号未注册
18035=请求参数错误
18036=无效的登录密匙
18039=当前编辑的住宅名称已经存在
18040=当前添加的住宅名称已经存在
18041=指定的住宅不存在
18042=当前备份不属于您当前的住宅
18043=备注名称已经存在,请更换后重试!
18044=指定的网关ID并不存在
18045=当前住宅下并没有绑定指定的网关
18046=当前住宅还存在着未解除绑定的网关
18047=共享数据不存在
18048=分享的目标账号不存在
18049=分享数据操作失败
18050=不能把自己添加为成员
18051=不能把主账号添加为成员
;★★★★下面这些是设备的入网步骤,从21000开始★★★★
;智能门锁入网操作指示
21000=唤醒门锁,输入“*”、“#”、“管理员密码”{0}按语音提示,输入“4”选择功能菜单{0}输入“1”,确认设备入网
;3路继电器入网操作指示
21001=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯熄灭则配网成功
;1路调光器小模块入网操作指示
21002=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯熄灭则配网成功
;二按键面板入网操作指示
21003=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯快闪3秒则配网成功
;三按键面板入网操作指示
21004=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯快闪3秒则配网成功
;四按键面板入网操作指示
21005=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯快闪3秒则配网成功
;Zigbee智能开合帘电机入网操作指示
21006=长按图示按键5秒以上,指示灯{0}变绿闪烁,则进入配网状态{0}绿灯熄灭则配网成功
;Zigbee智能管状电机入网操作指示
21007=长按图示按键5秒以上,指示灯{0}变绿闪烁,则进入配网状态{0}绿灯熄灭则配网成功
;红外传感器入网操作指示
21008=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;门窗传感器入网操作指示
21009=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;燃气传感器入网操作指示
21010=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;烟雾传感器入网操作指示
21011=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;水浸传感器入网操作指示
21012=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;空气开关入网操作指示
21013=按键从工作模式拨到配对模式,5秒后红灯{0}慢闪烁时拨回工作模式,{0}进入配网模式,红灯常亮则配网成功
;中继器入网操作指示
21014=长按图示按键5秒以上,指示灯变绿闪烁{0}进入配网状态,绿灯熄灭则入网成功
;空调入网操作指示
21015=长按图示按键5秒以上,指示灯{0}变绿闪烁,进入配网状态{0}绿灯每5秒闪烁一次则入网成功
;pir传感器入网操作指示
21016=长按图示按键5秒以上,指示灯变绿、{0}闪烁进入配网状态。绿灯熄灭则配网成功
;温湿度传感器入网操作指示
21017=长按图示按键5秒以上,信号图标{0}快闪, 进入配网状态。图标常亮则配网成功
;方悦2按键轻触式面板入网操作指示
21018=长按BUTTON1按键5秒,所有指示灯{0}变为绿色并闪烁,进入配网状态
;方悦4按键轻触式面板入网操作指示
21019=长按BUTTON1按键5秒,所有指示灯{0}变为绿色并闪烁,进入配网状态
;方悦8按键轻触式面板入网操作指示
21020=长按BUTTON1按键5秒,所有指示灯{0}变为绿色并闪烁,进入配网状态
;方悦环境面板入网操作指示
21021=按住面板功能(function)按键,所有按键{0}指示灯亮起,则配网成功
;窗帘面板的入网操作指示
21022=长按面板左上角按键,所有按键{0}指示灯亮起,则配网成功
;吸顶燃气传感器的入网操作指示
21023=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;★★★★下面这些是模块ID的官方名字,从30000开始★★★★
30000=紧急按钮
30001=燃气传感器
;★★★★下面这些是接口的返回信息翻译,从18000开始★★★★
18004=指定网关已经被绑定
18005=用户不存在于此住宅
18006=账号已经存在于此住宅
18009=操作权限不足
18010=被绑定的子账号不存在,请注册后再试
18011=操作的子账号不存在
18012=解除绑定的子账号不存在
18013=验证码发送失败
18015=账号已经存在
18016=验证码错误
18017=验证码已失效
18018=绑定的账号不存在
18019=指定账号已存在
18022=验证码发送失败
18024=指定账号不存在
18025=原密码和新密码相同
18026=原密码错误
18034=账号未注册
18035=请求参数错误
18036=无效的登录密匙
18039=当前编辑的住宅名称已经存在
18040=当前添加的住宅名称已经存在
18041=指定的住宅不存在
18042=当前备份不属于您当前的住宅
18043=备注名称已经存在,请更换后重试!
18044=指定的网关ID并不存在
18045=当前住宅下并没有绑定指定的网关
18046=当前住宅还存在着未解除绑定的网关
18047=共享数据不存在
18048=分享的目标账号不存在
18049=分享数据操作失败
18050=不能把自己添加为成员
18051=不能把主账号添加为成员
;★★★★下面这些是设备的入网步骤,从21000开始★★★★
;智能门锁入网操作指示
21000=唤醒门锁,输入“*”、“#”、“管理员密码”{0}按语音提示,输入“4”选择功能菜单{0}输入“1”,确认设备入网
;3路继电器入网操作指示
21001=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯熄灭则配网成功
;1路调光器小模块入网操作指示
21002=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯熄灭则配网成功
;二按键面板入网操作指示
21003=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯快闪3秒则配网成功
;三按键面板入网操作指示
21004=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯快闪3秒则配网成功
;四按键面板入网操作指示
21005=长按图示按键5秒以上,指示灯变绿、闪烁{0}进入配网状态。绿灯快闪3秒则配网成功
;Zigbee智能开合帘电机入网操作指示
21006=长按图示按键5秒以上,指示灯{0}变绿闪烁,则进入配网状态{0}绿灯熄灭则配网成功
;Zigbee智能管状电机入网操作指示
21007=长按图示按键5秒以上,指示灯{0}变绿闪烁,则进入配网状态{0}绿灯熄灭则配网成功
;红外传感器入网操作指示
21008=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;门窗传感器入网操作指示
21009=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;燃气传感器入网操作指示
21010=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;烟雾传感器入网操作指示
21011=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;水浸传感器入网操作指示
21012=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;空气开关入网操作指示
21013=按键从工作模式拨到配对模式,5秒后红灯{0}慢闪烁时拨回工作模式,{0}进入配网模式,红灯常亮则配网成功
;中继器入网操作指示
21014=长按图示按键5秒以上,指示灯变绿闪烁{0}进入配网状态,绿灯熄灭则入网成功
;空调入网操作指示
21015=长按图示按键5秒以上,指示灯{0}变绿闪烁,进入配网状态{0}绿灯每5秒闪烁一次则入网成功
;pir传感器入网操作指示
21016=长按图示按键5秒以上,指示灯变绿、{0}闪烁进入配网状态。绿灯熄灭则配网成功
;温湿度传感器入网操作指示
21017=长按图示按键5秒以上,信号图标{0}快闪, 进入配网状态。图标常亮则配网成功
;方悦2按键轻触式面板入网操作指示
21018=长按BUTTON1按键5秒,所有指示灯{0}变为绿色并闪烁,进入配网状态
;方悦4按键轻触式面板入网操作指示
21019=长按BUTTON1按键5秒,所有指示灯{0}变为绿色并闪烁,进入配网状态
;方悦8按键轻触式面板入网操作指示
21020=长按BUTTON1按键5秒,所有指示灯{0}变为绿色并闪烁,进入配网状态
;方悦环境面板入网操作指示
21021=按住面板功能(function)按键,所有按键{0}指示灯亮起,则配网成功
;窗帘面板的入网操作指示
21022=长按面板左上角按键,所有按键{0}指示灯亮起,则配网成功
;吸顶燃气传感器的入网操作指示
21023=长按图示按键5秒以上,绿色快闪{0}进入配网状态,绿灯常亮则入网成功
;★★★★下面这些是模块ID的官方名字,从30000开始★★★★
30000=紧急按钮
30001=燃气传感器
30002=烟雾传感器
30003=水侵传感器
30004=钥匙扣
ZigbeeApp/Shared/Common/Device.cs
@@ -732,7 +732,7 @@
        /// <returns></returns>
        public bool DeviceIsCanFixedPosition(CommonDevice device)
        {
            if (device.Type == DeviceType.DoorLock)
            if (device.Type == DeviceType.DoorLock || device.Type == DeviceType.PMSensor)
            {
                //门锁没有定位功能
                return false;
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DevicePmSensorRowControl.cs
File was renamed from ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DevicePmSensorRowControl.cs
@@ -48,8 +48,8 @@
        {
            //检测能否发送获取状态命令
            //if (this.CheckCanSendStatuComand() == true)
            //{
            HdlDeviceAttributeLogic.Current.SendFreshAirStatuComand(this.device);
            //{
            HdlDeviceAttributeLogic.Current.SendPmSensorComand(this.device);
            //}
        }
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -49,8 +49,6 @@
                {
                    action(Send.CurrentDoorLock.IsDoorLockNormallyMode);
                }
                //返回按键清空
                UserCenter.DoorLock.DoorLockCommonInfo.LogicAction = null;
            };
            var middle = new FrameLayout
ZigbeeApp/Shared/Phone/MainPage/ControlForm/Base/DeviceDetailCardCommonForm.cs
@@ -385,6 +385,15 @@
        }
        /// <summary>
        /// 设置PM2.5传感器状态文本(不需要指定【当前两个字】)
        /// </summary>
        /// <param name="text"></param>
        public void SetPmTwoPointFiveStatuText(string text)
        {
            this.btnStatu.Text = text;
        }
        /// <summary>
        /// 重新设置设备名字控件和状态控件的Y轴
        /// </summary>
        /// <param name="i_NameY">设备名字控件的Y轴(真实值)</param>
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DevicePmSensorDetailCardForm.cs
@@ -44,7 +44,7 @@
            this.pMSensor = (PMSensor)this.device;
            //先清空
            this.listControl = new List<ButtonBase>();
            InitFreshAirControl(frameWhiteBack);
            InitPmControl(frameWhiteBack);
            UpdateStatus();
        }
@@ -52,7 +52,7 @@
        /// 初始化PM2.5传感器控件
        /// </summary>
        /// <param name="frameWhiteBack"></param>
        private void InitFreshAirControl(FrameLayout frameWhiteBack)
        private void InitPmControl(FrameLayout frameWhiteBack)
        {
            //湿度容器
            var frameHumidityPic = new FrameLayout();
@@ -85,7 +85,7 @@
            //湿度单位
            var btnHumidityUnit = new NormalViewControl(37 + 81, 40, true);
            btnHumidityUnit.Y = Application.GetRealHeight(181 + 46);
            btnHumidityUnit.X = Application.GetRealWidth(190);
            btnHumidityUnit.X = Application.GetRealWidth(180);
            btnHumidityUnit.Text = "%";
            btnHumidityUnit.TextSize = 14;
            btnHumidityUnit.TextColor = ZigbeeColor.Current.XMWhite;
@@ -122,7 +122,7 @@
            //温度单位
            var btnTemperatureUnit = new NormalViewControl(40 + 81, 40, true);
            btnTemperatureUnit.Y = Application.GetRealHeight(181 + 46);
            btnTemperatureUnit.X = Application.GetRealWidth(188);
            btnTemperatureUnit.X = Application.GetRealWidth(180);
            btnTemperatureUnit.Text = "℃";
            btnTemperatureUnit.TextSize = 14;
            btnTemperatureUnit.TextColor = ZigbeeColor.Current.XMWhite;
@@ -147,7 +147,7 @@
            framePmPic.AddChidren(btnPmText);
            //PM2.5数据(第3个,listControl【2】)
            var btnPmStatus = new NormalViewControl(109 + 40, 92, true);
            var btnPmStatus = new NormalViewControl(162, 92, true);
            btnPmStatus.Y = Application.GetRealHeight(181);
            btnPmStatus.Text = "155";
            btnPmStatus.TextSize = 30;
@@ -157,9 +157,9 @@
            this.listControl.Add(btnPmStatus);
            //PM2.5单位
            var btnPmUnit = new NormalViewControl(124 + 15, 43, true);
            var btnPmUnit = new NormalViewControl(120 + 26, 43, true);
            btnPmUnit.Y = Application.GetRealHeight(181 + 46);
            btnPmUnit.X = Application.GetRealWidth(150);
            btnPmUnit.X = Application.GetRealWidth(153);
            btnPmUnit.Text = "μg/m³";
            btnPmUnit.TextSize = 14;
            btnPmUnit.TextColor = ZigbeeColor.Current.XMWhite;
@@ -247,7 +247,8 @@
            this.listControl[1].Text = pMSensor.currentHumidity.ToString();
            this.listControl[2].Text = pMSensor.currentPmData.ToString();
            //设置状态文字
            this.btnStatu.Text = Language.StringByID(R.MyInternationalizationString.AirQuality) + "";
            var curText = Language.StringByID(R.MyInternationalizationString.AirQuality) + QuailityType();
            this.SetStatuText(curText);
        }
        /// <summary>
@@ -259,13 +260,38 @@
            if (pMSensor.currentPmData <= 35 && pMSensor.currentPmData >= 0)
            {
                curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
            }
            this.listControl[2].Text = pMSensor.currentPmData.ToString();
            else if (pMSensor.currentPmData <= 75 && pMSensor.currentPmData > 35)
            {
                curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
            }
            else if (pMSensor.currentPmData <= 115 && pMSensor.currentPmData > 75)
            {
                curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
            }
            else if (pMSensor.currentPmData <= 150 && pMSensor.currentPmData > 115)
            {
                curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
            }
            else if (pMSensor.currentPmData <= 250 && pMSensor.currentPmData > 150)
            {
                curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
            }
            else if (pMSensor.currentPmData > 250)
            {
                curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
            }
            else
            {
                curQuality = "";
            }
            //设置状态文字
            return curQuality;
        }
        #endregion
    }
}
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
old mode 100755 new mode 100644
@@ -278,6 +278,60 @@
               {
                 { "AttriButeId", (int)AttriButeId.FanMode}
               }
            };
            var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
            jObject.Add("Data", data);
            device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
        }
        #endregion
        #region ■ PM2.5_______________________________
        /// <summary>
        /// SendPmSensorComand
        /// </summary>
        /// <param name="device">设备</param>
        public void SendPmSensorComand(CommonDevice device)
        {
            if (device == null)
            {
                return;
            }
            new System.Threading.Thread(() =>
            {
                SendPmSensorStatuComand(device);
                //读取Pm2.5传感器的温度数据
                HdlDeviceAttributeLogic.Current.SendTemperatureStatuComand(device);
                //读取Pm2.5传感器的湿度数据
                HdlDeviceAttributeLogic.Current.SendHumidityStatuComand(device);
                System.Threading.Thread.Sleep(300);
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
        /// SendFanStatuComand
        /// </summary>
        /// <param name="device">设备</param>
        private void SendPmSensorStatuComand(CommonDevice device)
        {
            if (device == null)
            {
                return;
            }
            var jObject = new Newtonsoft.Json.Linq.JObject
            {
                { "DeviceAddr",device.DeviceAddr },
                { "Epoint", device.DeviceEpoint },
                { "Cluster_ID", (int)Cluster_ID.PmTwoPointFiveMeasurement  },
                { "Command", 108 }
            };
            var attriBute = new Newtonsoft.Json.Linq.JArray
            {
               new Newtonsoft.Json.Linq.JObject
               {
                 { "AttriButeId", (int)AttriButeId.MeasuredValue}
               }
            };
            var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
            jObject.Add("Data", data);
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceOtherLogic.cs
old mode 100755 new mode 100644
@@ -183,6 +183,57 @@
                }
                return $"{wind}";
            }
            else if (device.Type == DeviceType.PMSensor)
            {
                //在网关没有回复之前,默认离线
                if (device.HadReadDeviceStatu == false)
                {
                    return Language.StringByID(R.MyInternationalizationString.uOffLine);
                }
                //空气质量
                string curQuality = "";
                //温度
                string temperature = string.Empty;
                //湿度
                string humidity = string.Empty;
                //PM2.5
                string pm = string.Empty;
                var pMSensor = device as PMSensor;
                if (pMSensor.currentPmData <= 35 && pMSensor.currentPmData >= 0)
                {
                    curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
                }
                else if (pMSensor.currentPmData <= 75 && pMSensor.currentPmData > 35)
                {
                    curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
                }
                else if (pMSensor.currentPmData <= 115 && pMSensor.currentPmData > 75)
                {
                    curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
                }
                else if (pMSensor.currentPmData <= 150 && pMSensor.currentPmData > 115)
                {
                    curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
                }
                else if (pMSensor.currentPmData <= 250 && pMSensor.currentPmData > 150)
                {
                    curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
                }
                else if (pMSensor.currentPmData > 250)
                {
                    curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
                }
                else
                {
                    curQuality = "--";
                }
                humidity = $"{pMSensor.currentHumidity}%";
                temperature = $"{pMSensor.currentTemperature}℃";
                pm = $"{pMSensor.currentPmData}μg/m³";
                return $"{curQuality},{pm},{temperature},{humidity}";
            }
            else if (device.Type == DeviceType.Thermostat)
            {
                //在网关没有回复之前,默认离线
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
old mode 100755 new mode 100644
@@ -425,24 +425,51 @@
                        //温度
                        if (attData.AttributeId == (int)AttriButeId.MeasuredValue)
                        {
                            if (attData.AttriButeData == 0)
                            decimal temperatrue = 0;
                            string receiptData = string.Empty;
                            //两个两个位置替换
                            for (int i = attData.AttriButeDataHex.Length - 1; i >= 0; i = i - 2)
                            {
                                ((TemperatureSensor)locadevice).Temperatrue = 0;
                                receiptData += attData.AttriButeDataHex[i - 1].ToString() + attData.AttriButeDataHex[i].ToString();
                            }
                            else if (attData.AttriButeData > 32767)
                            {
                                //负数(特殊处理)
                                string strValue = (attData.AttriButeData - 65536).ToString();
                                //小数点需要一位
                                strValue = strValue.Substring(0, strValue.Length - 1);
                                ((TemperatureSensor)locadevice).Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                            }
                            else
                            //有符号(会出现负数)
                            if (attData.AttriButeDataType == 40 || attData.AttriButeDataType == 41)
                            {
                                //小数点需要一位
                                string strValue = attData.AttriButeData.ToString();
                                string strValue = Convert.ToInt16(receiptData, 16).ToString();
                                strValue = strValue.Substring(0, strValue.Length - 1);
                                ((TemperatureSensor)locadevice).Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                            }
                            //无符号(不会出现负数)
                            else if (attData.AttriButeDataType == 32 || attData.AttriButeDataType == 33)
                            {
                                ushort shortData = Convert.ToUInt16(receiptData, 16);
                                if (shortData > 32767)
                                {
                                    //负数(特殊处理)
                                    string strValue = (shortData - 65536).ToString();
                                    //小数点需要一位
                                    strValue = strValue.Substring(0, strValue.Length - 1);
                                    temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                }
                                else
                                {
                                    //小数点需要一位
                                    string strValue = shortData.ToString();
                                    strValue = strValue.Substring(0, strValue.Length - 1);
                                    temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                }
                            }
                            //温度传感器
                            if (locadevice is TemperatureSensor)
                            {
                                ((TemperatureSensor)locadevice).Temperatrue = temperatrue;
                            }
                            //PM2.5传感器
                            else if (locadevice is PMSensor)
                            {
                                ((PMSensor)locadevice).currentTemperature = (int)temperatrue;
                            }
                            //已经接收到状态
                            locadevice.HadReadDeviceStatu = true;
@@ -460,22 +487,66 @@
                        //湿度
                        if (attData.AttributeId == (int)AttriButeId.MeasuredValue)
                        {
                            if (attData.AttriButeData == 0)
                            decimal humidity = 0;
                            string receiptData = string.Empty;
                            //两个两个位置替换
                            for (int i = attData.AttriButeDataHex.Length - 1; i >= 0; i = i - 2)
                            {
                                ((TemperatureSensor)locadevice).Humidity = 0;
                                receiptData += attData.AttriButeDataHex[i - 1].ToString() + attData.AttriButeDataHex[i].ToString();
                            }
                            else
                            //有符号(会出现负数)
                            if (attData.AttriButeDataType == 40 || attData.AttriButeDataType == 41)
                            {
                                //小数点需要一位(湿度没有负数)
                                string strValue = attData.AttriButeData.ToString();
                                //小数点需要一位
                                string strValue = Convert.ToInt16(receiptData, 16).ToString();
                                strValue = strValue.Substring(0, strValue.Length - 1);
                                ((TemperatureSensor)locadevice).Humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                                humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                            }
                            //无符号(不会出现负数)
                            else if (attData.AttriButeDataType == 32 || attData.AttriButeDataType == 33)
                            {
                                //小数点需要一位 湿度不会出现负数
                                string strValue = Convert.ToUInt16(receiptData, 16).ToString();
                                strValue = strValue.Substring(0, strValue.Length - 1);
                                humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
                            }
                            //温度传感器
                            if (locadevice is TemperatureSensor)
                            {
                                ((TemperatureSensor)locadevice).Humidity = humidity;
                            }
                            //PM2.5传感器
                            else if (locadevice is PMSensor)
                            {
                                ((PMSensor)locadevice).currentHumidity = (int)humidity;
                            }
                        }
                        //已经接收到状态
                        locadevice.HadReadDeviceStatu = true;
                    }
                }
                }
                #endregion
                #region ■ PM2.5数据
                //PM2.5数据
                else if (report.DeviceStatusReport.CluterID == 1066)
                {
                    foreach (var attData in report.DeviceStatusReport.AttriBute)
                    {
                        //PM2.5
                        if (attData.AttributeId == (int)AttriButeId.MeasuredValue)
                        {
                            if (attData.AttriButeDataType == 57)
                            {
                                ((PMSensor)locadevice).currentPmData = attData.AttriButeData;
                            }
                        }
                        //已经接收到状态
                        locadevice.HadReadDeviceStatu = true;
                    }
                }
                #endregion
            }
@@ -571,7 +642,7 @@
        /// 设备在线状态更新反馈
        /// </summary>
        /// <param name="receiveData"></param>
        private void DeviceOnlineChangePush (JObject receiveData)
        private void DeviceOnlineChangePush(JObject receiveData)
        {
            if (this.dicDeviceEvent.Count == 0)
            {
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs
old mode 100755 new mode 100644
@@ -151,6 +151,7 @@
            btnHorizontalScrolViewLayout = new HorizontalScrolViewLayout
            {
                X = Application.GetRealWidth(58),
                BackgroundColor = 0xff00ff00,
            };
            btnMidTopLayout.AddChidren(btnHorizontalScrolViewLayout);
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
old mode 100755 new mode 100644
@@ -739,21 +739,27 @@
            if (typeModeList == null)
            {
                //再次动态获取按键支持的大类
                CommonPage.Loading.Start();
                Application.RunOnMainThread(() =>
                {
                    CommonPage.Loading.Start();
                });
                typeModeList = await GetTypeMode();
                if (typeModeList == null)
                {
                    Application.RunOnMainThread(() =>
                    {
                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        CommonPage.Loading.Hide();
                    });
                    CommonPage.Loading.Hide();
                    dialog.Close();
                    return;
                }
                else
                {
                    CommonPage.Loading.Hide();
                    Application.RunOnMainThread(() =>
                    {
                        CommonPage.Loading.Hide();
                    });
                }
            }
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs
old mode 100755 new mode 100644
@@ -349,24 +349,48 @@
            btnRight.Y += this.GetPictrueRealSize(8);
            frameColor.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColorView.ButtonClickEvent += (sender, e) =>
            {
                var form = new PanelColorSelectForm();
                form.AddForm(R1, G1, B1);
                form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
                {
                    R1 = Rcolor;
                    G1 = Gcolor;
                    B1 = Bcolor;
                    this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
                    this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
                    this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
                    btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
                    //变更滑动条的颜色
                    seekBar1.ProgressBarColor = btnColor.BackgroundColor;
                };
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColor.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColorLine.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnRight.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
        }
        /// <summary>
        /// PanelColorBefore
        /// </summary>
        private void PanelColor(NormalViewControl btnColor, SeekBarControl seekBar1, int R1, int G1, int B1)
        {
            var form = new PanelColorSelectForm();
            form.AddForm(R1, G1, B1);
            form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
            {
                R1 = Rcolor;
                G1 = Gcolor;
                B1 = Bcolor;
                this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
                this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
                this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
                btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
                //变更滑动条的颜色
                seekBar1.ProgressBarColor = btnColor.BackgroundColor;
            };
        }
        #endregion
@@ -484,33 +508,33 @@
            btnRight.Y = Application.GetRealHeight(5);
            btnRight.X = frameColor.Width - this.GetPictrueRealSize(58);
            frameColor.AddChidren(btnRight, ChidrenBindMode.BindEventOnly);
            btnRight.Y += this.GetPictrueRealSize(8);
            btnRight.Y += this.GetPictrueRealSize(8);
            frameColor.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColorView.ButtonClickEvent += (sender, e) =>
            {
                var form = new PanelColorSelectForm();
                form.AddForm(R1, G1, B1);
                form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
                {
                    R1 = Rcolor;
                    G1 = Gcolor;
                    B1 = Bcolor;
                    this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
                    this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
                    this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
                    btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
                    //变更滑动条的颜色
                    seekBar1.ProgressBarColor = btnColor.BackgroundColor;
                };
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColor.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnColorLine.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
            btnRight.ButtonClickEvent += (sender, e) =>
            {
                PanelColor(btnColor, seekBar1, R1, G1, B1);
            };
        }
        }
        #endregion
        #region ■ 获取初始数据_______________________
        /// <summary>
        /// 获取设备初始数据
        /// </summary>
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
old mode 100755 new mode 100644
@@ -53,6 +53,10 @@
        /// 被绑目标是PM2.5
        /// </summary>
        private CommonDevice bindPMDev;
        // <summary>
        /// 按键中被绑定的目标列表
        /// </summary>
        public List<BindObj.BindListResponseObj> bindList = new List<BindObj.BindListResponseObj>();
        #endregion
@@ -204,7 +208,7 @@
            rowNewWind.ButtonClickEvent += (sender, e) =>
            {
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindFreshAirDev, 1);
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindFreshAirDev, bindList, 1);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                addDevicePage.Show();
@@ -241,9 +245,9 @@
            var panelBindListRes = await curControlDev.GetDeviceBindAsync();
            if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null)
            {
                foreach (var bDev in panelBindListRes.getAllBindResponseData.BindList)
                bindList = panelBindListRes.getAllBindResponseData.BindList;
                foreach (var bDev in bindList)
                {
                    curControlDev.bindList.Add(bDev);
                    var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device.Type == DeviceType.FreshAir)
@@ -279,8 +283,21 @@
                    }
                    if (device.Type == DeviceType.PMSensor)
                    {
                        bindPmName = device.DeviceEpointName;
                        bindPMDev = device;
                        if (bDev.BindCluster == 1026)
                        {
                            bindTemperatureName = device.DeviceEpointName;
                            bindTemperatureDev = device;
                        }
                        if (bDev.BindCluster == 1029)
                        {
                            bindHumidityName = device.DeviceEpointName;
                            bindHumidityDev = device;
                        }
                        if (bDev.BindCluster == 1066)
                        {
                            bindPmName = device.DeviceEpointName;
                            bindPMDev = device;
                        }
                    }
                }
                result = true;
@@ -310,7 +327,7 @@
            var btnPMStatu = rowPM.AddMostRightView(msg, 700);
            rowPM.ButtonClickEvent += (sender, e) =>
            {
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindPMDev, 4);
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindPMDev, bindList, 4);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                addDevicePage.Show();
@@ -355,7 +372,7 @@
            var btnTemperatureStatu = rowTemPerature.AddMostRightView(msg, 700);
            rowTemPerature.ButtonClickEvent += (sender, e) =>
            {
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindTemperatureDev, 2);
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindTemperatureDev, bindList, 2);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                addDevicePage.Show();
@@ -400,7 +417,7 @@
            var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700);
            rowHumidity.ButtonClickEvent += (sender, e) =>
            {
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindHumidityDev, 3);
                var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindHumidityDev, bindList, 3);
                Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage);
                Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
                addDevicePage.Show();
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs
@@ -18,11 +18,16 @@
        /// <param name="device"></param>
        /// <param name="deviceBindType">1:新风;2:温度传感器;3:湿度传感器;4:PM2.5传感器</param>
        /// <param name="bindDev">绑定目标 </param>
        public PanelFangyueFreshAirTargetsForm(CommonDevice device, CommonDevice bindDev, int deviceBindType)
        public PanelFangyueFreshAirTargetsForm(CommonDevice device, CommonDevice bindDev, List<BindListResponseObj> bindList, int deviceBindType)
        {
            this.curControlDev = device as FreshAir;
            this.curBindDevice = bindDev;
            this.curDeviceBindType = deviceBindType;
            curControlDev.bindList = bindList;
            if (bindList.Count == 0)
            {
                canReadBindList = true;
            }
        }
        #endregion
@@ -106,7 +111,7 @@
        /// <summary>
        /// 是否能点击保存按钮
        /// </summary>
        private bool canSave = true;
        private bool canReadBindList = false;
        #endregion
        #region UI设计 
@@ -475,12 +480,20 @@
                        break;
                    case 2:
                        devicePic.UnSelectedImagePath = "Device/SensorTemperature.png";
                        if (device.Type == DeviceType.PMSensor)
                        {
                            btnBindName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
                        }
                        break;
                    case 3:
                        devicePic.UnSelectedImagePath = "Device/SensorHumidity.png";
                        if (device.Type == DeviceType.PMSensor)
                        {
                            btnBindName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
                        }
                        break;
                    case 4:
                        devicePic.UnSelectedImagePath = "Device/FreshAirEpoint.png";
                        devicePic.UnSelectedImagePath = "Device/AirQualitySensorEpoint.png";
                        break;
                }
                #endregion
@@ -710,35 +723,39 @@
                    currentPanelSupportBindDeviceList = GetAllRoomSupportDeviceList();
                    //获取面板中存在的绑定目标
                    var panelBindListRes = await this.curControlDev.GetDeviceBindAsync();
                    if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null)
                    if (canReadBindList)
                    {
                        curControlDev.bindList.Clear();
                        foreach (var bDev in panelBindListRes.getAllBindResponseData.BindList)
                        var panelBindListRes = await this.curControlDev.GetDeviceBindAsync();
                        if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null)
                        {
                            curControlDev.bindList.Add(bDev);
                            curControlDev.bindList.Clear();
                            foreach (var bDev in panelBindListRes.getAllBindResponseData.BindList)
                            {
                                curControlDev.bindList.Add(bDev);
                            }
                        }
                        else
                        {
                            Application.RunOnMainThread(() =>
                            {
                                CommonPage.Loading.Hide();
                                midVerticalScrolViewLayout.EndHeaderRefreshing();
                                new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                            });
                        }
                    }
                    else
                    {
                        Application.RunOnMainThread(() =>
                        {
                            CommonPage.Loading.Hide();
                            midVerticalScrolViewLayout.EndHeaderRefreshing();
                            new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
                        });
                    }
                    targetList.Clear();
                    //选中目标列表 targetList
                    if (currentPanelSupportBindDeviceList.Count != 0 && curControlDev.bindList.Count != 0)
                    {
                        foreach (var bindDev in currentPanelSupportBindDeviceList)
                        foreach (var bindDev in curControlDev.bindList)
                        {
                            var mainKey = bindDev.DeviceAddr + bindDev.DeviceEpoint;
                            var dev = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey));
                            var mainKey = bindDev.BindMacAddr + bindDev.BindEpoint;
                            var dev = currentPanelSupportBindDeviceList.Find(obj => (obj != null) && (obj.DeviceAddr + obj.DeviceEpoint == mainKey));
                            if (dev != null)
                            {
                                var device = LocalDevice.Current.GetDevice(bindDev.DeviceAddr, bindDev.DeviceEpoint);
                                var device = LocalDevice.Current.GetDevice(dev.DeviceAddr, dev.DeviceEpoint);
                                if (device != null)
                                {
                                    switch (curDeviceBindType)
@@ -767,6 +784,14 @@
                                                    oldTargetList.Add(device);
                                                }
                                            }
                                            if (device.Type == DeviceType.PMSensor)
                                            {
                                                if (bindDev.BindCluster == 1026)
                                                {
                                                    targetList.Add(device);
                                                    oldTargetList.Add(device);
                                                }
                                            }
                                            break;
                                        case 3:
                                            if (device.Type == DeviceType.TemperatureSensor)
@@ -783,13 +808,24 @@
                                                targetList.Add(device);
                                                oldTargetList.Add(device);
                                            }
                                            if (device.Type == DeviceType.PMSensor)
                                            {
                                                if (bindDev.BindCluster == 1029)
                                                {
                                                    targetList.Add(device);
                                                    oldTargetList.Add(device);
                                                }
                                            }
                                            break;
                                        case 4:
                                            //PM2.5
                                            if (device.Type == DeviceType.PMSensor)
                                            {
                                                targetList.Add(device);
                                                oldTargetList.Add(device);
                                                if (bindDev.BindCluster == 1066)
                                                {
                                                    targetList.Add(device);
                                                    oldTargetList.Add(device);
                                                }
                                            }
                                            break;
                                    }
@@ -954,6 +990,12 @@
                                            btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                            this.RemoveFromParent();
                                        });
                                        var mainKey = delDevice.DeviceAddr + delDevice.Epoint;
                                        var dev1 = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey));
                                        if (dev1 != null)
                                        {
                                            curControlDev.bindList.Remove(dev1);
                                        }
                                    }
                                    else
                                    {
@@ -966,6 +1008,17 @@
                                        });
                                        return;
                                    }
                                }
                                else
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.OperrateFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                        btnFinifh.Enable = true;
                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                        CommonPage.Loading.Hide();
                                    });
                                    return;
                                }
                            }
                        }
@@ -1030,6 +1083,17 @@
                                var delDevice = DelBindDevice(bd);
                                var delResult = new DelDeviceBindResponseAllData();
                                delResult = await curControlDev.DelDeviceBindAsync(delDevice);
                                if (delResult == null || delResult.removeBindResultResponseData == null)
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                        btnFinifh.Enable = true;
                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                        CommonPage.Loading.Hide();
                                    });
                                    return;
                                }
                                if (delResult != null && delResult.removeBindResultResponseData != null)
                                {
                                    if (delResult.removeBindResultResponseData.Result != 0)
@@ -1044,6 +1108,12 @@
                                        return;
                                    }
                                }
                                var mainKey = delDevice.DeviceAddr + delDevice.Epoint;
                                var dev2 = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey));
                                if (dev2 != null)
                                {
                                    curControlDev.bindList.Remove(dev2);
                                }
                            }
                        }
                        else
@@ -1055,6 +1125,17 @@
                                var delDevice = DelBindDevice(curBindDevice);
                                var delResult = new DelDeviceBindResponseAllData();
                                delResult = await curControlDev.DelDeviceBindAsync(delDevice);
                                if (delResult == null || delResult.removeBindResultResponseData == null)
                                {
                                    Application.RunOnMainThread(() =>
                                    {
                                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
                                        btnFinifh.Enable = true;
                                        btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                        CommonPage.Loading.Hide();
                                    });
                                    return;
                                }
                                if (delResult != null && delResult.removeBindResultResponseData != null)
                                {
                                    if (delResult.removeBindResultResponseData.Result != 0)
@@ -1068,6 +1149,12 @@
                                        });
                                        return;
                                    }
                                }
                                var mainKey = delDevice.DeviceAddr + delDevice.Epoint;
                                var dev3 = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey));
                                if (dev3 != null)
                                {
                                    curControlDev.bindList.Remove(dev3);
                                }
                            }
                        }
@@ -1100,7 +1187,23 @@
                            addBindInfo.BindMacAddr = de.DeviceAddr;
                            addBindInfo.BindEpoint = de.DeviceEpoint;
                            addBindeDev.BindList.Add(addBindInfo);
                            bindName = de.DeviceEpointName;
                            addBindeDev.BindName = de.DeviceEpointName;
                            switch (curDeviceBindType)
                            {
                                case 2:
                                    if (de.Type == DeviceType.PMSensor)
                                    {
                                        addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
                                    }
                                    break;
                                case 3:
                                    if (de.Type == DeviceType.PMSensor)
                                    {
                                        addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
                                    }
                                    break;
                            }
                        }
                        var dev = new AddedDeviceBindResponseAllData();
@@ -1120,33 +1223,31 @@
                        {
                            if (dev.addedDeviceBindResponseData.Result == 0)
                            {
                                curControlDev.bindList = dev.addedDeviceBindResponseData.BindList;
                                targetList.Clear();
                                switch (curDeviceBindType)
                                {
                                    case 1:
                                        if (actionFreshAirTarget != null)
                                        {
                                            actionFreshAirTarget(bindName);
                                            actionFreshAirTarget(addBindeDev.BindName);
                                        }
                                        break;
                                    case 2:
                                        if (actionTemperatureTarget != null)
                                        {
                                            actionTemperatureTarget(bindName);
                                            actionTemperatureTarget(addBindeDev.BindName);
                                        }
                                        break;
                                    case 3:
                                        if (actionHumidityTarget != null)
                                        {
                                            actionHumidityTarget(bindName);
                                            actionHumidityTarget(addBindeDev.BindName);
                                        }
                                        break;
                                    case 4:
                                        if (actionPMTarget != null)
                                        {
                                            actionPMTarget(bindName);
                                            actionPMTarget(addBindeDev.BindName);
                                        }
                                        break;
                                }
@@ -1158,6 +1259,13 @@
                                    btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
                                    this.RemoveFromParent();
                                });
                                var mainKey = addBindeDev.DeviceAddr + addBindeDev.Epoint;
                                var dev4 = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey));
                                if (dev4 != null)
                                {
                                    curControlDev.bindList.Add(dev4);
                                }
                            }
                            else if (dev.addedDeviceBindResponseData.Result == 1)
                            {
@@ -1281,6 +1389,7 @@
                    break;
                case 4:
                    //PM2.5
                    removeDevice.BindCluster = 1066;
                    break;
            }
            removeDevice.BindMacAddr = bd.DeviceAddr;
@@ -1402,19 +1511,30 @@
            foreach (var de in room.ListDevice)
            {
                var device = LocalDevice.Current.GetDevice(de);
                //电池设备不支持绑定
                if (device.ZigbeeType != 1)
                {
                    continue;
                }
                if (device != null)
                {
                    //电池设备不支持绑定
                    if (device.ZigbeeType != 1)
                    {
                        continue;
                    }
                    if (device.Type == DeviceType.TemperatureSensor)
                    {
                        var dev = device as TemperatureSensor;
                        if (dev.SensorDiv == 1)
                        {
                            roomIncludeMatchTempDevice.Add(device);
                        }
                    }
                    else if (device.Type == DeviceType.PMSensor)
                    {
                        var dev = device as PMSensor;
                        foreach (var clu in dev.InClusterList)
                        {
                            if (clu.InCluster == 1026)
                            {
                                roomIncludeMatchTempDevice.Add(device);
                            }
                        }
                    }
                }
@@ -1432,13 +1552,13 @@
            foreach (var de in room.ListDevice)
            {
                var device = LocalDevice.Current.GetDevice(de);
                //电池设备不支持绑定
                if (device.ZigbeeType != 1)
                {
                    continue;
                }
                if (device != null)
                {
                    //电池设备不支持绑定
                    if (device.ZigbeeType != 1)
                    {
                        continue;
                    }
                    if (device.Type == DeviceType.TemperatureSensor)
                    {
                        var dev = device as TemperatureSensor;
@@ -1447,6 +1567,17 @@
                            roomIncludeMatchHumpDevice.Add(device);
                        }
                    }
                    else if (device.Type == DeviceType.PMSensor)
                    {
                        var dev = device as PMSensor;
                        foreach (var clu in dev.InClusterList)
                        {
                            if (clu.InCluster == 1029)
                            {
                                roomIncludeMatchHumpDevice.Add(device);
                            }
                        }
                    }
                }
            }
            return roomIncludeMatchHumpDevice;
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -615,10 +615,6 @@
                        {
                            if (canOpenNormallyMode)
                            {
                                //Application.RunOnMainThread(() =>
                                //{
                                //    NomallyOpenModeInvalidDialog(true);
                                //});
                                Application.RunOnMainThread(() =>
                                {
                                    Action<bool> action = (obj) =>
@@ -864,10 +860,14 @@
                if (doorLock.IsDoorLockNormallyMode)
                {
                    if (canOpenNormallyMode)
                    {
                    {
                        Application.RunOnMainThread(() =>
                        {
                            NomallyOpenModeInvalidDialog();
                            Action<bool> action = (obj) =>
                            {
                                UpdateNomallyOpenStatus();
                            };
                            DoorLockCommonInfo.NomallyOpenModeInvalidDialog(doorLock, DoorLockCommonInfo.DoorLockMessType.AppOperate, haveLogicNormallyOpenMode, action);
                        });
                    }
                    else
@@ -897,7 +897,11 @@
                    {
                        Application.RunOnMainThread(() =>
                        {
                            NomallyOpenModeInvalidDialog();
                            Action<bool> action = (obj) =>
                            {
                                UpdateNomallyOpenStatus();
                            };
                            DoorLockCommonInfo.NomallyOpenModeInvalidDialog(doorLock, DoorLockCommonInfo.DoorLockMessType.AppOperate, haveLogicNormallyOpenMode, action);
                        });
                    }
                }
@@ -1047,7 +1051,6 @@
        /// </summary>
        private async void NomallyOpenDialog()
        {
            #region 后续版本
            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
            {
                this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate));
@@ -1082,19 +1085,20 @@
                addLogicPage.Show();
                addLogicPage.action += (w) =>
                {
                    doorLock.IsDoorLockNormallyMode = w;
                    ///留给徐梅用的
                    UpdateNomallyOpenStatus();
                    doorLock.IsDoorLockNormallyMode = w;
                    UpdateNomallyOpenStatus();
                    //返回按键清空当前逻辑定义的LogicAction
                    UserCenter.DoorLock.DoorLockCommonInfo.LogicAction = null;
                };
            };
            HdlCheckLogic.Current.CheckSecondarySecurity(action);
            #endregion
        }
        /// <summary>
        /// 常开模式失效处理
        /// </summary>
        public void NomallyOpenModeInvalidDialog(bool IsFromReport = false)
        private void NomallyOpenModeInvalidDialog(bool IsFromReport = false)
        {
            if (!canShowDialog)
            {
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -472,6 +472,8 @@
            /// 温度测量功能的设备如:温度传感器。。。
            /// <para>1029:Relative Humidity Measurement,设备支持“湿度测量功能”</para>
            /// 湿度测量功能的设备如:湿度传感器。。。
            /// <para>1066:Pm2.5  Measurement,设备支持“pm2.5测量功能”</para>
            /// Pm2.5测量功能的设备如:Pm2.5传感器。。。
            /// </summary>
            public int InCluster;
        }
ZigbeeApp/Shared/Phone/ZigBee/Device/Enum.cs
old mode 100755 new mode 100644
@@ -50,6 +50,10 @@
        /// </summary>
        RelativeHumidityMeasurement = 1029,
        /// <summary>
        ///PM2.5测量功能
        /// </summary>
        PmTwoPointFiveMeasurement = 1066,
        /// <summary>
        /// 恒温器功能
        /// </summary>
        Thermostat = 513,
@@ -164,7 +168,7 @@
        ///灯具种类
        /// </summary>
        ColorCapabilities = 16394,
        #region 窗帘
        /// <summary>
        ///窗帘设备类型
@@ -322,12 +326,12 @@
        AddLogic = 2000,
        ReviseAttribute = 2001,
        GetLogicInfo = 2002,
        GetLogicList= 2004,
        GetLogicList = 2004,
        LogicChangeCondition = 2005,
        LogicSetConditionData = 2006,
        LogicChangeAction = 2007,
        LogicDelAction = 2008,
        DelLogic= 2009,
        DelLogic = 2009,
        /// <summary>
        /// 推迟定时
        /// </summary>
@@ -345,5 +349,5 @@
        SceneGetNewId = 800,
        SceneAddMember = 810,
    }
}
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
old mode 100755 new mode 100644
@@ -2758,8 +2758,8 @@
           .WithTcpServer(domain, int.Parse(port))
           .WithCredentials(connEmqUserName, connEmqPwd)
           .WithKeepAlivePeriod(TimeSpan.FromSeconds(20))
           .WithCleanSession()
           //.WithCommunicationTimeout(TimeSpan.FromSeconds(10))
           .WithCleanSession()
           //.WithCommunicationTimeout(TimeSpan.FromSeconds(10))
           .Build();
                                await DisConnectRemoteMqttClient("StartRemoteMqtt");
                                await RemoteMqttClient.ConnectAsync(options, CancellationToken.None);
@@ -3184,9 +3184,23 @@
                {
                    jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
                }
                #region 设备状态上报【奇怪,为什么放在原来的位置会不执行这块代码》???】
                if (topic == gatewayID + "/" + "DeviceStatusReport" + "/" + addr + "/" + epoint + "/" + cluID + "/" + attrId)
                {
                    var deviceID = jobject.Value<int>("Device_ID");
                    var deviceAddr = jobject.Value<string>("DeviceAddr");
                    var tempEpoint = jobject.Value<int>("Epoint");
                    var dataId = jobject.Value<int>("Data_ID");
                    var tempDevice = new CommonDevice { DeviceID = deviceID, DeviceAddr = deviceAddr, DeviceEpoint = tempEpoint };
                    tempDevice.DeviceStatusReport = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.DeviceStatusReportData>(jobject["Data"].ToString());
                    UpdateDeviceInfo(tempDevice, "DeviceStatusReport");
                }
                #endregion
                #region 远程,主网关上报通知
                if (IsRemote)
                else if (IsRemote)
                {
                    if (topic == gatewayID + "/" + "BeMainGw_Report")
                    {
@@ -3208,27 +3222,12 @@
                        }
                    }
                }
                #endregion
                #region 设备在线状态更新反馈
                //2020.05.11 删除
                #endregion
                #region 设备状态上报
                else if (topic == gatewayID + "/" + "DeviceStatusReport" + "/" + addr + "/" + epoint + "/" + cluID + "/" + attrId)
                {
                    var deviceID = jobject.Value<int>("Device_ID");
                    var deviceAddr = jobject.Value<string>("DeviceAddr");
                    var tempEpoint = jobject.Value<int>("Epoint");
                    var dataId = jobject.Value<int>("Data_ID");
                    var tempDevice = new CommonDevice { DeviceID = deviceID, DeviceAddr = deviceAddr, DeviceEpoint = tempEpoint };
                    tempDevice.DeviceStatusReport = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.DeviceStatusReportData>(jobject["Data"].ToString());
                    UpdateDeviceInfo(tempDevice, "DeviceStatusReport");
                }
                #endregion
                #region 门锁操作事件通知
                else if (topic == gatewayID + "/" + "DoorLock/DoorLockOperatingEventNotificationCommand")
@@ -3511,13 +3510,13 @@
        public static void DebugPrintLog(string msg, bool flage = true)
        {
#if DEBUG
            if (flage == true)
            {
                if (msg.Contains("DeviceStatusReport") == false)
                {
                    System.Console.WriteLine(msg + "  " + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond);
                }
            }
            //if (flage == true)
            //{
            //if (msg.Contains("DeviceStatusReport") == false)
            //{
            System.Console.WriteLine(msg + "  " + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond);
            // }
            // }
#endif
        }
ZigbeeApp/Shared/R.cs
@@ -578,6 +578,31 @@
        /// 空气质量传感器
        /// </summary>
        public const int AirQualitySensor = 316;
        /// <summary>
        /// 优
        /// </summary>
        public const int ExcellentAirQuality = 317;
        /// <summary>
        /// 良
        /// </summary>
        public const int GoodAirQuality = 318;
        /// <summary>
        /// 轻度污染
        /// </summary>
        public const int LightPollution = 319;
        /// <summary>
        /// 中度污染
        /// </summary>
        public const int Moderatelyolluted = 320;
        /// <summary>
        /// 重度污染
        /// </summary>
        public const int HeavyPollution = 321;
        /// <summary>
        /// 严重污染
        /// </summary>
        public const int SeriousPollution = 322;
        public readonly static int cancel = 5097;
        public readonly static int confrim = 5098;
@@ -1171,90 +1196,90 @@
        /// 功能设置
        /// </summary>
        public const int FunctionSetting = 11012;
        /// <summary>
        /// 信息编辑
        /// </summary>
        public const int EditInfo = 11013;
        /// <summary>
        /// 功能名称
        /// </summary>
        public const int FunctionName = 11014;
        /// <summary>
        /// 所属区域
        /// </summary>
        public const int BelongZone = 11015;
        /// <summary>
        /// 所属设备
        /// </summary>
        public const int BelongDevice = 11016;
        /// <summary>
        /// 未知
        /// </summary>
        public const int UNKnown = 11017;
        /// <summary>
        /// 分享
        /// </summary>
        public const int Share = 11018;
        /// <summary>
        /// 分享的
        /// </summary>
        public const int Shared = 11019;
        /// <summary>
        /// 选择图标
        /// </summary>
        public const int SelectIcon = 11020;
        /// <summary>
        /// 保存
        /// </summary>
        public const int Save = 11021;
        /// <summary>
        /// 提醒
        /// </summary>
        public const int TIP = 11022;
        /// <summary>
        /// 取消
        /// </summary>
        public const int Cancel = 11023;
        /// <summary>
        /// 没有场景{0}请点击右上角添加
        /// </summary>
        public const int NoScene = 11024;
        /// <summary>
        /// 设置
        /// </summary>
        public const int Setting = 11025;
        /// <summary>
        /// 延时
        /// </summary>
        public const int Delay = 11026;
        /// <summary>
        /// 确定删除吗?
        /// </summary>
        public const int ConfirmDelete = 11027;
        /// <summary>
        /// 添加场景
        /// </summary>
        public const int AddScence = 11028;
        /// <summary>
        /// 场景名称
        /// </summary>
        public const int SceneName = 11029;
        /// <summary>
        /// 请输入场景名称
        /// </summary>
        public const int PleaseInputSceneName = 11030;
        /// <summary>
        /// 添加执行目标
        /// </summary>
        public const int AddScentTargetAction = 11031;
        /// <summary>
        /// 选择区域
        /// </summary>
        public const int SelectZone = 11032;
        /// <summary>
        /// 选择场景图片
        /// </summary>
        public const int SelectScenePic = 11033;
        /// <summary>
        /// 信息编辑
        /// </summary>
        public const int EditInfo = 11013;
        /// <summary>
        /// 功能名称
        /// </summary>
        public const int FunctionName = 11014;
        /// <summary>
        /// 所属区域
        /// </summary>
        public const int BelongZone = 11015;
        /// <summary>
        /// 所属设备
        /// </summary>
        public const int BelongDevice = 11016;
        /// <summary>
        /// 未知
        /// </summary>
        public const int UNKnown = 11017;
        /// <summary>
        /// 分享
        /// </summary>
        public const int Share = 11018;
        /// <summary>
        /// 分享的
        /// </summary>
        public const int Shared = 11019;
        /// <summary>
        /// 选择图标
        /// </summary>
        public const int SelectIcon = 11020;
        /// <summary>
        /// 保存
        /// </summary>
        public const int Save = 11021;
        /// <summary>
        /// 提醒
        /// </summary>
        public const int TIP = 11022;
        /// <summary>
        /// 取消
        /// </summary>
        public const int Cancel = 11023;
        /// <summary>
        /// 没有场景{0}请点击右上角添加
        /// </summary>
        public const int NoScene = 11024;
        /// <summary>
        /// 设置
        /// </summary>
        public const int Setting = 11025;
        /// <summary>
        /// 延时
        /// </summary>
        public const int Delay = 11026;
        /// <summary>
        /// 确定删除吗?
        /// </summary>
        public const int ConfirmDelete = 11027;
        /// <summary>
        /// 添加场景
        /// </summary>
        public const int AddScence = 11028;
        /// <summary>
        /// 场景名称
        /// </summary>
        public const int SceneName = 11029;
        /// <summary>
        /// 请输入场景名称
        /// </summary>
        public const int PleaseInputSceneName = 11030;
        /// <summary>
        /// 添加执行目标
        /// </summary>
        public const int AddScentTargetAction = 11031;
        /// <summary>
        /// 选择区域
        /// </summary>
        public const int SelectZone = 11032;
        /// <summary>
        /// 选择场景图片
        /// </summary>
        public const int SelectScenePic = 11033;
        /// <summary>
        /// 确定要移除该功能?
        /// </summary>
ZigbeeApp/Shared/Shared.projitems
@@ -476,8 +476,8 @@
    <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\ZbGatewayData.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlSafeguardLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlAlarmsLogic.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\Base\DevicePmSensorRowControl.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DevicePmSensorDetailCardForm.cs" />
    <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DevicePmSensorRowControl.cs" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="$(MSBuildThisFileDirectory)Phone\CommonForm\" />