Changed all occurences of deviceName to deviceId