Simplify getting device id