private void checkDeviceConfig(Device newDevice, Device internalDevice) { if (newDevice == null || internalDevice == null) { return; } // check device availability has changed and inform the deviceStatusListener about the change. // NOTE: // The device is not availability for the digitalSTROM-Server, it has not been deleted and are // therefore set to // OFFLINE. // To delete an alternate algorithm is responsible. if (newDevice.isPresent() != internalDevice.isPresent()) { internalDevice.setIsPresent(newDevice.isPresent()); } if (newDevice.getMeterDSID() != null && !newDevice.getMeterDSID().equals(internalDevice.getMeterDSID())) { internalDevice.setMeterDSID(newDevice.getMeterDSID().getValue()); } if (newDevice.getFunctionalColorGroup() != null && !newDevice.getFunctionalColorGroup().equals(internalDevice.getFunctionalColorGroup())) { internalDevice.setFunctionalColorGroup(newDevice.getFunctionalColorGroup()); } if (newDevice.getName() != null && !newDevice.getName().equals(internalDevice.getName())) { internalDevice.setName(newDevice.getName()); } if (newDevice.getOutputMode() != null && !newDevice.getOutputMode().equals(internalDevice.getOutputMode())) { internalDevice.setOutputMode(newDevice.getOutputMode()); } strucMan.updateDevice(newDevice); }