Healthy and sufficient crop and food production are very much essential for everyone as the population is increasing globally. The production of crops affects the economy of a country to a great extent. In agriculture, observing the soil, weather, and water availability and, based on these factors, selecting an appropriate crop, finding the availability of seeds, analysing crop demand in the market, and having knowledge of crop cultivation are important. At present, many advancements have been made in recent times, starting from crop selection to crop cutting. Mainly, the roles of the Internet of Things, cloud computing, and machine learning tools help a farmer to analyse and make better decisions in each stage of cultivation. Once suitable crop seeds are chosen, the farmer shall proceed with seeding, monitoring crop growth, disease detection, finding the ripening stage of the crop, and then crop cutting. The main objective is to provide a continuous support system to a farmer so that he can obtain regular inputs about his field and crop. Additionally, he should be able to make proper decisions at each stage of farming. Artificial intelligence, machine learning, the cloud, sensors, and other automated devices shall be included in the decision support system so that it will provide the right information within a short time span. By using the support system, a farmer will be able to take decisive measures without fully depending on the local agriculture offices. We have proposed an IoT-enabled soil nutrient classification and crop recommendation (IoTSNA-CR) model to recommend crops. The model helps to minimise the use of fertilisers in soil so as to maximise productivity. The proposed model consists of phases, such as data collection using IoT sensors from cultivation lands, storing this real-time data into cloud memory services, accessing this cloud data using an Android application, and then pre-processing and periodic analysis of it using different learning techniques. A sensory system was prepared with optimised cost that contains different sensors, such as a soil temperature sensor, a soil moisture sensor, a water level indicator, a pH sensor, a GPS sensor, and a colour sensor, along with an Arduino UNO board. This sensory system allowed us to collect moisture, temperature, water level, soil NPK colour values, date, time, longitude, and latitude. The studies have revealed that the Agrinex NPK soil testing tablets should be applied to a soil sample, and then the soil colour can be sensed using an LDR colour sensor to predict the phosphorus (P), nitrogen (N), and potassium (K) values. These collected data together were stored in Firebase cloud storage media. Then, an Android application was developed to fetch and analyse the data from the Firebase cloud service from time to time by a farmer. In this study, a novel approach was identified via the hybridisation of algorithms. We have developed an algorithm using a multi-class support vector machine with a directed acyclic graph and optimised it using the fruit fly optimisation method (MSVM-DAG-FFO). The highest accuracy rate of this algorithm is 0.973, compared to 0.932 for SVM, 0.922 for SVM kernel, and 0.914 for decision tree. It has been observed that the overall performance of the proposed algorithm in terms of accuracy, recall, precision, and F-Score is high compared to other methods. The IoTSNA-CR device allows the farmer to maintain his field soil information easily in the cloud service using his own mobile with minimum knowledge. Additionally, it reduces the expenditure to balance the soil minerals and increases productivity.