| | |
| | | /// <summary> |
| | | /// 检测/连接远程 |
| | | /// </summary> |
| | | public static void CheckLinkRemote (int status) |
| | | public static void CheckLinkRemote (int status, bool IsReconnectRemote = true) |
| | | { |
| | | //if (isConnectiong) { |
| | | // return; |
| | |
| | | obj.Split ('_') [1].ToString () == DeviceType.OnePortMqttFR.ToString ()); |
| | | }); |
| | | bool canRemote = false; |
| | | if (CommonPage.IsRemote) { |
| | | //await SmartHome.MqttCommon.StartCloudMqtt (); |
| | | SmartHome.MqttCommon.MqttRemoteSend (new byte [] { }, 3); |
| | | } |
| | | |
| | | if (gateWayList == null || gateWayList.Count == 0) { |
| | | Utlis.ShowAppLinkStatus (AppLinkStatus.WiFiOffline); |
| | | await DisConnectRemoteAsync (); |
| | | } |
| | | |
| | | |
| | | if (IsReconnectRemote) { |
| | | if (CommonPage.IsRemote) { |
| | | CommonPage.IsRemote = false; |
| | | Utlis.ShowAppLinkStatus (AppLinkStatus.WiFiOffline); |
| | | await SmartHome.MqttCommon.DisConnectRemoteMqttClient (); |
| | | } |
| | | } |
| | | |
| | | if (CommonPage.IsRemote) { |
| | | //await SmartHome.MqttCommon.StartCloudMqtt (); |
| | | SmartHome.MqttCommon.MqttRemoteSend (new byte [] { }, 3); |
| | | } |
| | | |
| | | //本地是否存在与当前住宅绑定网关的数据 |
| | | bool HomeGatewaysExistsLocally = false; |
| | | foreach (var gatewayFileName in gateWayList) { |