'Write to the projector and read the return.'

def _write_read(self, msg):

    import serial
    ret = ''
    try:
        if (not self.ser.is_open):
            self.ser.open()
        msg = msg.encode('utf-8')
        self.ser.write(msg)
        ret = self.ser.read_until(size=20).decode('utf-8')
    except serial.SerialException:
        _LOGGER.error('Problem    comunicating    with    %s', self._serial_port)
    self.ser.close()
    return ret
