From 490696fba6c1f1318e088c439ee81d536126581b Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期一, 18 五月 2020 10:35:26 +0800
Subject: [PATCH] 优化门锁远程问题

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
old mode 100755
new mode 100644
index 2083d28..6e3c9d1
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
@@ -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);

--
Gitblit v1.8.0