Parser and query for DeviceLock