From fdc47d950498e088260a3b04028703adc0f878e0 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期一, 30 三月 2020 10:54:27 +0800 Subject: [PATCH] 2020-03-30-1 --- ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs index c2fa1b9..2ae0329 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs @@ -54,11 +54,16 @@ return logicIdList; } mainGateWay.GwResDataAction += action; - - var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2004 } }; - var jObjectdata1 = new JObject { { "LogicType", LogicType } }; - jObject.Add("Data", jObjectdata1); - mainGateWay?.Send("Logic/GetLogicList", jObject.ToString()); + try + { + var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2004 } }; + var jObjectdata1 = new JObject { { "LogicType", LogicType } }; + jObject.Add("Data", jObjectdata1); + mainGateWay?.Send("Logic/GetLogicList", jObject.ToString()); + } + catch(Exception e) { + var d = e.Message; + } //await System.Threading.Tasks.Task.Run(async () => //{ var dateTime = DateTime.Now; @@ -260,7 +265,7 @@ try { - + var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2000 } }; var selectMonthList = new JArray { }; foreach (var intvalue in logic.TimeAttribute.SelectMonDate) @@ -462,6 +467,16 @@ }; actions.Add(timeInfo); break; + case 8: + var lockInfo = new JObject + { + ["LinkType"] = int.Parse(dictionary["LinkType"].ToString()), + ["DeviceAddr"] = dictionary["DeviceAddr"].ToString(), + ["Epoint"] = int.Parse(dictionary["Epoint"].ToString()), + ["PassData"] =dictionary["PassData"].ToString(), + }; + actions.Add(lockInfo); + break; } } var accounts = new JArray(); @@ -480,6 +495,7 @@ ["Type"] = int.Parse(dictionary["Type"]), ["Account"] = dictionary["Account"], ["UserId"] = dictionary["UserId"], + ["AccountName"] = dictionary["AccountName"], }; accounts.Add(accounts1); @@ -503,6 +519,7 @@ } } + var data = new JObject{ { "LogicId",logic.LogicId}, { "IsEnable", logic.IsEnable} , -- Gitblit v1.8.0