Fixing `deviceOn` firing too early

deviceOn is being called too prematurely. This waits for the device to be really connected to emit the signal.