In the development of Internet-of-things (IoT)-based technology, there is a pre-programmed robot called Cyborg which is used for assisting elderly people. It moves around the home and observes the surrounding conditions. The Cyborg is developed and used in the smart home system. The features of a smart home system with IoT technology include temperature control, lighting control, surveillance, security, smart electricity, and water sensors. Nowadays, elderly people may not be able to maintain their homes appropriately and may feel uncomfortable performing day-to-day activities. Therefore, Cyborg can be used to carry out the activities of elderly people. Such activities include switching off unnecessary lights, watering plants, gas control, monitoring intruders or unknown persons, alerting elderly people in emergency situations, etc. These activities are controlled by web-based platforms as well as smartphone applications. The issues with the existing algorithms include that they are inefficient, require a long time for implementation, and have high storage space requirements. This paper proposes the k-nearest neighbors (KNN) with an artificial bee colony (ABC) algorithm (KNN-ABC). In this proposed work, KNN-ABC is used with wireless sensor devices for perceiving the surroundings of the smart home. This work implements the automatic control of electronic appliances, alert signal processors, intruder detection, and performs day-to-day activities automatically in an efficient way. GNB for intruder detection in the smart home environment system using the Cyborg human intervention robot achieved an accuracy rate of 88.12%, the Artificial Bee Colony algorithm (ABC) achieved 90.12% accuracy on the task of power saving in smart home electronic appliances, the KNN technique achieved 91.45% accuracy on the task of providing a safer pace to the elderly in the smart home environment system, and our proposed KNN-ABC system achieved 93.72%.