addDevice and js updated