@Override protected void updateChannels() { try { NADeviceListBody deviceList = bridgeHandler.getStationApi().devicelist(actualApp, getParentId(), false).getBody(); for (NAModule module : deviceList.getModules()) { if (module.getId().equalsIgnoreCase(getId())) { this.module = module; super.updateChannels(); } } } catch (Exception e) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.NONE, e.getMessage()); } }
@Override public void startScan() { NADeviceListResponse deviceList; try { deviceList = netatmoBridgeHandler.getStationApi().devicelist("app_station", null, false); screenDevicesAndModules(deviceList); deviceList = netatmoBridgeHandler.getThermostatApi().devicelist("app_thermostat", null, false); screenDevicesAndModules(deviceList); } catch (Exception e) { logger.warn(e.getMessage()); } stopScan(); }