| | |
| | | } |
| | | |
| | | static bool isSubscribeSuccess; |
| | | /// <summary> |
| | | /// 订阅主题 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | static async Task SubscribeTopics() |
| | | { |
| | | if (remoteIsConnected && !isSubscribeSuccess) |
| | |
| | | } |
| | | else if (topic == $"/BusGateWayToClient/{MqttInfoConfig.Current.HomeGatewayInfo.gatewayId}/Common/CheckGateway") |
| | | { |
| | | |
| | | var ss = Encoding.UTF8.GetString(e.ApplicationMessage.Payload); |
| | | ReceiveCheckGateway(ss); |
| | | } |
| | |
| | | /// </summary> |
| | | static void ReceiveNotifySqueezeAsync(string mMes) |
| | | { |
| | | #if DEBUG |
| | | return; |
| | | #endif |
| | | if (mMes == PushSignStr) return;//是自己的登录推送不处理 |
| | | |
| | | //断开远程连接 |
| | |
| | | if (Control.Ins.IsRemote) |
| | | { |
| | | if (!Control.Ins.GatewayOnline) |
| | | Control.Ins.GatewayOnline = true; |
| | | { |
| | | try |
| | | { |
| | | if (DB_ResidenceData.Instance.HomeGateway != null) |
| | | { |
| | | DB_ResidenceData.Instance.HomeGateway.gatewayStatus = true; |
| | | } |
| | | Control.Ins.GatewayOnline = true; |
| | | } |
| | | catch { } |
| | | } |
| | | } |
| | | } |
| | | |