             projection[c.name] = 1
           when 'firmware'
             projection['InternetGatewayDevice.DeviceInfo.SoftwareVersion'] = 1
+          when 'add_tag', 'delete_tag'
+            projection['_tags'] = 1
+          when 'add_object', 'delete_object'
+            projection[c.name] = 1
           else
             throw new Error('Unknown configuration type')
 

      expiry = config.PRESETS_CACHE_DURATION
      getParameterValues = []
      setParameterValues = []
      for c in configurations
        param = common.getParamValueFromPath(device, c.name)
        continue if not param? # ignore parameters that don't exist

        switch c.type
          when 'value'
            dst = common.matchType(param._value, c.value)
            if param._value != dst
              setParameterValues.push([c.name, dst, param._type])
          when 'age'
            timeDiff = (now - param._timestamp) / 1000
            if (c.age - timeDiff < config.PRESETS_TIME_PADDING)
              expiry = Math.min(expiry, c.age)
              getParameterValues.push(c.name)
            else
              expiry = Math.min(expiry, c.age - timeDiff)
          else
            throw new Error('Unknown configuration type')

      if getParameterValues.length
        taskList.push {device : deviceId, name : 'getParameterValues', parameterNames: getParameterValues, timestamp : new Date()}
      if setParameterValues.length
        taskList.push {device : deviceId, name : 'setParameterValues', parameterValues: setParameterValues, timestamp : new Date()}


  configurations = {}
  for p in presets
    for c in p.configurations
      configurationHash = switch c.type
        when 'add_tag', 'delete_tag'
          "tag_#{c.tag}"
        when 'add_object', 'delete_object'
          "object_#{c.object}_#{c.object}"
        when 'firmware'
          'firmware'
        else
          "#{c.type}_#{c.name}"

      if not maxWeights[configurationHash]? or p.weight > maxWeights[configurationHash]
        configurations[configurationHash] = c
