code: def add_service(self, zconf, typ, name):
          
          service = None
          tries = 0
          _LOGGER.debug("add_service %s, %s", typ, name)
          while service is None and tries < 4:
              try:
                  service = zconf.get_service_info(typ, name)
              except IOError:
                  # If the zeroconf fails to receive the necessary data we abort
                  # adding the service
                  break
              tries += 1
  
          if not service:
              _LOGGER.debug("add_service failed to add %s, %s", typ, name)
              return
  
          def get_value(key):
              """Retrieve value and decode to UTF-8."""
              value = service.properties.get(key.encode('utf-8'))
  
              if value is None or isinstance(value, str):
                  return value
              return value.decode('utf-8')
  
          ips = zconf.cache.entries_with_name(service.server.lower())
          host = repr(ips[0]) if ips else service.server
  
          model_name = get_value('md')
          uuid = get_value('id')
          friendly_name = get_value('fn')
  
          if uuid:
              uuid = UUID(uuid)
  
          self.services[name] = (host, service.port, uuid, model_name,
                                 friendly_name)
  
          if self.add_callback:
              self.add_callback(name)
docs: Add a service to the collection.