The document proposes a new fire detection system with a multifunctional artificial intelligence (AI) framework and a data transfer delay minimization mechanism. The framework includes multiple machine learning algorithms and an adaptive fuzzy algorithm to improve fire detection accuracy. Additionally, Direct-MQTT based on SDN is introduced to solve traffic concentration problems and reduce the end-to-end delay by an average of 72%. The system aims to improve fire safety in smart cities by more accurately and quickly detecting fires.