DEvice defines API and service call added. Now device defines are fetche...

...d from DB before registering the device.