CrabtreeOn,印度客户定制APP,迁移2.0平台版本
JLChen
2021-07-16 f52855aa93377088292cbc8cf1763255badc8269
Crabtree/SmartHome/UI/SimpleControl/MqttCommon.cs
@@ -766,6 +766,10 @@
        /// </summary>
        static void SendPushSignOut ()
        {
#if DEBUG
            return;
#endif
            byte [] message = CommonPage.MyEncodingUTF8.GetBytes (PushSignStr);
            MqttRemoteSend (message, 4);
        }
@@ -786,6 +790,7 @@
                case 0:
                    topicName = $"/ClientToBusGateWay/{CommonConfig.Current.HomeGatewayInfo.gatewayId}/Common/ON";
                    if (!string.IsNullOrEmpty (mqttEncryptKey)) {
                        //Utlis.WriteLine ("mqttEncryptKey:" + mqttEncryptKey);
                        message = Shared.Securitys.EncryptionService.AesEncryptPayload (message, mqttEncryptKey);
                    }
                    await RemoteMqttClient.PublishAsync (new MqttApplicationMessage { Topic = topicName, Payload = message, Retain = false, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce });