Research Article

Internet of Things-Based Intelligent Smart Home Control System

Algorithm 1

: Intelligent home control, monitoring, and security algorithm.
(1)Begin
(2)Define parameters
(3)Initialize EHA and HSD
(4)Establish and confirm the status of
(5)If
(6)Evaluate the initial state of EHA;
(7)while (where  = number of configured home appliances)
(8)Start HC
(9)Else, go to step 4
(10)End if
(11)While; continue action till the desired state is reached
(12)Evaluate the initial state of HSD;
(13)If (where  = number of home sensors and detectors)
(14)Connect iHOCS to the Internet
(15)Acquire sensor data to iHOCS via the ESP8266
(16)Else, go to step 4
(17)For each round do
(18)Get the values for
(19)Upload data to
(20)Update status of HSDs in iHOCS
(21)Display graphical status of HSDs in iHOCS
(22)Synchronize data to CS
(23)Else, go to step 12
(24)Case 1: (LDR)
(25)if (D = 1) then
(26)Notify the user “It’s DARK, Turn on the LIGHTS
(27)Else
(28)Notify the user “Its BRIGHT, Turn off the LIGHTS
(29)break;
(30)Case 2: (PIR Sensor)
(31)If M is detected, then
(32)Notify user via e-mail “TOSIN: Motion detected”
(33)break;
(34)Case 3: (ESP Cam)
(35)If M is detected, capture IM
(36)Notify via iHOCS and apply SVM
(37)If
(38)Mute alarm
(39)Else,
(40)Raise alarm and send picture to e-mail
(41)end if
(42)User monitors EHA and HSD via iHOCS app
(43)Remotely control the home
(44)End