1.
wei
2021-03-16 223b318d0070d06e7b64192dc93aa8103865d657
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
                    };
@@ -226,6 +226,10 @@
            }
            if (!UserInfo.Current.IsLogin)
            {
                return;
            }
            if(DB_ResidenceData.Instance.CurrentRegion == null || DB_ResidenceData.Instance.CurrentRegion.RegionID == null)
            {
                return;
            }
@@ -280,6 +284,12 @@
                                    }
                                }
                                //一些特殊的主题处理(为了执行速度,尽可能的别加耗时的操作 true:执行了特殊处理 false:没有执行特殊处理)
                                if (Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceiveEx(topic, e.ApplicationMessage.Payload, mqttEncryptKey, tuyaEncryptKey) == true)
                                {
                                    return;
                                }
                                if (topic == $"/BusGateWayToClient/{UserInfo.Current.ID}" + PushNotifySqueeze)
                                {
                                    var mMes = Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
@@ -287,10 +297,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,13 +310,13 @@
                                {
                                    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);
                                }
                                //一端口数据解析
                                else
                                {
                                    //SetGatewayOnlineResetCheck();
                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey);
                                    //var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey);
                                    //bus数据解析
                                    var packet = new Packet();