The number of interacting devices is increasing every day, and with this constant innovation, serious security challenges arise. The concept of the Internet of Things is being actively applied in both domestic and industrial settings. Researchers are increasingly highlighting the challenges and importance of network security. Data preprocessing plays an important role in security by transforming the input data corresponding to algorithmic criteria and thereby contributing to the prediction accuracy. The data preprocessing process is determined by many factors, including the processing algorithm, the data, and the application. Moreover, in Internet of Things interactions, data normalisation and aggregation can significantly improve security and reduce the amount of data used further decision making. This paper discusses the challenges of data normalisation and aggregation in the IoT to handle large amounts of data generated by multiple connected IoT devices. A secure data normalisation and aggregation method promotes successful minimised data transfer over the network and provides scalability to meet the increasing demands of IoT deployment. The proposed work presents approaches used in data aggregation protocols that address interference, fault tolerance, security and mobility issues. A local aggregation approach using the run-length encoding algorithm is presented. The proposed technique consists of data acquisition, data preprocessing, data normalisation and data aggregation steps. Data normalisation was performed via the Z-score algorithm, and the LEACH algorithm was used for data aggregation. In the experimental study, the percentage of faulty nodes reached 35%. The performance of the proposed solution was 0.82. The results demonstrate a reduction in resource consumption while maintaining the value and integrity of the data.