   for e in rpcReq.event
     params.push([['Events', e.replace(' ', '_')], timestamp,
       {object: [timestamp, 0], writable: [timestamp, 0], value: [timestamp, [timestamp, 'xsd:dateTime']]}])
+
+  # Preload DeviceID params
+  loadPath(sessionContext, ['DeviceID', '*'])
 
   for p in params
     loadPath(sessionContext, p[0])



loadParameters = (sessionContext, callback) ->
  if not sessionContext.toLoad?.length
    return callback()

  db.fetchDevice(sessionContext.deviceId, sessionContext.timestamp, sessionContext.toLoad, (err, parameters, loaded) ->
    return callback(err) if err

    if not parameters?

  path = path.slice(0, trimWildcard) if trimWildcard < path.length

  for i in [0..path.length] by 1
    d = if i == path.length then 99 else i
    for sup in sessionContext.deviceData.paths.find(path.slice(0, i), true, false, d)
      v = sessionContext.deviceData.loaded.get(sup) | sessionContext.toLoad.get(sup)
      if sup.length > i
        v &= (1 << i) - 1
      depth &= depth ^ v
      return true if depth == 0

  path = sessionContext.deviceData.paths.add(path)
  depth |= sessionContext.toLoad.get(path)
  sessionContext.toLoad.set(path, depth)
  return false


