From a7a6907b3df65db9c4b2bb1237f709db5c985b52 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 03 十二月 2019 10:25:20 +0800
Subject: [PATCH] 2019.12.3
---
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
index 469fd6f..e86ee4e 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -3317,10 +3317,7 @@
DefaultCommunicationTimeout = new TimeSpan(0, 0, 100),//璁剧疆瓒呮椂鏃堕棿
};
//杩滅▼閫氳杩炴帴锛岃繛鎺ヤ簯绔湇鍔″櫒
- if (RemoteMqttClient != null)
- {
- await RemoteMqttClient.ConnectAsync(connectCloudMqttClientOptions);
- }
+ await RemoteMqttClient.ConnectAsync(connectCloudMqttClientOptions);
}
catch (Exception ex)
@@ -3922,6 +3919,54 @@
UpdateDeviceInfo(tempDevice, "DeviceStatusReport");
}
#endregion
+ #region 闂ㄩ攣鎿嶄綔浜嬩欢閫氱煡
+ else if (topic == gatewayID + "/" + "DoorLock/DoorLockOperatingEventNotificationCommand")
+ {
+ var deviceID = jobject.Value<int>("Device_ID");
+ switch ((DeviceType)(deviceID))
+ {
+ case DeviceType.DoorLock:
+ var doorLock = new DoorLock() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gwa.getGatewayBaseInfo.gwID };
+ var OperatingEventNotificationDatad = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Device.DoorLock.DoorLockOperatingEventNotificationCommand>(jobject["Data"].ToString());
+ if (OperatingEventNotificationDatad != null)
+ {
+ doorLock.doorLockOperatingEventNotificationCommand = OperatingEventNotificationDatad;
+ }
+ if (gwa.ReportAction != null)
+ {
+ DebugPrintLog("DoorLockProgrammingEventNotificationCommand宸茬粡閫氱煡");
+ gwa.ReportAction("DoorLockProgrammingEventNotificationCommand", doorLock);
+ }
+ UpdateDeviceStatus(doorLock);
+ UpdateDeviceInfo(doorLock, "DoorLockProgrammingEventNotificationCommand");
+ break;
+ }
+ }
+ #endregion
+ #region 闂ㄩ攣缂栫▼浜嬩欢閫氱煡
+ else if (topic == gatewayID + "/" + "DoorLock/DoorLockProgrammingEventNotificationCommand")
+ {
+ var deviceID = jobject.Value<int>("Device_ID");
+ switch ((DeviceType)(deviceID))
+ {
+ case DeviceType.DoorLock:
+ var doorLock = new DoorLock() { DeviceID = jobject.Value<int>("Device_ID"), DeviceAddr = jobject.Value<string>("DeviceAddr"), DeviceEpoint = jobject.Value<int>("Epoint"), DataID = jobject.Value<int>("Data_ID"), CurrentGateWayId = gwa.getGatewayBaseInfo.gwID };
+ var ProgrammingEventNotificationData = Newtonsoft.Json.JsonConvert.DeserializeObject<ZigBee.Device.DoorLock.DoorLockProgrammingEventNotificationCommand>(jobject["Data"].ToString());
+ if (ProgrammingEventNotificationData != null)
+ {
+ doorLock.doorLockProgrammingEventNotificationCommand = ProgrammingEventNotificationData;
+ }
+ if (gwa.ReportAction != null)
+ {
+ DebugPrintLog("DoorLockProgrammingEventNotificationCommand宸茬粡閫氱煡");
+ gwa.ReportAction("DoorLockProgrammingEventNotificationCommand", doorLock);
+ }
+ UpdateDeviceStatus(doorLock);
+ UpdateDeviceInfo(doorLock, "DoorLockProgrammingEventNotificationCommand");
+ break;
+ }
+ }
+ #endregion
#region IAS瀹夐槻淇℃伅涓婃姤
else if (topic == gatewayID + "/" + "IASInfoReport")
{
--
Gitblit v1.8.0