isDeviceOnline

This function checks if the device is online