Intrusion detection in the Internet of Thing (IoT) faces several challenges, including scalability, attack diversity, and the need for components to cooperate in the threat detection process. Current approaches have failed to simultaneously address these challenges. In this regard, our research presents a collaborative solution for intrusion detection in the IoT that relies on a combination of fuzzy logic techniques and Convolutional Neural Network (CNN) ensemble. Our goal is to solve the challenges in intrusion detection by using this combination and provide better performance in threat detection. Our proposed method consists of two main phases. In the first phase, the network decomposition and deployment of intrusion detection models are performed. In this phase, first the neighbor identification and weighting of the communication links between nodes are performed. Then, based on these weighted connections, the network clustering and decomposition operations are performed. After clustering, an observer node is assigned to each subnet, in which a separate detection model is deployed, so that intrusion detection can be performed in the second phase. In the second phase, which is performed locally in each subnet, the data is first preprocessed and the feature selection operation is performed using a combination of feature ranking methods and a fuzzy logic model. In this phase, the Backward Elimination Feature Selection model is used to identify the most relevant indicators with the type of attacks, and finally, a CNN model is used to identify intrusions in each subnet. In the detection process, when each of the participating observer nodes performs its local detection using this algorithm, they exchange the obtained information with each other to determine the final result of intrusion detection based on a voting method. It should also be noted that our proposed method was tested on two datasets, NSLKDD and NSW-NB15, and the results obtained show a significant improvement in the intrusion detection performance compared to previous methods. So that the average accuracy obtained was 99.72% in the NSLKDD dataset and 98.36% in the NSW-NB15 dataset.