add register device view
a toDevice method for register device view
add id in all models