From f71e74b5f0d2716fbf05da016cdaa18d64e09f80 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期四, 31 十二月 2020 17:01:18 +0800
Subject: [PATCH] 又换完成最新门锁。空气质量传感器完成数据和基本配置功能。开发图表和自动化的同事可下载此代码

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/Airer.cs |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Airer.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Airer.cs
index 461330b..7ce6ad0 100644
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Airer.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Airer.cs
@@ -182,6 +182,28 @@
     {
       await SetAirerTimeAsync(time, controlEpoint);
     }
-    #endregion 
+    #endregion
+
+    #region 寮�鍏�
+    ///<summary >
+    ///寮�鍏虫帶鍒�(浠呯敤浜巆luster=6鐨勮澶囷級
+    /// <para>璁惧鏀寔cluster=6鐨勮澶囨墠鑳借皟鐢ㄨ鎺ュ彛</para>
+    /// <para>command鐨勫��</para>
+    ///<para>0 : 鍏抽棴</para>
+    ///<para>1: 鎵撳紑</para>
+    ///<para>2锛氬彇鍙�</para>
+    /// </summary>
+    public void SwitchControl(int command, int ctrlEpoint)
+    {
+      try
+      {
+        var jobject = new JObject { { "DeviceAddr", DeviceAddr }, { "Epoint", ctrlEpoint }, { "Cluster_ID", 6 }, { "Command", command }, { "SendMode", 2 } };
+        Gateway?.Send(("DeviceControl"), jobject.ToString());
+        System.Console.WriteLine("SwitchControl_鍙戦�佹暟鎹�" + "_" + jobject.ToString() + "_" + System.DateTime.Now.ToString());
+
+      }
+      catch { }
+    }
+    #endregion
   }
 }

--
Gitblit v1.8.0