| | |
| | | List<HouseIdBean> HouseIdList = HdlResidenceLogic.getInstance().getHouseIdList(); |
| | | if (HouseIdList.size() == 0) { |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_HOME_Null_C; |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | if(delay){ |
| | | HdlUniLogic.getInstance().openUniMPDelay(path, null); |
| | | }else { |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | } |
| | | } else { |
| | | int select_home = 0; |
| | | for (int i = 0; i < HouseIdList.size(); i++) { |
| | |
| | | HouseIdBean houseIdBean = HouseIdList.get(select_home); |
| | | HdlResidenceLogic.getInstance().switchHouse(houseIdBean); |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS_C + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&powerStationStatus=" + houseIdBean.getPowerStationStatus(); |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | if(delay) { |
| | | HdlUniLogic.getInstance().openUniMPDelay(path, null); |
| | | }else { |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | * 初始化mqtt客户端 |
| | | */ |
| | | public void initMqttClient() { |
| | | if (MqttRecvClient.getInstance().isConnected()) { |
| | | //检查断开连接 |
| | | //检查断开状态 |
| | | if (!MqttRecvClient.getInstance().isConnected()) { |
| | | MqttRecvClient.getInstance().reConnect(); |
| | | } |
| | | if (!MqttRecvClient.getInstance().isInit()) { |