From 9904031f5291daaf56985146bb671f25e18ebbdf Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 02 四月 2020 19:51:31 +0800
Subject: [PATCH] 最新代码
---
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
index 990a261..8d8cbea 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -3337,23 +3337,18 @@
if (RemoteMqttClient.ApplicationMessageReceivedHandler == null)
{
RemoteMqttClient.UseApplicationMessageReceivedHandler((e) =>
- {
- if (!RemoteMqttClient.IsConnected || !IsRemote)
- {
- if (e.ApplicationMessage.Topic != "/ZigbeeGateWayToClient/" + Config.Instance.ConnEmqClientId + "/Push/NotifySqueeze")
- {
- return;
- }
- }
- //濡傛灉褰撳墠浣跨敤鐨勬槸鍐呯綉妯″紡
- if (IsRemote == false)
+ {
+ //杩欓噷鏄壒娈婄殑涓婚
+ if (e.ApplicationMessage.Topic == "/ZigbeeGateWayToClient/" + Config.Instance.ConnEmqClientId + "/Push/NotifySqueeze"//韪汉涓嬬嚎
+ || e.ApplicationMessage.Topic == "/ZigbeeGateWayToClient/" + Config.Instance.Guid + "/Push/Deleted"//鍒嗕韩鍒犻櫎
+ || e.ApplicationMessage.Topic == "/ZigbeeGateWayToClient/" + Config.Instance.Guid + "/Push/DeletedShareData"
+ || e.ApplicationMessage.Topic == "/ZigbeeGateWayToClient/" + Config.Instance.Home.Id + "_" + Config.Instance.Guid + "/PrimaryUserDelYou")//瀛愯处鍙疯鍒犻櫎
{
- if (e.ApplicationMessage.Topic == "/ZigbeeGateWayToClient/" + Config.Instance.ConnEmqClientId + "/Push/NotifySqueeze"//韪汉涓嬬嚎
- || e.ApplicationMessage.Topic == "/ZigbeeGateWayToClient/" + Config.Instance.Guid + "/Push/Deleted"//鍒嗕韩鍒犻櫎
- || e.ApplicationMessage.Topic == "/ZigbeeGateWayToClient/" + Config.Instance.Guid + "/Push/DeletedShareData")
- {
- mqttRemoteClient_MqttMsgPublishReceived(e);
- }
+ mqttRemoteClient_MqttMsgPublishReceived(e);
+ return;
+ }
+ if (!RemoteMqttClient.IsConnected || !IsRemote)
+ {
return;
}
mqttRemoteClient_MqttMsgPublishReceived(e);
@@ -3382,6 +3377,8 @@
await RemoteMqttClient.SubscribeAsync("/ZigbeeGateWayToClient/" + myGuid + "/Push/Deleted");
//璁㈤槄涓�涓垎浜暟鎹凡缁忓彉鏇寸殑涓婚
await RemoteMqttClient.SubscribeAsync("/ZigbeeGateWayToClient/" + myGuid + "/Push/DeletedShareData");
+ //璁㈤槄涓�涓瓙璐﹀彿琚垹闄ょ殑涓婚
+ await RemoteMqttClient.SubscribeAsync("/ZigbeeGateWayToClient/" + Config.Instance.Home.Id + "_" + myGuid + "/PrimaryUserDelYou");
}
//璁㈤槄涓�涓尋涓嬬嚎鐨勪富棰�
await RemoteMqttClient.SubscribeAsync("/ZigbeeGateWayToClient/" + Config.Instance.ConnEmqClientId + "/Push/NotifySqueeze");
--
Gitblit v1.8.0