From 94284b994bf6dd08b64d20c55ed7744d51e71383 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 26 三月 2021 11:34:16 +0800 Subject: [PATCH] 2021-03-26 1.新增Android DLL。 --- HDL_ON/DAL/Mqtt/MqttClient.cs | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index a7dea34..67ce672 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -194,7 +194,7 @@ //App璁㈤槄绾㈠瀹� / 缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡 var pirStatus = new MqttTopicFilter() { - Topic = $"/user/${DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; @@ -254,7 +254,7 @@ try { var topic = e.ApplicationMessage.Topic; - MainPage.Log($"鏀跺埌mqtt涓婚:{topic}"); + //MainPage.Log($"鏀跺埌mqtt涓婚:{topic}"); //涓�绔彛涓婚澶勭悊 if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull()) { @@ -287,10 +287,11 @@ ReceiveNotifySqueezeAsync(mMes); } //App璁㈤槄绾㈠瀹�/缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡 - else if (topic == $"/user/${DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") { - var ss = Encoding.UTF8.GetString(e.ApplicationMessage.Payload); - HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.addcontronsid = ss; + 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; } @@ -299,7 +300,7 @@ { 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