def __init__(self, machine):

        if 'osc' not in machine.config:
            machine.log.debug('"OSC:" section not found in the machine '
                                   'configuration, so the OSC plugin will not '
                                   'be used.')
            return

        if not import_success:
            machine.log.warning('OSC plugin requires PyOSC which does not '
                                     'appear to be installed. No prob, but FYI '
                                     'that the OSC will not be available.')
            return

        self.log = logging.getLogger('osc')
        self.machine = machine

        config_spec = '''
                        client_port: int|8000
                        debug_messages: boolean|False
                        '''

        self.config = Config.process_config(config_spec,
                                          self.machine.config['osc'])

        if self.config['machine_ip'].upper() == 'AUTO':
            self.config['machine_ip'] = socket.gethostbyname(
                                                        socket.gethostname())

        if 'client_updates' in self.config:
            self.config['client_updates'] = self.config['client_updates'].split(
                                                                            ' ')
        else:
            self.config['client_updates'] = None

        self.OSC_clients = dict()
        self.client_needs_sync = False
        self.client_last_update_time = None
        self.last_loop_time = 1
        self.client_mode = 'name'
        self.clients_to_delete = list()
        self.clients_to_add = list()

        # If this machine uses WPC driver boards then we can drive devices by #
        if self.machine.config['hardware']['driverboards'][0:3] == 'wpc':
            self.wpc = True
        else:
            self.wpc = False

        # register for events
        self.machine.events.add_handler('init_phase_4', self.start)
dataset/ETHPy150Open missionpinball/mpf/mpf/plugins/osc.py/OSC.__init__/original