Set up devices model and controller