logger.debug("Open Energy Monitor message listener started");
OpenEnergyMonitorConnector connector;
if (simulate == true)
connector = new OpenEnergyMonitorSimulator();
else if (serialPort != null)
connector = new OpenEnergyMonitorSerialConnector(serialPort);
else
connector = new OpenEnergyMonitorUDPConnector(udpPort);