Autonomous Smart Home (ASH) systems incorporate various sensors and Internet of Things (IoT) modules to automate and enhance residential functionality. ASH represents an IoT communication paradigm for decision-making, data analysis, task automation during triggered events, and remote accessibility. However, the connectivity of modules via wired and wireless channels can introduce cybersecurity challenges, including data privacy concerns, device tampering, network weaknesses, lack of standardization, and risks associated with firmware and software vulnerabilities. Cyber breaches in ASH can have catastrophic effects, such as unauthorized control of critical home, medical systems, emergency response interference, automated lock system failures, and critical home-appliance sabotage. To address this concern, we propose Smart-Sec, which leverages a deep learning-based Convolutional Neural Network (CNN) architecture. The performance of Smart-Sec was evaluated using various optimization algorithms, accuracy comparison, loss depiction, confusion matrix, precision, recall, and F1-score. Among all algorithms, our one-dimensional CNN architecture performed well with the RMSProp optimizer.