From 4a83749337096aae6dd5ec4f44f16653fbc7268a Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期三, 10 三月 2021 16:19:52 +0800
Subject: [PATCH] 2021-03-10 1.合并
---
HDL_ON/DAL/Mqtt/MqttClient.cs | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 9cded85..62d34ba 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -191,9 +191,17 @@
Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send",
QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
};
+ //App璁㈤槄绾㈠瀹� / 缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡
+ var pirStatus = new MqttTopicFilter()
+ {
+ Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found",
+ QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
+ };
Utlis.WriteLine("寮�濮嬭闃咃紒");
- var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] { topicFilterPush2, topicAlinkStatus });
+ var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] {
+ pirStatus,
+ topicFilterPush2, topicAlinkStatus });
if (result.Items[0].ResultCode == MQTTnet.Client.Subscribing.MqttClientSubscribeResultCode.GrantedQoS0)
{
isSubscribeSuccess = true;
@@ -278,12 +286,21 @@
//鏂版尋涓嬬嚎涓婚鏂规 鏀跺埌鎸や笅绾夸富棰�
ReceiveNotifySqueezeAsync(mMes);
}
+ //App璁㈤槄绾㈠瀹�/缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡
+ else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found")
+ {
+ var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
+ var revString = Encoding.UTF8.GetString(bytes);
+ HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.addcontronsid = revString;
+ //ReceiveCheckGateway(ss);
+ //return;
+ }
//A缃戝叧璁惧鐘舵��-鍖呭惈娑傞甫璁惧
else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/property/send")
{
var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
var revString = Encoding.UTF8.GetString(bytes);
- Control.Ins.UpdataFunctionStatus(revString, null);
+ Control.Ins.UpdataFunctionStatus(revString, null,true);
}
//涓�绔彛鏁版嵁瑙f瀽
else
--
Gitblit v1.8.0