From d6fb0646531172f23648441c224cdcccd721b894 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期一, 14 十二月 2020 09:59:01 +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