| | |
| | | ZbGateway.IsRemote = true;
|
| | | for (int i = 0; i < ZbGateway.GateWayList.Count; i++) |
| | | {
|
| | | ZbGateway.GateWayList[i].DisConnectLocalMqttClient("1"); |
| | | ZbGateway.GateWayList[i].DisConnectLocalMqttClient("1"); |
| | | }
|
| | | }
|
| | | |
| | |
| | | try |
| | | { |
| | | //定时检测远程连接情况 |
| | | await ZbGateway.StartRemoteMqtt(); |
| | | await ZbGateway.StartRemoteMqtt();
|
| | | if (!ZbGateway.IsRemote) |
| | | { |
| | | System.Threading.Thread.Sleep(500); |
| | | continue; |
| | | } |
| | | var gateWayList =ZbGateway.GateWayList.FindAll(obj => obj.getGatewayBaseInfo.HomeId == Shared.Common.Config.Instance.HomeId); |
| | | var gateWayList = ZbGateway.GateWayList.FindAll(obj => obj.getGatewayBaseInfo.HomeId == Shared.Common.Config.Instance.HomeId); |
| | | |
| | | if (gateWayList.Count == 1) |
| | | { |