From 7dd4be37cdedaf81ad40990d8cb8dce164d83f4d Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 19 五月 2020 10:31:16 +0800
Subject: [PATCH] 34444444
---
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
index 2083d28..01ce670 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
@@ -286,6 +286,60 @@
#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);
+ device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
+ }
+
+ #endregion
+
#region 鈻� 绐楀笜_______________________________
/// <summary>
/// 鍙戦�佽幏鍙栫獥甯樼姸鎬佸懡浠�
--
Gitblit v1.8.0