Health monitoring is one of the sustainable development areas throughout the globe and Diabetes Mellitus is a common disease worldwide that is one of the main causes of health disasters. Currently, Internet of Things (IoT) and machine learning (ML) technology together provide a proficient approach for monitoring and predicting diabetes mellitus. In this article, we have proposed a model which uses the hybrid enhanced adaptive data rate (HEADR) algorithm for long range (LoRa) protocol of the Internet of Things (IoT) for patient's real-time data gathering. Further, machine learning prediction takes place by using classification methods for the detection of diabetes severity levels on collected data through LoRa protocol. The performance of the LoRa protocol is evaluated on the Contiki Cooja simulator based on throughput and packet collision parameters. The proposed model uses different machine learning classifiers, namely, gradient boosting (GB), random forest (RF), decision tree (DT), support vector machine (SVM), K-nearest neighbors (KNN), logistic regression (LR), and Gaussian Naive Bayes (GNB) to predict diabetes with maximum accuracy score, precision, recall, F-measure, and receiver operating curve (ROC), using Python programming language.