The document discusses the development of a new algorithm, IoT-Quality of Service (QoS), aimed at improving the performance and security of IoT devices using Wi-Fi technology by optimizing energy consumption and enhancing network performance. This algorithm integrates a streamlined identity management system for effective authentication and access while monitoring energy levels and communication quality. A comparative analysis using NS3 simulator demonstrated the proposed algorithm's superiority over conventional models by considering key performance metrics such as power consumption, throughput, delay, and response time.